`use` for `implements` interface
維護者通常 4 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 12/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- wasm
- 領域
- api
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- WebAssembly
- 星號
- 1.4k
- 分支
- 134
- 平均合併
- 3 天 19 小時
- 30 天內合併 PR
- 8
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
WebAssembly/component-model 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
WebAssembly/component-model#609 · 2 則留言 · 1 個 reaction ·
維護者通常 4 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
WebAssembly/component-model#769 · 1 則留言 ·
維護者通常 4 天內回覆
-
難度 5/5 一週以上 新手友好度 30/100
WebAssembly/component-model#765 · 1 則留言 ·
維護者通常 4 天內回覆
-
難度 4/5 3-5 天 新手友好度 45/100
WebAssembly/component-model#753 · 1 則留言 · 1 個 reaction ·
維護者通常 4 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
WebAssembly/component-model#752 · 13 則留言 · 1 個 reaction ·
維護者通常 4 天內回覆
查看 WebAssembly/component-model 的全部 Issue
相似的 Issue
-
api beginner story
難度 2/5 1-3 小時 新手友好度 78/100
NCSU-App-Development-Club/ios_fall_26#86 ·
維護者通常 4 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
digital-go-jp/abr-geocoder#457 ·
維護者通常 3 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
pearu/agent-sandbox#422 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
OpenPrinting/cups#1826 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆