You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When instantiating a component, it's probably safe to supply it with additional imports that aren't declared in its world. For example, consider a component that declares an import foo in its world but it doesn't use foo in its implementation. Consequently, foo won't be present in the component's WIT that is generated by witgen, which will cause a confusing unknown import error by wac. I think downgrading the error to a warning would be enough to let the user know about a potential logical error while allowing wac to run successfully.
The text was updated successfully, but these errors were encountered:
I'm also running into this issue. For languages with good dead code elimination like Rust the resulting component binary might not reflect the exact targeted world if the any imports are not used - those imports will simply be removed. It would be nice if supply imports that don't exist was simply a warning as supplying an import that doesn't exist is essentially a noop.
Of course, this will largely go away with a programatic API where the actual world of the component can be dynamically inspected and only imports it actually requires can be provided.
When instantiating a component, it's probably safe to supply it with additional imports that aren't declared in its world. For example, consider a component that declares an import
foo
in its world but it doesn't usefoo
in its implementation. Consequently,foo
won't be present in the component's WIT that is generated bywitgen
, which will cause a confusingunknown import
error bywac
. I think downgrading the error to a warning would be enough to let the user know about a potential logical error while allowingwac
to run successfully.The text was updated successfully, but these errors were encountered: