Difficult to know when to stop parsing JSON messages. #7978
Labels
A-json-output
Area: JSON message output
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Describe the problem you are trying to solve
It is currently difficult when parsing JSON messages to know when Cargo is finished. With
cargo test
orcargo run
, additional things will be printed to stdout. Tools should scan for lines that start with{
to detect JSON, but that doesn't help if the subsequent process also emits{
.Describe the solution you'd like
I think Cargo should emit some JSON message to indicate that it is finished. Tools can use this to know when to stop parsing. Or perhaps the message should be structured to indicate that Cargo is running an external process (with the path to the process). This may be complicated with tests since multiple tests will run (and would be good to have a story for how JSON test output works).
Either way, tools need some way to know when Cargo stops, and something else begins.
The text was updated successfully, but these errors were encountered: