Skip to content

wit-component: deduplicate missing function stubs - #2859

Open
ricochet wants to merge 1 commit into
bytecodealliance:mainfrom
ricochet:codex/fix-duplicate-weak-import-stubs
Open

ricochet wants to merge 1 commit into
bytecodealliance:mainfrom
ricochet:codex/fix-duplicate-weak-import-stubs

Conversation

@ricochet

@ricochet ricochet commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Linking libraries that import the same unresolved weak function creates duplicate exports in the generated stubs module and panics during validation.

Reuse one stub when the signatures match, and return an error when they conflict. The two tests cover successful linking of matching imports and an error for incompatible signatures.

@ricochet
ricochet marked this pull request as ready for review December 4, 2026 02:41
@ricochet
ricochet requested a review from a team as a code owner December 4, 2026 02:41
@ricochet
ricochet requested review from pchickey and removed request for a team December 4, 2026 02:41
@alexcrichton

Copy link
Copy Markdown
Member

Thanks! Could the test here be modeled in crates/wit-component/tests/components/*?

@alexcrichton
alexcrichton requested review from alexcrichton and removed request for pchickey December 4, 2026 15:44

This branch has not been deployed

No deployments
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.

2 participants