-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to format nested mod with relative path on windows #1873
Comments
Do you know how we should fix this? I feel like there must be some way to get a canonical path that will work on Windows. |
After a post on reddit to encourage people to try out rustfmt in anticipation of a 1.0 release, I hit the same problem. Is this a blocking issue for a 1.0 release? |
I'm still seeing this issue :/ |
We hit the rustfmt bug: rust-lang/rustfmt#1873 . Currently, rustfmt fails to format when path attribute has relitive paths. Usually, our code does not have too much windows specific code and in this case there's no such code at the moment. So, it's the easiest fix is to disable rustfmt on Windows for now hoping for the fix in the future.
* fix/docs: fix mio types we use * test/udp_rendezvous_server: add integration test; also exposed UdpRendezvousClient (not as a crate API though, only for internal modules for testing). * make UdpRendezvousServer return it's listen address (in case someone specifies port 0 for it) * fixed UdpRendezvousServer on Windows where the client tried to connect with the server using 0.0.0.0 IP address. * fix/ci: skip rustfmt on Windows We hit the rustfmt bug: rust-lang/rustfmt#1873 . Currently, rustfmt fails to format when path attribute has relative paths. Usually, our code does not have too much windows specific code and in this case there's no such code at the moment. So, it's the easiest fix is to disable rustfmt on Windows for now hoping for the fix in the future.
I'm hitting this issue for coreutils (uutils/rust.coreutils) while attempting to add additional CI. cc: @rivy |
IIUC we need an equivalent to |
FWIW I just tested the
and paths like I'd also like to mention that |
@Xanewok If possible, could you open an issue on the rust repo about this ? I believe you'd explain what is wrong better than me! Thanks |
It seems a bunch of work is underway to tackle this: |
Closed via #4131. |
Remove rustfmt bug workaround rust-lang/rustfmt#1873 was fixed earlier this year. changelog: none
Remove rustfmt bug workaround rust-lang/rustfmt#1873 was fixed earlier this year. changelog: none
Remove rustfmt bug workaround rust-lang/rustfmt#1873 was fixed earlier this year. changelog: none
Remove rustfmt bug workaround rust-lang/rustfmt#1873 was fixed earlier this year. changelog: none
Following snippets will fail to format on windows.
rustfmt-nightly will complain
That's because rustfmt needs to canonicalize the source file paths first to be able to compare with file_lines configuration later. It works fine on linux. But on windows, canonicalize will return a UNC path, which doesn't accept relative join any more.
/cc rust-lang/rust#42869
The text was updated successfully, but these errors were encountered: