Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2900 +/- ##
==========================================
+ Coverage 78.22% 78.27% +0.05%
==========================================
Files 72 72
Lines 42007 42123 +116
==========================================
+ Hits 32858 32972 +114
- Misses 9149 9151 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sylvestre
reviewed
Oct 11, 2026
sylvestre
reviewed
Oct 11, 2026
codeandsolder-git-wrangler
Bot
force-pushed
the
upstream-pr/rust-dist-toolchain-path-identity
branch
from
October 11, 2026 13:43
1abe22f to
9312728
Compare
Collaborator
|
Thanks for your PR |
codeandsolder-git-wrangler
Bot
deleted the
upstream-pr/rust-dist-toolchain-path-identity
branch
October 16, 2026 14:21
1 task done
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 distributed toolchain archives preserve the sysroot's filesystem layout, including absolute paths, but the Rust weak toolchain key currently only incorporates compiler shared-library digests.
As a result, two otherwise-identical Rust toolchains installed at different sysroot paths can share the same weak key even though their packaged toolchain archives are path-sensitive. A persisted dist-client "weak_map" can then select an archive produced from the wrong installation layout.
Include the resolved Rust sysroot path in the distributed-toolchain weak key.
This intentionally does not change the normal compilation cache key, so equivalent toolchains installed at different locations can continue sharing ordinary object-cache entries.
A version/domain marker is also included in the new weak-key derivation so previously persisted mappings are not reused after upgrading.
Why this belongs in sccache
rustup already resolves the active compiler correctly before this point. Cargo also does not own sccache's distributed-toolchain packaging or "weak_map".
The collision happens specifically in sccache's dist-client toolchain identity: the weak key chooses a previously packaged archive, while that archive contains path-sensitive Rust sysroot contents.
Testing
AI Disclosure: AI developed, human directed and reviewed