Skip to content

fix: report unknown parents instead of panicking - #64

Open
matthargett wants to merge 1 commit into
wasi-gfx:mainfrom
rebeckerspecialties:fix/unknown-parent
Open

matthargett wants to merge 1 commit into
wasi-gfx:mainfrom
rebeckerspecialties:fix/unknown-parent

Conversation

@matthargett

@matthargett matthargett commented Oct 31, 2026 •

Copy link
Copy Markdown

An interface or dictionary that inherits from a type absent from the input, as happens whenever one specification's IDL is converted on its own, made handle_resource_inheritance and handle_record_inheritance unwrap a missing lookup and panic. The lookup now follows HandleUnsupported: Bail returns an error naming the child and the missing parent, and Skip/Warn leave the child without the inherited members and without the as-* conversion for that parent. The unknown-parent fixture covers resource and record inheritance under Warn, and a test asserts that the default Bail mode returns an error.

Ran into this while making a WebXR on WebGPU-derived WASI module

Fixes #55

An interface or dictionary that inherits from a type absent from the input
(declared by another specification) made `handle_resource_inheritance` and
`handle_record_inheritance` unwrap a missing lookup and panic. The lookups
now follow `HandleUnsupported`: `Bail` returns an error naming the child
and the missing parent, `Skip` and `Warn` leave the child without the
inherited members and without the `as-*` conversions for that parent.

Fixes wasi-gfx#55.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic if find parent fails

1 participant