Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2918 +/- ##
==========================================
+ Coverage 78.15% 78.22% +0.07%
==========================================
Files 74 74
Lines 43324 43775 +451
==========================================
+ Hits 33861 34245 +384
- Misses 9463 9530 +67 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sylvestre
reviewed
Oct 19, 2026
sylvestre
reviewed
Oct 19, 2026
sylvestre
reviewed
Oct 19, 2026
rustc escapes backslashes, newlines and carriage returns in them. Keys change once for crates whose env-deps contain one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ghoulspa
force-pushed
the
basedirs-rust
branch
from
October 19, 2026 21:00
7bbd885 to
994db6a
Compare
sylvestre
reviewed
Oct 20, 2026
The cwd, the arguments, the CARGO_* variables and the env-dep values are hashed with the basedirs stripped, so a crate built from another checkout listed in SCCACHE_BASEDIRS is a hit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ghoulspa
force-pushed
the
basedirs-rust
branch
from
October 21, 2026 09:17
994db6a to
708c151
Compare
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.
The Rust implementation of the hasher doesn't respect
SCCACHE_BASEDIRScurrently. This PR adds support for the basedirs during the hashing process, by stripping the basedir from the working directory, the arguments, theCARGO_*variables and the env-dep values.Not respecting basedirs causes issues when using crates that use
OUT_DIR, such as serde, which miss the cache in every new checkout. Path dependency crates also miss the cache because ofCARGO_MANIFEST_DIRand the working directory, and every crate that depends on them misses as well, so this fixes that too. This also fixes env-dep values by unescaping them, since rustc doubles their backslashes and the strip wouldn't match otherwise.This change to the env-dep parser may cause new misses on Windows, once per crate, for anyone whose env-deps contain backslashes, such as serde's
OUT_DIR. For all other cache keys there will be no changes, except where you use the new basedirs support.We also added unit tests which check that the hash keys match when basedirs are in use and differ when they aren't, plus a few edge cases, and an integration test that builds with cargo from two checkouts.
Fixes #2870