Skip to content

fix(bindgen): deconflict instantiation helper locals from WIT import names - #2135

Open
GreenBusDriver wants to merge 1 commit into
bytecodealliance:mainfrom
GreenBusDriver:fix/bindgen-instantiation-helper-name-collision
Open

GreenBusDriver wants to merge 1 commit into
bytecodealliance:mainfrom
GreenBusDriver:fix/bindgen-instantiation-helper-name-collision

Conversation

@GreenBusDriver

@GreenBusDriver GreenBusDriver commented Sep 19, 2026

Copy link
Copy Markdown

Addresses #2134
The instantiate() / $init helper hard-coded its locals (promise,
resolve, reject, gen, runNext, ...) as literal text, so a component
importing a WIT function with one of those names produced JS that fails to
load with Identifier 'reject' has already been declared.

Allocate the helper locals through LocalNames like every other generated
binding, so the collision is resolved as reject$1 automatically.

Zulip link: #jco > reject/resolve import name collision w instantiation helper @ 💬

@GreenBusDriver GreenBusDriver changed the title fix(bindgen): deconflict instantiation helper locals from WIT import names #2134 fix(bindgen): deconflict instantiation helper locals from WIT import names Sep 19, 2026
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.

1 participant