-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
The file path in the diagnostic message contains duplicate separators on windows #14227
Comments
I don't know if it's a problem with cargo itself or if a dependent library doesn't process the path for Windows. rust-lang/rust-clippy#13078 |
Couple of questions
|
Side note: I wonder if this is related to target work I did like #13849. |
cargo check
cargo -Vv
cargo metadata
Yes
Yes
Yes "src_path":"C:\wt\clippy-path\mpv-easy-ext\./src/main.rs" |
@ahaoboy Can you find a full reproduction case (manfiest, source files, etc). This can be by copy/pasting or a repo. A repo would make sure nothing was accidentally left out. I'm assuming the problem is in cases like cargo/src/cargo/util/toml/targets.rs Line 318 in 4e19f31
I would assume we would have a call to https://docs.rs/cargo-util/latest/cargo_util/paths/fn.normalize_path.html in there. Might be good to go back some versions to see if this once worked and to identify the root cause to find where the best fix would be. |
Steps
Ubuntu has same issue
The solution should not be difficult. Just find where the path mpv-easy-ext/./src/main.rs:2:7 is joined, and then use clean-path to process the following. cargo is too complicated, and I don’t know where the path is concatenated. PS: Maybe we can use a clean-path-join library? The double separator does not affect the function at present, but it is impossible to jump through the link in some editors and terminals. |
Problem
When using a relative path in a workspace subproject, the file path in the diagnostic message contains duplicate separators
happened
expected
Steps
Possible Solution(s)
Use clean-path to transform the output path
Notes
No response
Version
The text was updated successfully, but these errors were encountered: