Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generating shims with duplicate names #1851

Merged

Conversation

alexcrichton
Copy link
Member

This fixes an issue with the semver-merging logic of wit-component where during the componentization process due to
insertion-with-replacement behavior the same name could be assigned to two different shims (as shim names are based on the map length which wouldn't change if a replacement was inserted). The fix in this commit is to avoid replacement and prefer the original name when a shim is inserted.

Closes #1850

This fixes an issue with the semver-merging logic of `wit-component`
where during the componentization process due to
insertion-with-replacement behavior the same name could be assigned to
two different shims (as shim names are based on the map length which
wouldn't change if a replacement was inserted). The fix in this commit
is to avoid replacement and prefer the original name when a shim is inserted.

Closes bytecodealliance#1850
@alexcrichton alexcrichton added this pull request to the merge queue Oct 8, 2024
Merged via the queue into bytecodealliance:main with commit 3b47230 Oct 8, 2024
60 checks passed
@alexcrichton alexcrichton deleted the fix-duplicate-exports branch October 8, 2024 14:39
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.

duplicate export name 57 already defined when importing multiple semver versions
2 participants