microsoft / microsoft/vscode-wasm

Readable types are incorrect

Open
#121 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
456
Forks
40
Avg merge
3d 2h
Merged PRs (30d)
4

Description

As a follow up to #119, I discovered that the Readable stream's data is not always a Uint8Array, but is sometimes a SharedArrayBuffer. I believe this occurs when running an extension in the browser.

This is a problem because you can't TextDecoder#decode a SharedArrayBuffer, so my shims needed to copy the contents into a new Uint8Array before passing them onward.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file or test; begin by reviewing #119 and tracing the Readable stream data type through the browser extension path. Reproduce the SharedArrayBuffer case and check how it reaches TextDecoder#decode. Done means the reported type and runtime behavior accurately cover this case, with a regression test or documented reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.