Is there a way to import the same interface more than once in a single world? WIT doesn't seem to support external references that change the name of an imported/exported interface. Importing the same interface twice creates a name conflict.
I want to have a world like:
world merge-environments {
import wasi:cli/environment@0.2.0;
import wasi:cli/environment@0.2.0 as overlay;
export wasi:cli/environment@0.2.0;
}
As a work around, I can redefine the interface under a different name. The closest I can get today is:
world merge-environments {
import wasi:cli/environment@0.2.0;
import overlay: interface {
get-environment: func() -> list<tuple<string, string>>;
}
export wasi:cli/environment@0.2.0;
}
Currently this isn't possible, it requires the workaround you've outlined. Others have expressed interest for this feature however but I can't seem to find the issue in the upstream component-model repo right now
Thanks for the confirmation
Last updated: Dec 23 2024 at 13:07 UTC