-
Notifications
You must be signed in to change notification settings - Fork 263
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
Tolerate duplicate imports when creating components #2063
Comments
This sounds reasonable to me! The implementation will be somewhat complex/nontrivial though (but certainly manageable). The error comes from around here and the rough shape I think of a solving this would be:
Mutating the module's import section (and just the import section) can be mirrored after what |
I'll take a swing! |
Note to self: also keep in mind that imports can be inlined in function definitions. |
To clarify though @erikrose that's purely sugar in the wasm text format which |
Multiple imports of the same name are in-spec for core-wasm modules but not allowed for components. Currently, attempting to componentize a module with non-uniquely named imports yields…
We should pick a unique import of each name and ignore the rest when componentizing. Since inter-component linking is done solely by name, multiple same-named imports have no way of being distinguished in order to be satisfied individually—even if they had unique types, for example—and so nothing is lost by ignoring them.
The text was updated successfully, but these errors were encountered: