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

Conversation

Projects
None yet
6 participants
@alexcrichton
Member

alexcrichton commented Apr 8, 2016

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

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Apr 8, 2016

r? @huonw

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

rust-highfive commented Apr 8, 2016

r? @huonw

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

@alexcrichton

This comment has been minimized.

Show comment
Hide comment

@rust-highfive rust-highfive assigned brson and unassigned huonw Apr 8, 2016

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Apr 8, 2016

Member

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

Member

alexcrichton commented Apr 8, 2016

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

@huonw

This comment has been minimized.

Show comment
Hide comment
@huonw

huonw Apr 8, 2016

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Apr 8, 2016

Member

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

Member

alexcrichton commented Apr 8, 2016

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

@wycats

This comment has been minimized.

Show comment
Hide comment
@wycats

wycats Apr 9, 2016

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@bors

bors Apr 19, 2016

Contributor

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

Contributor

bors commented Apr 19, 2016

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

@brson

This comment has been minimized.

Show comment
Hide comment
@brson

brson Apr 20, 2016

Contributor

@bors r+

Contributor

brson commented Apr 20, 2016

@bors r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Apr 20, 2016

Contributor

📌 Commit f73d55a has been approved by brson

Contributor

bors commented Apr 20, 2016

📌 Commit f73d55a has been approved by brson

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Apr 20, 2016

Contributor

🔒 Merge conflict

Contributor

bors commented Apr 20, 2016

🔒 Merge conflict

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!
@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton
Member

alexcrichton commented Apr 21, 2016

@bors: r=brson 8dad57e

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Apr 21, 2016

Contributor

⌛️ Testing commit 8dad57e with merge b462d50...

Contributor

bors commented Apr 21, 2016

⌛️ Testing commit 8dad57e with merge b462d50...

bors added a commit that referenced this pull request Apr 21, 2016

Auto merge of #2551 - alexcrichton:explain, r=brson
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 bors merged commit 8dad57e into rust-lang:master Apr 21, 2016

2 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@alexcrichton alexcrichton deleted the alexcrichton:explain branch May 25, 2016

@matklad matklad referenced this pull request Mar 5, 2018

Merged

Rustc explain #48337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment