Skip to content

Don't depend on vfstest for transpile - #64009

Merged
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:transpile-production-vfs
Aug 25, 2026
Merged

Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:transpile-production-vfs

Conversation

@jakebailey

Copy link
Copy Markdown
Member

The transpile package used the test FS as a VFS, but this brings in all of the testing code.

Use a local FS for this instead, which saves something like 100KB of binary.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Replaces the test-only virtual filesystem dependency with a lightweight transpilation filesystem to reduce binary size.

Changes:

  • Removes the vfstest dependency.
  • Adds a map-backed filesystem for synthesized input and library files.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tsc/internal/transpile/transpile.go Uses the local transpilation filesystem.
tsc/internal/transpile/fs.go Implements required filesystem operations.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread tsc/internal/transpile/fs.go Resolved
Comment thread tsc/internal/transpile/fs.go Resolved
@andrewbranch

Copy link
Copy Markdown
Member

Ah, I had a fix for this locally, but mine is broader than it needs to be. I didn't think about how little of a FS surface transpile needs.

If you fix the Copilot comments, I'll see if I can make module resolution not occur at all in a follow-up.

@jakebailey

Copy link
Copy Markdown
Member Author

Fixed them, with tests

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Aug 25, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Aug 25, 2026
Merged via the queue into microsoft:main with commit e533f4c Aug 25, 2026
25 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the transpile-production-vfs branch August 25, 2026 20:36
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Aug 25, 2026
@jakebailey Jake Bailey (jakebailey) added the Domain: Performance Performance related label Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Domain: Performance Performance related

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants