-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Collect warnings for path dependencies into one message printed at the end #8749
Copy link
Copy link
Open
Labels
A-console-outputArea: Terminal output, colors, progress bar, etc.Area: Terminal output, colors, progress bar, etc.A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-console-outputArea: Terminal output, colors, progress bar, etc.Area: Terminal output, colors, progress bar, etc.A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Describe the problem you are trying to solve
In workspaces, especially very large workspaces, warnings are scattered around the output:
This makes it hard to see all the warnings; if there are enough crates being built they may disappear off the screen entirely and you might not see them at all.
Describe the solution you'd like
Cargo should print a sum of all the warnings at once:
warning: 43 warnings emitted for all path dependencies. Since it uses--error-format=json --json=diagnostic-rendered-ansithis should be ~fairly easy to calculate from the rustc diagnostics, but don't quote me on that ;)Ideally this wouldn't print warnings per-crate, just per-compile. However I'd rather have too much output than too little.
Notes
@joshtriplett suggested something like this in rust-lang/rust#77492 (comment), so I have a strong motivation to work on it myself if someone can write up mentoring instructions :)