Skip to content

Commit

Permalink
Auto merge of #14677 - weihanglo:message-format, r=epage
Browse files Browse the repository at this point in the history
docs: tools should only interpret a line starting with `{` as JSON
  • Loading branch information
bors committed Oct 12, 2024
2 parents de128be + 402cb17 commit 82c489f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/doc/src/reference/external-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ The `package_id` field is a unique identifier for referring to the package, and
as the `--package` argument to many commands. The syntax grammar can be found in
chapter [Package ID Specifications].

> **Note:** `--message-format=json` only controls Cargo and Rustc's output.
> This cannot control the output of other tools,
> e.g. `cargo run --message-format=json`,
> or arbitrary output from procedural macros.
> A possible workaround in these situations is to only interpret a line as JSON if it starts with `{`.
The `--message-format` option can also take additional formatting values which
alter the way the JSON messages are computed and rendered. See the description
of the `--message-format` option in the [build command documentation] for more
Expand Down

0 comments on commit 82c489f

Please sign in to comment.