Skip to content
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

./util/dev fmt fails #4638

Closed
Lythenas opened this issue Oct 7, 2019 · 2 comments · Fixed by #4641
Closed

./util/dev fmt fails #4638

Lythenas opened this issue Oct 7, 2019 · 2 comments · Fixed by #4641

Comments

@Lythenas
Copy link
Contributor

Lythenas commented Oct 7, 2019

./util/dev fmt fails for me. I think this is cause by 20b7351
I think this commit changed how rustfmt is called from rustfmt to $CARGO_HOME/bin/rustfmt which is not the same on my machine.

I'm on archlinux and I installed rustup through the package manager (not sure if that makes a difference). For me the rustfmt binary is not in ~/.cargo/bin/rustfmt but in /usr/bin/rustfmt and points to /usr/bin/rustup.

Running ./util/dev fmt --verbose outputs:

    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/clippy_dev fmt --verbose`
cd /home/ms/Repos/rust-clippy/clippy_dev && /home/ms/.cargo/bin/rustfmt +nightly --version
error: No such file or directory (os error 2)

cargo is also not in ~/.cargo/bin for me but in /usr/bin/cargo which also points to /usr/bin/rustup.

@Lythenas
Copy link
Contributor Author

Lythenas commented Oct 7, 2019

For now just creating symbolic links in ~/.cargo/bin to the executables cargo, cargo-fmt and rustfmt in /usr/bin is a workaround. But it is not ideal.

@mati865
Copy link
Contributor

mati865 commented Oct 7, 2019

Original bug has been fixed in Cargo so Clippy should revert the workaround which caused this issue once Cargo update lands in Rust.

Upstream PR: rust-lang/rust#65186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants