Skip to content

Use ts-go for building our extensions#292461

Merged
mjbvz merged 4 commits intomainfrom
dev/mjbvz/ext-ts-go
Feb 3, 2026
Merged

Use ts-go for building our extensions#292461
mjbvz merged 4 commits intomainfrom
dev/mjbvz/ext-ts-go

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Feb 3, 2026

Fixes #271167

Also reverts to use experimental decorators due to stage 3 decorators not being supported yet microsoft/typescript-go#2354

The skipLib check is needed to work around some jsdom types issues

We can also consider removing the transpile option after this since the extension build is ~500ms even without a build cache

Also reverts to use experimental decorators due to stage 3 decorators not being supported yet microsoft/typescript-go#2354

The skipLib check is needed to work around some jsdom types issues
Copilot AI review requested due to automatic review settings February 3, 2026 04:07
@mjbvz mjbvz marked this pull request as draft February 3, 2026 04:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR transitions the VS Code extensions build system from using TypeScript's stage 3 decorators to experimental decorators and replaces the existing TypeScript compilation with ts-go (typescript-go) for faster builds. According to the PR description, ts-go enables extension builds to complete in ~500ms even without caching.

Changes:

  • Switched from stage 3 to experimental decorators across all extensions due to stage 3 decorators not being supported by ts-go yet
  • Converted all decorator implementations from stage 3 syntax to experimental decorator syntax
  • Integrated ts-go as the build tool for extensions compilation
  • Added skipLibCheck to notebook-renderers tsconfig to work around jsdom types issues

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
extensions/tsconfig.base.json Added experimentalDecorators flag to enable experimental decorator syntax
extensions/notebook-renderers/tsconfig.json Added skipLibCheck to work around jsdom types issues
extensions/github/src/util.ts Converted decorate function from stage 3 to experimental decorator syntax
extensions/git/src/decorators.ts Converted all decorator implementations from stage 3 to experimental decorator syntax
extensions/git/src/commands.ts Updated command decorator from stage 3 to experimental decorator syntax
extensions/git/src/api/extension.ts Updated deprecated decorator from stage 3 to experimental decorator syntax
extensions/git-base/src/decorators.ts Converted decorate function from stage 3 to experimental decorator syntax
build/lib/tsgo.ts New file implementing ts-go integration for spawning compilation processes and parsing output
build/gulpfile.extensions.ts Updated build tasks to use ts-go instead of tsb for compile and watch tasks

@@ -6,11 +6,14 @@
import { done } from './util';

function decorate(decorator: (fn: Function, key: string) => Function): Function {
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

For consistency with the similar decorate function in extensions/git-base/src/decorators.ts (line 50), this function should return MethodDecorator instead of Function. The git-base version correctly types the return value as MethodDecorator, which is more type-safe. This would also make the cast on line 91 unnecessary.

Copilot uses AI. Check for mistakes.
@mjbvz mjbvz marked this pull request as ready for review February 3, 2026 21:00
@mjbvz
Copy link
Copy Markdown
Collaborator Author

mjbvz commented Feb 3, 2026

Created and tested full build to make sure this works

@mjbvz mjbvz enabled auto-merge February 3, 2026 21:01
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@lszomoru

Matched files:

  • extensions/git-base/src/decorators.ts
  • extensions/git/src/api/extension.ts
  • extensions/git/src/commands.ts
  • extensions/git/src/decorators.ts
  • extensions/github/src/util.ts

@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 3, 2026
@mjbvz mjbvz merged commit 2c03cf9 into main Feb 3, 2026
50 checks passed
@mjbvz mjbvz deleted the dev/mjbvz/ext-ts-go branch February 3, 2026 22:58
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to ts-go for compiling built-in extensions

3 participants