Skip to content

Mismatch in stability attributes error in wit-parser when using Unstable attribute in wit #1995

Description

@jsturtevant

When a new interface is marked as @unstable (feature = somefeaturegate) and it uses a stable type from another package via use package:interface/type.{name} the resulting package can't be imported into other packages that use it. The resulting error is:

wasm-tools component wit --features tls ./wit/
error: mismatch in stability attributes

example

I've demonstrated this by adding a test: jsturtevant@4495325

As well as trying to integrate it into another world: https://github.com/WebAssembly/wasi-cli/compare/main...jsturtevant:wasi-cli:wasi-tls-example?expand=1 (note that this was just a test to see if I was getting in the a set up similiar to other imports)

I was getting this original from wit-bindgen macro: https://github.com/bytecodealliance/wit-bindgen/tree/main?tab=readme-ov-file#supported-guest-languages

workaround

for now I've patched wit-parser like jsturtevant@22cfe2e but it seems like there is probably a better way to approach?

Metadata

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