Skip to content

Conversation

mjbvz
Copy link

@mjbvz mjbvz commented Sep 16, 2025

Fixes microsoft/vscode#266087

The VSCode TS extension should now dynamically register/unregister language features so a restart isn't required for current insiders builds

Fixes microsoft/vscode#266087

The VSCode TS extension should now dynamically register/unregister language features so a restart isn't required for current insiders builds
Copy link
Contributor

@Copilot 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 removes the requirement for VSCode extension host restart when the TypeScript native preview configuration changes, improving the user experience for VSCode insiders builds 1.105 and later.

  • Adds version detection logic to determine if extension host restart is needed
  • Conditionally handles configuration changes based on VSCode version
  • Maintains backward compatibility with older VSCode versions

@jakebailey
Copy link
Member

I tried testing out the latest insiders; I have tsgo enabled on load, then disable it, tsserver does start but tsgo stays running (duplicating everything). If I enable tsgo again, tsserver's errors do not disappear.

So, there might be more changes needed on both sides to better disable things. In our extension, we probably need to hook up disposasls and so on, and on the VS Code side, push diagnostics need to be cleared out?

@andrewbranch
Copy link
Member

Our disposables are hooked up for deactivation, but a settings change to of useTsgo does not constitute a deactivation. We need to collect the subset of disposables that are supposed to be disabled when useTsgo is false separately. It’s not all of them; the command to enable the native preview itself is contributed by this extension, so that, at least, needs to be kept alive.

@andrewbranch
Copy link
Member

The latest commit seems to do the trick, though is not perfect since context.subscriptions grows every time you enable/disable. I also didn’t see any issue with diagnostics sticking around after either extension disables, but I didn’t click around a ton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't require restart when switching to TS native preview
3 participants