wit async func wit2ts error
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript, wasm
- Domain
- tooling
Research direction
Reproduce the failure with [email protected] generate:model and the shown calculator WIT document. Start with the stack-trace locations in lib/tools/wit-json.js and lib/tools/wit2ts.js, especially isWorld and WorldExportFunctionEmitter. Done means the async world export no longer causes the generator to fail and TypeScript output is produced.
Written by the indexing model from the issue text.
Description
world calculator {
use types.{ operation, error-code };
import log: func(msg: string);
export calc: func(o: operation) -> result<u32, error-code>;
export get: async func() -> string;
}
[email protected] generate:model
wit2ts --outDir ./src ./wit
Debugger attached.
Failed to process document
TypeError: Cannot read properties of undefined (reading 'world')
at Object.isWorld (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit-json.js:146:29)
at SymbolTable.resolveOwner (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:702:30)
at WorldExportFunctionEmitter.getOwner (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:2789:60)
at new MemberEmitter (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:2767:27)
at new FunctionEmitter (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:2852:9)
at new WorldExportFunctionEmitter (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:2903:9)
at new (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:3684:13)
at WorldEmitter.build (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:2057:48)
at PackageEmitter.build (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:1889:21)
at DocumentEmitter.build (/Users/lamb/Downloads/vscode-extension-samples-main/wasm-component-model/node_modules/@vscode/wasm-component-model/lib/tools/wit2ts.js:1797:24)
- Dominant language
- TypeScript
- Stars
- 456
- Forks
- 40
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 3
Getting set up
We have not checked this project's setup files yet. 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 microsoft/vscode-wasm
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/vscode-wasm#249 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoft/vscode-wasm#244 · 2 reactions ·
-
feature-request
Difficulty 5/5 Over a week Newbie friendliness 28/100
microsoft/vscode-wasm#235 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 25/100
microsoft/vscode-wasm#217 · 3 comments · 2 reactions ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/vscode-wasm#212 ·
All issues in microsoft/vscode-wasm
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
StabilityNexus/Fate-EVM-Frontend#153 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
code-yeongyu/oh-my-openagent#9039 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Tencent/teamai-cli#862 ·
Maintainers usually reply within 1 day
-
bug good first issue hacktoberfest redis
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
libredb/libredb-studio#1164 ·
Maintainers usually reply within 1 day
-
flake
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day