mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
5c8170656b
Currently the json-formatted outputs have no way to unambiguously determine which kind of message is being output. A consumer can look for specific fields in the json object (eg "message"), but there's no guarantee that in future some other kind of output will have a field of the same name. This PR adds a `"type"` field to add json outputs which can be used to unambiguously determine which kind of output it is. The mapping is: diagnostic: regular compiler diagnostics artifact: artifact notifications future_incompat: Report of future incompatibility unused_extern: Unused crate warnings/errors This matches the "internally tagged" representation for serde enums.
4 lines
259 B
Plaintext
4 lines
259 B
Plaintext
{"type":"diagnostic","message":"`--error-format=pretty-json` is unstable","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: `--error-format=pretty-json` is unstable\u001b[0m
|
|
|
|
"}
|