bytecodealliance / bytecodealliance/wasm-tools
wit: unexpected error when referencing the package itself in exports
Open
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 351
- Avg merge
- 16h 57m
- Merged PRs (30d)
- 38
Description
Consider this WIT:
```wit
package example:name;
world only-exports {
export example:name/exports;
export exports: interface {
foo: func();
}
}
```
However, when processing this with wasm-tools, it throws the following error:
```bash
error: package depends on itself
--> testdata/issues/issue170.wit:8:10
|
8 | export example:name/exports;
| ^-----------
```
**Expected Behavior**: The interface name with the `WorldKey` should reference the first export without throwing an error.
Contributor guide
Assessment
This issue has not been assessed yet.