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
{{ message }}
Repository navigation
Nested package ... { ... } blocks are resolved from a registry #263
A WIT file may define packages inline with nested package ... { ... } blocks. WIT.md says they "simply provide the contents of other packages inline so that they don't have to be otherwise resolved via the filesystem or a registry". wkg resolves them from a registry anyway.
wasm-tools component wit wit accepts it. wkg fetch fails:
Error: failed to fetch dependencies for wit
Caused by:
0: package: local:types
1: no registry configured for namespace "local"
wkg build and wkg publish fail the same way, and so does wkg fetch in a workspace, which builds every member first. With a registry configured for the namespace, or a default registry, wkg tries to pull local:types from it instead. A path override pointing at wit does not help: the packages of the local dependency are collected again, the nested one among them.
Cause: get_packages in crates/wasm-pkg-core/src/wit.rs collects the foreign deps of the main package and of the nested ones, but does not leave out the packages the group defines itself. Fixing only that is not enough: for WIT output, populate_dependencies prints every package of the resolve except the root into deps/, the nested ones included, and the next parse fails: the package "is defined in two different locations".
Activity