fix: refuse to trim rlibs without a sibling .rmeta#2685
Open
coredoesdev wants to merge 1 commit intomozilla:mainfrom
Open
fix: refuse to trim rlibs without a sibling .rmeta#2685coredoesdev wants to merge 1 commit intomozilla:mainfrom
coredoesdev wants to merge 1 commit intomozilla:mainfrom
Conversation
`can_trim_this` erroneously trims rlibs that lack a .rmeta file (which can occur in some instances when cross-compiling to wasm) causing compilation failures on the remote server; updates `can_trim_this` to refuse to trim rlibs that do not have associated metadata. related to 1760743 (similar mode of failure), reproducible by trying to compile `tracing_wasm`
sylvestre
requested changes
Apr 28, 2026
Collaborator
sylvestre
left a comment
There was a problem hiding this comment.
please add a test to make sure we don't regress in the future
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2685 +/- ##
===========================================
- Coverage 73.58% 60.69% -12.90%
===========================================
Files 70 69 -1
Lines 38220 37475 -745
===========================================
- Hits 28125 22746 -5379
- Misses 10095 14729 +4634 ☔ View full report in Codecov by Sentry. 🚀 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.
Fixes a Rust distributed compilation failure where
.rlibs lacking a sibling.rmetaare trimmed to a metadata-only stub that the remote rustc cannot read, leading toextern location for <crate> does not existerrors. Similar mode of failure to https://bugzilla.mozilla.org/show_bug.cgi?id=1760743.Reproducible while trying to compile tracing_wasm from a Linux client.
Extends the fix from 1760743: updates
can_trim_thisto refuse to trim rlibs that do not have associated metadata files (so that something is sent to the remote rustc). Resolves the tracing_wasm compilation failures in testing on my team's cluster.