A10: WitError -> ComponentException, {tag, val} -> {kind, value} - #114
Merged
Conversation
Contract amendment A10 (contracts/embedder-api.md): align the embedder
API's exception naming and variant-family discriminant shape with the
draft web embedding (WebAssembly/component-model PR #686) while the
consumer surface is still cheap to move. Semantics unchanged:
payloadless cases still omit `value`; case names stay kebab-case
verbatim; nested options box as { kind: "some", value } | { kind: "none" }.
Wire vocabulary is untouched: the brand key stays deltic.witError/1
(opaque constant, CEWD-style) so pre-A10 copies and hand-rolled brands
keep interoperating, and plan-format op discriminants (a different
contract) keep `tag`. The interpreter's internal single-key shapes are
likewise unchanged (embedder-api.md §Implementation strategy).
Mechanical sweep: protocol (class/predicate/identifier), runtime
embedder layer, bindgen codegen + regenerated fixtures, ct-runner,
wasi-shims, ports (websocket/webcrypto/webrtc), kitchen-sink,
release-bundle dual-copy test, current-state docs prose. Historical
records (milestones, smoke-c0 REPORT) deliberately untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contract amendment A10 (contracts/embedder-api.md), per the operator's call after evaluating WebAssembly/component-model#686: adopt the draft web embedding's exception naming and variant dictionary shape now, while the consumer surface is still cheap to move. If #686's shape holds, native support and this API agree for free.
Two renames, semantics identical:
WitError→ComponentException(isWitError→isComponentException); stillextends Error, still carries structuredpayload(noDOMExceptioninheritance — absent in the bare sm/jsc shell lanes; revisit if the draft stabilizes).{ tag, val }→{ kind, value }(variants, nested results, nested-option boxing). Payloadless cases still omitvalue; case names stay kebab-case verbatim. Deliberate divergence from jco's{tag, val}, superseding the v0.2 rationale.Wire vocabulary untouched:
deltic.witError/1(opaque constant, CEWD precedent) — pre-A10 copies and hand-rolled zero-import brands keep interoperating; the A9 dual-copy test still passes unmodified in behavior.tag(different contract); interpreter-internal single-key shapes unchanged.Consumer note: breaking API rename for polymorph host modules on their next deltic bump — mechanical (
s/WitError/ComponentException/,s/\.tag/\.kind/+s/\.val/\.value/on variant values). Migration notes section updated.Gates: full
just gatesgreen (build/test-rust, runtime 484/0, protocol, wasi-shims, ct-runner, bundle, ports, webrtc, conformance 1254/0, sched-seeds 1+4242, shells sm/node/bun, browsers chromium+firefox, websocket-conformance 55/0, smoke-tls, smoke-c0).