jrandolf opened issue #14855:
bindgen!fails to compile a world that imports an interface both directly and under a label:world w { import store; import a: store; }error[E0428]: the name `store` is defined multiple timesIt fails in either order, when the direct import is implicit through a
use, and for realistic WASI worlds likeinclude wasi:cli/imports@0.3.0; import a: wasi:cli/environment@0.3.0;. Worlds with only labelled imports compile fine. The WIT is valid (wit-component has an encoding test for this exact shape).The labelled branch in
crates/wit-bindgen/src/lib.rs(~518-535) generates the interface module at the interface's own path, and the plain branch doesn't check whether that already happened, so the module is generated twice.
alexcrichton added the wasm-proposal:component-model-implements label to Issue #14855.
alexcrichton closed issue #14855:
bindgen!fails to compile a world that imports an interface both directly and under a label:world w { import store; import a: store; }error[E0428]: the name `store` is defined multiple timesIt fails in either order, when the direct import is implicit through a
use, and for realistic WASI worlds likeinclude wasi:cli/imports@0.3.0; import a: wasi:cli/environment@0.3.0;. Worlds with only labelled imports compile fine. The WIT is valid (wit-component has an encoding test for this exact shape).The labelled branch in
crates/wit-bindgen/src/lib.rs(~518-535) generates the interface module at the interface's own path, and the plain branch doesn't check whether that already happened, so the module is generated twice.
Last updated: Oct 31 2026 at 23:03 UTC