Skip to content

fix Pyrefly extension not supported for VSCode "browser" mode (vscode.dev) #2240 - #5446

Open
asukaminato0721 wants to merge 6 commits into
meta:mainfrom
asukaminato0721:2240
Open

asukaminato0721 wants to merge 6 commits into
meta:mainfrom
asukaminato0721:2240

Conversation

@asukaminato0721

Copy link
Copy Markdown
Collaborator

Summary

Fixes #2240

continue of #2460

  • I am a human, and I fully understand the code I am submitting.

Test Plan

add test

@meta-codesync

meta-codesync Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D128251235. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

This comment has been minimized.

Browser builds cannot use the native filesystem URL conversion.
Encode virtual POSIX paths as file URIs and retain native conversion
on desktop targets.
Browser clients need cross-file locations, LSP completion edits, and
import requests that do not depend on diagnostic text. Extend the
in-memory APIs while retaining the existing playground interface.

Use the Rust TOML parser and preserve the session Python version when
configuration has no version. Cover these contracts with Rust tests.
Publish hashes after both generated artifacts are complete. Consumers
can reject stale bindings instead of combining incompatible builds.
Allow builds without the optional binary optimization step.
Add a browser entry point and worker backed by the WASM APIs. Read
dependencies through the host filesystem service without scanning
the workspace. Isolate workspace state and retain original document
URIs while converting protocol positions to UTF-16.

Bundle validated WASM inputs in normal and watch builds. Keep browser
types separate from desktop types and provide a web launch task.
Exercise the real worker and WASM bundle to detect protocol, Unicode,
workspace isolation, import lifecycle, and version regressions.

Check matching assets in normal and watch builds. Validate VSIX
contents and run language-client conversion and completion acceptance
in a real browser host.
Generate WASM inputs before packaging so release artifacts include a
usable browser server. Validate the browser VSIX and run its host test
in CI. Document local builds, test commands, and support boundaries.
@github-actions

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants