1
Fork 0
rust/compiler/rustc_errors
Jeremy Fitzhardinge 5c8170656b Add type field to json diagnostic outputs
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.
2023-09-19 14:17:02 -07:00
..
src Add type field to json diagnostic outputs 2023-09-19 14:17:02 -07:00
Cargo.toml Replace the many arguments of EmitterWriter::stderr with builder methods 2023-07-31 07:19:23 +00:00
messages.ftl Implement diagnostic translation for expected lifetime parameter message 2023-07-07 15:56:01 +09:00