Skip to content

dist: refuse to trim rlibs from crates that also emit a cdylib - #2839

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
gaetschwartz:fix/trim-rlib-with-cdylib-sibling
Sep 14, 2026
Merged

sylvestre merged 1 commit into
mozilla:mainfrom
gaetschwartz:fix/trim-rlib-with-cdylib-sibling

Conversation

@gaetschwartz

Copy link
Copy Markdown
Contributor

Same as #1158, for crate-type = ["cdylib", "rlib"]:

error: extern location for tracing_wasm does not exist:
  .../deps/libtracing_wasm-46900c27e2513c49.rlib

#1159 only refuses to trim next to a .a. Any linkable sibling now blocks
trimming, matched with and without the lib prefix (libfoo.so, foo.wasm).

test_can_trim_this covers both.

mozilla#1159 only guards the staticlib case; a cdylib sibling is .so/.dylib/.dll/.wasm,
so the rlib is trimmed and the job fails on the build server.
@codecov-commenter

codecov-commenter commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 75.79%. Comparing base (036fc5c) to head (4f97cb0).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/rust.rs 96.42% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2839      +/-   ##
==========================================
+ Coverage   73.80%   75.79%   +1.98%     
==========================================
  Files          72       72              
  Lines       38050    39232    +1182     
==========================================
+ Hits        28084    29737    +1653     
+ Misses       9966     9495     -471     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sylvestre
sylvestre merged commit 37b638a into mozilla:main Sep 14, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants