Add `$message_type` field to distinguish 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`: Future incompatibility report `unused_extern`: Unused crate warnings/errors This matches the "internally tagged" representation for serde enums. |
||
|---|---|---|
| .. | ||
| json | ||
| markdown | ||
| annotate_snippet_emitter_writer.rs | ||
| diagnostic.rs | ||
| diagnostic_builder.rs | ||
| diagnostic_impls.rs | ||
| emitter.rs | ||
| error.rs | ||
| json.rs | ||
| lib.rs | ||
| lock.rs | ||
| registry.rs | ||
| snippet.rs | ||
| styled_buffer.rs | ||
| tests.rs | ||
| translation.rs | ||