-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Annotate "Compiling X" status lines with active features #16942
Copy link
Copy link
Open
Labels
A-console-outputArea: Terminal output, colors, progress bar, etc.Area: Terminal output, colors, progress bar, etc.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.Z-build-analysisNightly: build-analysisNightly: build-analysis
Metadata
Metadata
Assignees
Labels
A-console-outputArea: Terminal output, colors, progress bar, etc.Area: Terminal output, colors, progress bar, etc.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.Z-build-analysisNightly: build-analysisNightly: build-analysis
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
Developers of systems that invoke
cargo buildmultiple times are sometimes surprised to see the same dependencies show up repeatedly. "Why isn't Rust caching these" I have heard many times.There are many reasons this can happen, but one is especially insidious: different feature-sets for the given dependency, which leads to the previous build artifact not being reusable for the current context.
Proposed Solution
My suggestion is that we actually make
Compiling Xinclude (in addition to its current output), the feature set that it is being built with.Once you know that this is the problem, you can investigate it via
cargo treeand such.By including that information, people will be able to more immediately see why a crate is being rebuilt.
Concretely, today:
With this proposal:
Even just having it as an opt-in via an env var would be enough to allow quick investigations. E.g. something like
CARGO_TERM_COMPILING_FEATURE_SET, analogous to flags likeCARGO_TERM_PROGRESS_WHEN. (I suggest an env var specifically because I would like to have access to this in wrappers aroundcargorather than be forced to achieve it via flags like--message-format.)Notes
No response