Commit graph

7 commits

Author SHA1 Message Date
Eric Huss d774f1f331 Bump to 0.54.0 2021-03-26 12:28:47 -07:00
Alexis Bourget 83b353bc9b Test the passing of --error-format to rustdoc 2021-02-14 18:01:50 +01:00
Eric Huss c889bbfba8 Add "build-finished" JSON message. 2020-04-04 18:56:50 -07:00
Eric Huss 83571aee56 Minor testsuite organization. 2019-11-24 18:42:45 -08:00
Alex Crichton 61fb34b0c0 Allow a number of tests to run on stable
These tests all relied on support which has now ridden to stable at this
point, so let's let them run on stable!
2019-09-26 11:31:57 -07:00
Alex Crichton 9115b2c326 Extract support directory to its own crate
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
Alex Crichton 45699e9f21 Add support for customizing JSON diagnostics from Cargo
Cargo has of #7143 enabled pipelined compilation by default which
affects how the compiler is invoked, especially with respect to JSON
messages. This, in some testing, has proven to cause quite a few issues
with rustbuild's current integration with Cargo. This commit is aimed at
adding features to Cargo to solve this issue.

This commit adds the ability to customize the stream of JSON messages
coming from Cargo. The new feature for Cargo is that it now also mirrors
rustc in how you can configure the JSON stream. Multiple
`--message-format` arguments are now supported and the value specified
is a comma-separated list of directives. In addition to the existing
`human`, `short`, and `json` directives these new directives have been
added:

* `json-render-diagnostics` - instructs Cargo to render rustc
  diagnostics and only print out JSON messages for artifacts and Cargo
  things.

* `json-diagnostic-short` - indicates that the `rendered` field of rustc
  diagnostics should use the "short" rendering.

* `json-diagnostic-rendered-ansi` - indicates that the `rendered` field of rustc
  diagnostics should embed ansi color codes.

The first option here, `json-render-diagnostics`, will be used by
rustbuild unconditionally. Additionally `json-diagnostic-short` will be
conditionally used based on the input to rustbuild itself.

This should be enough for external tools to customize how Cargo is
invoked and how all kinds of JSON diagnostics get printed, and it's
thought that we can relatively easily tweak this as necessary to extend
it and such.
2019-08-05 12:49:51 -07:00