Skip to content

wit-bindgen-go crashes with error-context type #411

@kavoc-brown

Description

@kavoc-brown

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

Steps-To-Reproduce

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

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

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

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