fix: merge disk cache environment overrides by field - #2785
Draft
Pybsama wants to merge 1 commit into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2785 +/- ##
==========================================
+ Coverage 74.32% 74.42% +0.09%
==========================================
Files 71 71
Lines 40789 40932 +143
==========================================
+ Hits 30318 30462 +144
+ Misses 10471 10470 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
SCCACHE_DIR,SCCACHE_CACHE_SIZE,SCCACHE_DIRECT, andSCCACHE_LOCAL_RW_MODEas field-level overridesRoot cause
Setting any local disk cache environment variable previously constructed a complete
DiskCacheConfig, filling every unset field with defaults.CacheConfigs::mergethen replaced the complete file-configured disk object, so an override such asSCCACHE_DIRsilently reset unrelated settings including cache size and nested preprocessor options.The change keeps local disk environment values separate until file and environment cache sources have been merged, then applies only fields that were explicitly set.
User impact
Users can combine a config file with local disk cache environment overrides without losing unrelated file settings.
Fixes #2753.
Validation
cargo test --locked --lib --bins --tests(492 passed, 1 ignored)cargo clippy --locked --all-targets -- -D warnings -A unknown-lints -A clippy::type_complexity -A clippy::new-without-defaultcargo fmt --all -- --checkgit diff --check