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

Add support for cargo --explain #2551

Merged
merged 1 commit into from
Apr 21, 2016
Merged

Conversation

alexcrichton
Copy link
Member

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!

@rust-highfive
Copy link

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

@rust-highfive rust-highfive assigned brson and unassigned huonw Apr 8, 2016
@alexcrichton
Copy link
Member Author

May want to not merge this until rust-lang/rust#32756 is approved, but may also be good regardless either way.

@huonw
Copy link
Member

huonw commented Apr 8, 2016

Should all subcommands that can pass-through errors support this too? E.g. cargo build => error mentioning --explain => user tries cargo build --explain E0000.

@alexcrichton
Copy link
Member Author

Hm perhaps? We need to be careful about hijacking top-level arguments, however, as cargo subcommands may be using them in various ways.

@wycats
Copy link
Contributor

wycats commented Apr 9, 2016

I think I prefer leaving it just cargo --explain for now and see if it ends up causing confusion.

@bors
Copy link
Collaborator

bors commented Apr 19, 2016

☔ The latest upstream changes (presumably #2590) made this pull request unmergeable. Please resolve the merge conflicts.

@brson
Copy link
Contributor

brson commented Apr 20, 2016

@bors r

@bors
Copy link
Collaborator

bors commented Apr 20, 2016

📌 Commit f73d55a has been approved by brson

@bors
Copy link
Collaborator

bors commented Apr 20, 2016

🔒 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!
@alexcrichton
Copy link
Member Author

@bors: r=brson 8dad57e

@bors
Copy link
Collaborator

bors commented Apr 21, 2016

⌛ Testing commit 8dad57e with merge b462d50...

bors added a commit that referenced this pull request Apr 21, 2016
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!
@bors
Copy link
Collaborator

bors commented Apr 21, 2016

@bors bors merged commit 8dad57e into rust-lang:master Apr 21, 2016
@alexcrichton alexcrichton deleted the explain branch May 25, 2016 05:21
epage added a commit to epage/cargo that referenced this pull request Aug 29, 2023
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.
bors added a commit that referenced this pull request Aug 29, 2023
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.
epage added a commit to epage/cargo that referenced this pull request Aug 30, 2023
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.
bors added a commit that referenced this pull request Aug 30, 2023
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.
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 this pull request may close these issues.

None yet

6 participants