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

Don't panic on duplicate imports when creating components #1787

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

alexcrichton
Copy link
Member

Return an error instead since that's more appropriate in this context.

Closes #1786

Return an error instead since that's more appropriate in this context.

Closes bytecodealliance#1786
Copy link
Collaborator

@dicej dicej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any tools we can recommend to the user to merge those duplicates?

@alexcrichton
Copy link
Member Author

Unfortunately not at this time. Sometimes it can be handled like in this tests's case where the imported item is the same, but it's also valid to import the same name as a func and then a global for example, and that can't necessarily be handled automatically and probably require source toolchain changes.

@alexcrichton alexcrichton added this pull request to the merge queue Sep 13, 2024
Merged via the queue into bytecodealliance:main with commit fb403c3 Sep 13, 2024
30 checks passed
@alexcrichton alexcrichton deleted the error-not-panic branch September 13, 2024 16:15
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.

wit-component: Component validation panics on duplicate imports
2 participants