Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo … --message-format json should tell you when it starts compiling a cate. #12864

Closed
bend-n opened this issue Oct 22, 2023 · 1 comment
Closed
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` S-triage Status: This issue is waiting on initial triage.

Comments

@bend-n
Copy link

bend-n commented Oct 22, 2023

Problem

cargo build --message-format json will have output such as:

// stdout: (none)
// stderr:
Compiling png
// stdout:
{"reason":"compiler-artifact","package-id":"png 0.17.0"} // compilation finishes

There is no way to see when png starts compiling.
The only way to find out, is to parse stderr, which also doesnt give you the full version information + manifest + etc

Proposed Solution

cargo build --message-format json will have output such as:

{"reason":"begin-compile-crate","package_id":"png 0.17.0","target":"","features":[],"executable":null,"profile":""}
{"reason":"compiler-artifact","package-id":"png 0.17.0"}
@bend-n bend-n added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Oct 22, 2023
@epage epage added the A-json-output Area: JSON message output label Oct 22, 2023
@weihanglo
Copy link
Member

Thanks for the report. The story of Cargo its own JSON message output is tracked in #8283. I'll compile them together in #8283 and close this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants