Open BERADQ opened 2 hours ago
// omit ... linker .define_unknown_imports_as_traps(&component_a) .unwrap(); let ins_a = linker.instantiate_pre(&component_a).unwrap(); let ins_a = ins_a.instantiate(store_a.as_context_mut())?; linker .define_unknown_imports_as_traps(&component_b) .unwrap(); let ins_b = linker.instantiate_pre(&component_b).unwrap(); let ins_b = ins_b.instantiate(store_b.as_context_mut())?;
The method should handle multiple calls without causing duplicate definitions for any module.
The method results in a duplicate definition error for the wasi module.
map entry `wasi:cli/environment@0.2.0` defined twice
Wasmtime version or commit: 26.0.1
Operating system: Windows11 22631.4391
Architecture: rustc 1.84.0-nightly (a93c1718c 2024-10-24)
Possible Solutions:
Exclude Specific Entries: Modify the method to exclude specific entries like wasi from being redefined.
wasi
I think it's not a bug at all, but I can't handle it by myself.
allowing_shadowing makes all shadowing legal, which is not very good.
allowing_shadowing
Test Case
Steps to Reproduce
Expected Results
The method should handle multiple calls without causing duplicate definitions for any module.
Actual Results
The method results in a duplicate definition error for the wasi module.
map entry `wasi:cli/environment@0.2.0` defined twice
Versions and Environment
Wasmtime version or commit: 26.0.1
Operating system: Windows11 22631.4391
Architecture: rustc 1.84.0-nightly (a93c1718c 2024-10-24)
Extra Info
Possible Solutions:
Exclude Specific Entries: Modify the method to exclude specific entries like
wasi
from being redefined.I think it's not a bug at all, but I can't handle it by myself.