bytecodealliance / bytecodealliance/wasm-tools

wit: unexpected error when referencing the package itself in exports

Open
#1,809 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.