`use` for `implements` interface
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- wasm
- Domain
- api
Research direction
The reproduction is the WIT example in the issue: an implements rename of response leaves wrapped-response.request pointing at the imported types.request instead of wrapped-types.request. Start by working out whether the spec defines implements to rewrite use-referenced types, and by checking the component-model specification text on use and implements. Done means a maintainer decision on the intended semantics, and possibly a proposed syntax such as with { types: wrapped-types }. This is spec design work, not a first-time code change.
Written by the indexing model from the issue text.
Description
Consider this WIT file, where I want to virtualize response into wrapped-response.
interface types {
resource request;
}
interface response {
use types.{request};
send: func(r: request) -> request;
}
world w {
import types;
import response;
export wrapped-types: types;
export wrapped-response: response;
}
The implements rename only happen at the surface level: wrapped-response.request still points to the imported types.request, not wrapped-types.request, which means request cannot be virtualized with just implements.
I can manually duplicate the interfaces and rename them, and not using the implements feature. Just wondering if implements is supposed to work with this kind of virtualization use case. If so, maybe we want to extend the syntax to something like export wrapped-response: response with { types: wrapped-types }.
Another limitation is that we can't write use wrapped-types.{request} in WIT, because wrapped-types is a label, so there is no way to refer to the virtualized wrapped-types.{request} by hand either.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 134
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 8
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 WebAssembly/component-model
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
WebAssembly/component-model#609 · 2 comments · 1 reaction ·
Maintainers usually reply within 4 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
WebAssembly/component-model#769 · 1 comment ·
Maintainers usually reply within 4 days
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
WebAssembly/component-model#765 · 1 comment ·
Maintainers usually reply within 4 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
WebAssembly/component-model#753 · 1 comment · 1 reaction ·
Maintainers usually reply within 4 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
WebAssembly/component-model#752 · 13 comments · 1 reaction ·
Maintainers usually reply within 4 days
All issues in WebAssembly/component-model
Similar issues
-
bug python
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
traceloop/openllmetry#4717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agentes-chat/agentes-chat#927 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
geocaml/ocaml-tiff#194 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
The-Pocket/PocketFlow#161 ·