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

Obtain rendered diagnostics through --message-format=json #156

Merged
merged 1 commit into from
Mar 30, 2022
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Mar 30, 2022

This PR switches to getting rustc's diagnostics message through Cargo's "JSON messages" functionality, which is described in https://doc.rust-lang.org/1.59.0/cargo/reference/external-tools.html#json-messages.

This doesn't immediately offer an improvement, but this is a necessary step to leveraging Cargo's new --keep-going flag to build all the ui test inputs simultaneously instead of one after the other, which will be an enormous speed improvement. Without JSON messages, tests which are compiled simultaneously would end up interleaving diagnostics in a way that makes it impossible to separate and attribute each diagnostic to which input file's build it relates to.

See rust-lang/cargo#10383 & rust-lang/cargo#10496 for more on --keep-going.

I confirmed that cxx and serde, both of which have large ui test suites, both pass with this change.

@dtolnay dtolnay merged commit af5d133 into master Mar 30, 2022
@dtolnay dtolnay deleted the json branch March 30, 2022 05:58
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.

1 participant