bytecodealliance / bytecodealliance/go-modules

wit-bindgen-go crashes with error-context type

Open
#411 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
148
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Generating Go bindings for any WIT that mentions `error-context` crashes with `BUG: unknown wit.Primitive *wit.ErrorContext`

**Steps-To-Reproduce**

```bash
go run ./cmd/wit-bindgen-go \
generate \
poc.wit
```

**poc.wit** (validated by `wasm-tools component wit`)

```plain
package demo:demo;

world demo {
export foo: func() -> error-context;
}
```

**Expected**

writes generated Go bindings successfully.

**Actual**

crashes with `panic: BUG: unknown wit.Primitive *wit.ErrorContext`.

**Environment**

ubuntu 22.04, x86-64, Go 1.24.3

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.