-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 rustc's --error-format short #5879
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Should I remove https://github.com/rust-lang/cargo/pull/5878/files#diff-7f98585dbf9d30aa100c8318e2c77e79R608 |
This looks good to me, thanks! And yeah I think it may be fine to test out how verbose a removal of |
src/cargo/core/compiler/mod.rs
Outdated
@@ -745,8 +745,10 @@ fn build_base_args<'a, 'cfg>( | |||
add_path_args(bcx, unit, cmd); | |||
add_color(bcx, cmd); | |||
|
|||
if bcx.build_config.json_messages() { | |||
cmd.arg("--error-format").arg("json"); | |||
match bcx.build_config.message_format { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you rebase, I think it would be nice to pull this out into a separate function so that both the rustc
and rustdoc
calls could share the same code.
Running a local build of this branch on some broken code shows this kind of output: 18:42:29 $ dcargo check --message-format=short --tests Checking bufstream v0.1.3 Checking cargo v0.30.0 (file:///d/cargo) tests/testsuite/config.rs:298:9: error[E0308]: mismatched types tests/testsuite/config.rs:307:9: error[E0308]: mismatched types tests/testsuite/config.rs:363:9: error[E0308]: mismatched types tests/testsuite/config.rs:367:9: error[E0308]: mismatched types tests/testsuite/config.rs:371:9: error[E0308]: mismatched types tests/testsuite/config.rs:375:9: error[E0308]: mismatched types tests/testsuite/config.rs:382:9: error[E0308]: mismatched types tests/testsuite/config.rs:386:9: error[E0308]: mismatched types tests/testsuite/config.rs:400:9: error[E0308]: mismatched types tests/testsuite/config.rs:428:9: error[E0308]: mismatched types tests/testsuite/config.rs:479:9: error[E0308]: mismatched types tests/testsuite/config.rs:491:9: error[E0308]: mismatched types tests/testsuite/config.rs:496:9: error[E0308]: mismatched types tests/testsuite/config.rs:501:9: error[E0308]: mismatched types tests/testsuite/config.rs:506:9: error[E0308]: mismatched types tests/testsuite/config.rs:512:9: error[E0308]: mismatched types tests/testsuite/config.rs:582:9: error[E0308]: mismatched types tests/testsuite/config.rs:660:9: error[E0308]: mismatched types tests/testsuite/config.rs:666:9: error[E0308]: mismatched types tests/testsuite/config.rs:672:9: error[E0308]: mismatched types tests/testsuite/config.rs:678:9: error[E0308]: mismatched types error: aborting due to 21 previous errors error: Could not compile `cargo`. warning: build failed, waiting for other jobs to finish... error: build failed
@ehuss done @alexcrichton I tested it and didn't like the look of it (I could see someone, like myself, cleaning it up after). I think this is just the reality of changing algebraic data types combined with parallel development. But let me know if you have any further thoughts! |
@bors: r+ |
📌 Commit 2c704d8 has been approved by |
⌛ Testing commit 2c704d8 with merge ef1b6453ba0c27337ae35f82c585a3f9b8da5dc2... |
💔 Test failed - status-travis |
@bors: retry |
⌛ Testing commit 2c704d8 with merge 03c55c688d8d1dc7ae7fb0672fc51b39cdd4ea4f... |
💔 Test failed - status-travis |
Travis CI failed even worst this time round.. 😕
|
This could use a |
@bors retry |
Add support for rustc's --error-format short Running a local build of this branch on some broken code shows this kind of output: 18:42:29 $ dcargo check --message-format=short --tests Checking bufstream v0.1.3 Checking cargo v0.30.0 (file:///d/cargo) tests/testsuite/config.rs:298:9: error[E0308]: mismatched types tests/testsuite/config.rs:307:9: error[E0308]: mismatched types tests/testsuite/config.rs:363:9: error[E0308]: mismatched types tests/testsuite/config.rs:367:9: error[E0308]: mismatched types tests/testsuite/config.rs:371:9: error[E0308]: mismatched types tests/testsuite/config.rs:375:9: error[E0308]: mismatched types tests/testsuite/config.rs:382:9: error[E0308]: mismatched types tests/testsuite/config.rs:386:9: error[E0308]: mismatched types tests/testsuite/config.rs:400:9: error[E0308]: mismatched types tests/testsuite/config.rs:428:9: error[E0308]: mismatched types tests/testsuite/config.rs:479:9: error[E0308]: mismatched types tests/testsuite/config.rs:491:9: error[E0308]: mismatched types tests/testsuite/config.rs:496:9: error[E0308]: mismatched types tests/testsuite/config.rs:501:9: error[E0308]: mismatched types tests/testsuite/config.rs:506:9: error[E0308]: mismatched types tests/testsuite/config.rs:512:9: error[E0308]: mismatched types tests/testsuite/config.rs:582:9: error[E0308]: mismatched types tests/testsuite/config.rs:660:9: error[E0308]: mismatched types tests/testsuite/config.rs:666:9: error[E0308]: mismatched types tests/testsuite/config.rs:672:9: error[E0308]: mismatched types tests/testsuite/config.rs:678:9: error[E0308]: mismatched types error: aborting due to 21 previous errors error: Could not compile `cargo`. warning: build failed, waiting for other jobs to finish... error: build failed Rehash of @QuietMisdreavus' #4720 now that `--short-message` is stable (thanks for the ping @pickfire!). Feedback welcome.
☀️ Test successful - status-appveyor, status-travis |
Update cargo - Update transitioning url (rust-lang/cargo#5889) - Resolve some clippy lint warnings (rust-lang/cargo#5884) - Don't kill child processes on normal exit on Windows (rust-lang/cargo#5887) - fix a bunch of clippy warnings (rust-lang/cargo#5876) - Add support for rustc's --error-format short (rust-lang/cargo#5879) - Support JSON with rustdoc. (rust-lang/cargo#5878) - Fix rustfmt instructions in CONTRIBUTING.md (rust-lang/cargo#5880) - Allow `cargo run` in workspaces. (rust-lang/cargo#5877) - Change target filters in workspaces. (rust-lang/cargo#5873) - Improve verbose console and log for finding git repo in package check (rust-lang/cargo#5858) - Meta rename (rust-lang/cargo#5871) - fetch: skip target tests when cross_compile is disabled (rust-lang/cargo#5870) - Fully capture rustc and rustdoc output when -Zcompile-progress is passed (rust-lang/cargo#5862) - Fix test --example docs. (rust-lang/cargo#5867) - Add a feature to build a vendored OpenSSL (rust-lang/cargo#5865)
Running a local build of this branch on some broken code shows this kind of output:
Rehash of @QuietMisdreavus' #4720 now that
--short-message
is stable (thanks for the ping @pickfire!).Feedback welcome.