Repository navigation
stats: expose non-cacheable Rust crate types - #2897
Open
codeandsolder wants to merge 2 commits into
Open
codeandsolder wants to merge 2 commits into
codeandsolder wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2897 +/- ##
==========================================
+ Coverage 78.18% 78.23% +0.05%
==========================================
Files 72 72
Lines 41946 42048 +102
==========================================
+ Hits 32795 32897 +102
Misses 9151 9151 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sylvestre
reviewed
Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rust's argument parser already attaches the specific non-cacheable crate type to
CompilerArguments::CannotCache("crate-type", ...), but server statistics discard that detail and record every case ascrate-type.Keep the existing
not_cachedstatistics map and include the detail in its key for this reason, for examplecrate-type (bin)andcrate-type (proc-macro). Other non-cacheable reasons are unchanged.When rustc supplies multiple unsupported crate types, sort them before recording the detail so the statistic key is deterministic regardless of input order.
This avoids adding a new serialized statistics field or otherwise changing the statistics schema.
Testing
cargo +1.99.0 fmt --all -- --checkcargo +1.99.0 test --locked --no-default-features --lib non_cacheable_crate_typecargo +1.99.0 test --locked --no-default-features --lib test_print_non_cacheable_crate_type_detailsAI Disclosure: AI developed, human directed and reviewed