-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Not totally sure about the root cause, but I found a regression since v0.6.2. I used git bisect to find the first failing commit, which is 7d5ca44.
You can reproduce the issue with these 30 lines of Bash:
git checkout 7d5ca44
go build -o wit-bindgen-go ./cmd/wit-bindgen-go
mkdir -p wit-regression/deps/test:foo
cat > wit-regression/foo-wrapper.wit <<EOF
// This comment is important for triggering the failure.
package test:[email protected];
world foo-command {
import test:foo/custom;
}
EOF
cat > wit-regression/deps/test:foo/foo.wit <<EOF
package test:foo;
interface custom {
words: func(text: string) -> list<string>;
}
world the-world {
export custom;
}
EOF
mkdir -p build
./wit-bindgen-go generate ./wit-regression --world foo-command --package-root test/foo-wrapper/foocommand --out ./buildThis generates a simple WIT package that looks like this:
wit-regression
├── deps
│ └── test:foo
│ └── foo.wit
└── foo-wrapper.wit
Then tries to generate bindings at the failing commit, which should result in this error:
Generated WIT for custom section:
/// This comment is important for triggering the failure.
package test:[email protected];
package test:foo {
interface custom {
words: func(text: string) -> list<string>;
}
world test-foo-WORLD-the-world {
export custom;
}
}
error: wasm-tools: error: The main package `test:[email protected]` contains no worlds
Trying this after build from the prior commit works.
Metadata
Metadata
Assignees
Labels
No labels