Obtain rendered diagnostics through --message-format=json
#156
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andserde
, both of which have large ui test suites, both pass with this change.