Skip to content

wit: unexpected error when referencing the package itself in exports  #1809

Open
@Mossaka

Description

Consider this 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:

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions