-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Remove cargo dev fmt
reliance on rustup
#13759
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Jarcho (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
964a5ab
to
2667f4a
Compare
I thought using If this fails, why not just use |
So it's for if the rustfmt in PATH doesn't match the one we want to use? That makes sense. Good point about which/where, I've simplified the code to just fall back to |
The reason for using What are you using for Rust toolchain mangement? Using |
I was using the fenix overlay for NixOS, which does read from the same toolchain file but doesn't install the rustup binary or use it for management. I realize that a lot of dev tools are inherently dependent on rustup but it seems like it would make sense to support other configurations when possible. It still uses I found the NO_FMT_TEST env variable as well so if you'd rather keep this method the way it is I can just add some documentation about that somewhere, to help anyone running into the same problem as me. |
I have no issue with falling back to CI, however, should definitely not have a fallback. Doing so has the possibility of having a silent error that blows up at some point in the future. |
Good point, I wasn't thinking about that. I ended up having to switch to rustup anyway to get compiler internal completion working so I think I was hasty in making this. Closing now. |
Please write a short comment explaining your change (or "none" for internal only changes)
changelog: none
I hope PRs like this are welcome, it's a small update to the
cargo dev fmt
subcommand. I noticed that it usesrustup which rustfmt
to get the full command path, and fails if this doesn't work. I think it would be useful to fall back towhich
orwhere
if someone is using something other than rustup for toolchain management.