Streams should implement vscode-jsonrpc's `_ReadableStream` and `_WritableStream` interfaces
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start with the library's Readable and Writable implementations and compare their public behavior with the _ReadableStream and _WritableStream definitions in the issue. Verify that they can be passed directly to vscode-jsonrpc's ReadableStreamMessageReader and WriteableStreamMessageWriter without stubs, including close, error, end, and write behavior.
Written by the indexing model from the issue text.
Description
After seeing @dbaeumer's talk at WasmCon, I was inspired to compile the Noir LSP to WASI and hook it as the server component via the vscode-wasm harness. The current progress is available at https://github.com/noir-lang/vscode-noir/pull/41
One of the workarounds I needed to do was stubbing the following interfaces:
interface _ReadableStream {
onData(listener: (data: Uint8Array) => void): Disposable;
onClose(listener: () => void): Disposable;
onError(listener: (error: any) => void): Disposable;
onEnd(listener: () => void): Disposable;
}
interface _WritableStream {
onClose(listener: () => void): Disposable;
onError(listener: (error: any) => void): Disposable;
onEnd(listener: () => void): Disposable;
write(data: Uint8Array): Promise<void>;
write(data: string, encoding: _MessageBufferEncoding): Promise<void>;
end(): void;
}
This allows me to use the Readable and Writable provided by this library as streams for ReadableStreamMessageReader and WriteableStreamMessageWriter. If this library implemented those interfaces, these streams could be used directly without any stubs.
- 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 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoft/vscode-wasm#240 ·
-
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 ·
All issues in microsoft/vscode-wasm
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
supabase/agent-skills#611 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
polka-codes/test#345 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
GoogleChromeLabs/project-sesame#217 ·
Maintainers usually reply within 12 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
solana-foundation/solana-com#2202 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100