-
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
Add support for cargo --explain
#2551
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
r? @brson |
May want to not merge this until rust-lang/rust#32756 is approved, but may also be good regardless either way. |
Should all subcommands that can pass-through errors support this too? E.g. |
Hm perhaps? We need to be careful about hijacking top-level arguments, however, as cargo subcommands may be using them in various ways. |
I think I prefer leaving it just |
☔ The latest upstream changes (presumably #2590) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r+ |
📌 Commit f73d55a has been approved by |
🔒 Merge conflict |
The error messages in the compiler are being tweaked and will likely drop the `rustc --explain` part of the error message in favor of `--explain`. In that case you're expected to basically take whatever tool you're using and pass `--explain` to it with an error code, so let's add it to Cargo as well!
Add support for `cargo --explain` The error messages in the compiler are being tweaked and will likely drop the `rustc --explain` part of the error message in favor of `--explain`. In that case you're expected to basically take whatever tool you're using and pass `--explain` to it with an error code, so let's add it to Cargo as well!
☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
In working on rust-lang#12578, I'm focusing on each help string to decide how it should be handled and I noticed this. It feels weird to explain something in terms of another command's CLI, so I took `rustc --help`s message and added `rustc` to clarify it. Looking back, the flag was added in rust-lang#2551 with the message we have today. Nothing seems to really be said about it. In reflecting on this, I'm not 100% convinced and am open to other opinions.
fix(help): Explain --explain In working on #12578, I'm focusing on each help string to decide how it should be handled and I noticed this. It feels weird to explain something in terms of another command's CLI, so I took `rustc --help`s message and added `rustc` to clarify it. Looking back, the flag was added in #2551 with the message we have today. Nothing seems to really be said about it. In reflecting on this, I'm not 100% convinced and am open to other opinions.
In working on rust-lang#12578, I'm focusing on each help string to decide how it should be handled and I noticed this. It feels weird to explain something in terms of another command's CLI, so I took `rustc --help`s message and added `rustc` to clarify it. Looking back, the flag was added in rust-lang#2551 with the message we have today. Nothing seems to really be said about it. In reflecting on this, I'm not 100% convinced and am open to other opinions.
fix(help): Explain --explain In working on #12578, I'm focusing on each help string to decide how it should be handled and I noticed this. It feels weird to explain something in terms of another command's CLI, so I took `rustc --help`s message and added `rustc` to clarify it. Looking back, the flag was added in #2551 with the message we have today. Nothing seems to really be said about it. In reflecting on this, I'm not 100% convinced and am open to other opinions.
The error messages in the compiler are being tweaked and will likely drop the
rustc --explain
part of the error message in favor of--explain
. In thatcase you're expected to basically take whatever tool you're using and pass
--explain
to it with an error code, so let's add it to Cargo as well!