Skip to content

Conversation

@alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Nov 1, 2025

This commit fixes an accidental regression from #144678 where wasm targets would now accidentally use the wrong import module map for a symbol causing a symbol to skip mangling. This can result in compilation failures when symbols are used in cross-crate situations.

Closes #148347

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 1, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 1, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

This commit fixes an accidental regression from 144678 where wasm
targets would now accidentally use the wrong import module map for a
symbol causing a symbol to skip mangling. This can result in compilation
failures when symbols are used in cross-crate situations.

Closes 148347
@posborne
Copy link
Contributor

posborne commented Nov 1, 2025

I built this and verified that it now works as expected for both the smaller examples shared as well as for some larger projects that had previously encountered a large number of linker errors.

@alexcrichton
Copy link
Member Author

It looks like we found some more issues as a result of this bug, namely a runtime issue so this isn't just a build failure. Given that I'd like to propose this get backported to beta at least, so I'm going to attempt to beta nominate this. Haven't done this in awhile...

@rustbot beta-nominate compiler

This is not something I'd ask for a stable backport of, but if a stable point release is already going out I wouldn't mind trying to champion trying to get this in there. I'll sort that out if/when this is accepted for a beta backport.

@rustbot
Copy link
Collaborator

rustbot commented Nov 1, 2025

Error: The feature nominate is not enabled in this repository.
To enable it add its section in the triagebot.toml in the root of the repository.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@alexcrichton alexcrichton added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 1, 2025
@alexcrichton
Copy link
Member Author

alexcrichton commented Nov 1, 2025

I've probably abused my priviledges and manually added the label here, please teach me the error of my ways if that is uncouth.

@jieyouxu
Copy link
Member

jieyouxu commented Nov 2, 2025

I've probably abused my priviledges and manually added the label here, please teach me the error of my ways if that is uncouth.

(This is perfectly fine, the triagebot invocation is just @rustbot label +beta-nominated, or since you have write permissions, you can just add a label like you did :) This will create a beta-backport nomination zulip thread #t-compiler/backports > #148363: beta-nominated where compiler team members can vote or discuss. They will be discussed during the next compiler triage meeting. This is obviously still being experimented with to see if we can make it smoother.)

@alexcrichton
Copy link
Member Author

@rustbot label +stable-nominated

Some discussion at #t-compiler/backports > #148363: beta-nominated @ 💬 and it sounds like it's ok to tag this as stable-nominated but also to be clear that this alone, in my opinion, doesn't justify a point release on its own. If one's already going out I think this would be reasonable to include, however.

@rustbot rustbot added the stable-nominated Nominated for backporting to the compiler in the stable channel. label Nov 3, 2025
@jackh726
Copy link
Member

jackh726 commented Nov 3, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 3, 2025

📌 Commit 93fef45 has been approved by jackh726

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 3, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 3, 2025
…=jackh726

Fix `wasm_import_module` attribute cross-crate

This commit fixes an accidental regression from rust-lang#144678 where wasm targets would now accidentally use the wrong import module map for a symbol causing a symbol to skip mangling. This can result in compilation failures when symbols are used in cross-crate situations.

Closes rust-lang#148347
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 3, 2025
…=jackh726

Fix `wasm_import_module` attribute cross-crate

This commit fixes an accidental regression from rust-lang#144678 where wasm targets would now accidentally use the wrong import module map for a symbol causing a symbol to skip mangling. This can result in compilation failures when symbols are used in cross-crate situations.

Closes rust-lang#148347
@wesleywiser
Copy link
Member

@bors p=1

Fixes high-priority issue, beta and stable backport nominated PR

bors added a commit that referenced this pull request Nov 3, 2025
Rollup of 7 pull requests

Successful merges:

 - #147141 (Suggest making binding `mut` on `&mut` reborrow)
 - #147945 (Port `cfg!()` macro to the new attribute parsing system )
 - #147951 (Add check for `+=` typo in let chains)
 - #148004 (fix: Only special case single line item attribute suggestions)
 - #148264 (reflect that type and const parameter can be intermixed)
 - #148363 (Fix `wasm_import_module` attribute cross-crate)
 - #148447 (Tweak E0401)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-nominated Nominated for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. stable-nominated Nominated for backporting to the compiler in the stable channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wasm Linker "module mismatch for symbol" Regression in 1.91.0

7 participants