wac plug error: "error: encoding produced a component that failed validation"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the reported wac plug --plug types.wasm salutation.wasm -o tysal.wasm failure with the hotswap-example repository. Read the shown WIT user-interface, salutation, and app definitions alongside the component validation error. Done means the behavior around satisfying the imported interface and re-exporting its types is clarified and the reported composition either works or has a documented, actionable failure.
Written by the indexing model from the issue text.
Description
Repro
https://github.com/estk/hotswap-example
The error
wac plug --plug types.wasm salutation.wasm -o tysal.wasm
error: encoding produced a component that failed validation
Caused by:
instance not valid to be used as export (at offset 0x36d3bf)
Why this is surprising to me
Since the user-interface interface is local to the hotswap::salutation package and the plugged world types exports the user-interface interface, I would have thought that the imports were satisfied and that the underlying types in user-interface would be automatically re-exported.
WIT at a glance
In the salutation package we have the following:
package hotswap:[email protected];
interface salutation {
use user-interface.{user};
variant formal-honorific {
sir,
maam,
sir-maam,
custom(string)
}
get-formal-honorific: func(u: user) -> formal-honorific;
greet: func(u: user) -> string;
}
world app {
import user-interface;
export salutation;
}
...
interface salutation {
use user-interface.{user};
variant formal-honorific {
sir,
maam,
sir-maam,
custom(string)
}
get-formal-honorific: func(u: user) -> formal-honorific;
greet: func(u: user) -> string;
}
world app {
import user-interface;
export salutation;
}
- Dominant language
- Rust
- Stars
- 206
- Forks
- 42
- Avg merge
- 4d 9m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytecodealliance/wac
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
bytecodealliance/wac#219 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
bytecodealliance/wac#181 · 7 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
bytecodealliance/wac#170 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
bytecodealliance/wac#169 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
bytecodealliance/wac#166 · 1 comment ·
All issues in bytecodealliance/wac
Similar issues
-
enhancement user-priority/P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
element-hq/lk-jwt-service#248 ·
Maintainers usually reply within 1 day
-
agent:triaged bug bughunt pm:pipenv priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SocketDev/socket-patch#1219 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pact-foundation/pact-cli#154 ·
Maintainers usually reply within 3 days