Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triple reload required in VS Code after updating extension #1358

Closed
rafrafek opened this issue Jan 31, 2022 · 4 comments
Closed

Triple reload required in VS Code after updating extension #1358

rafrafek opened this issue Jan 31, 2022 · 4 comments
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@rafrafek
Copy link

Describe the bug
After updating Svelte for VSCode extension I have to reload VS Code 3 times.

To Reproduce
Update Svelte for VSCode extension.

Expected behavior
Single reload should be enough.

Screenshots
1.
pic1
2.
pic2
3.
pic3

System (please complete the following information):

  • OS: Windows
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode
@rafrafek rafrafek added the bug Something isn't working label Jan 31, 2022
@dummdidumm
Copy link
Member

I fear we can't change this. The problem is that it's not possible AFAIK to dynamically enable or disable a TypeScript plugin that comes with an extension. We provide a TypeScript plugin which can be enabled and is disabled by default. To provide a plugin you need to add a typescriptServerPlugins entry to the package.json of the extension. To disable it we therefore we use somewhat of a hack and add typescriptServerPlugins-disabled initially, and if it should be enabled, the -disabled part is removed. This causes the third prompt. Now every time an update is installed, the extension's package.json is "reset" and the -disabled part appears again, making the prompts show up again. We can't tell VS Code to somehow not add the -disabled part back.

@benignant
Copy link

Is there a downside to having the plugin enabled? Maybe it would make sense to have it enabled by default. If most people want it enabled, then it would be the minority who has to go through the triple reload.

@dummdidumm
Copy link
Member

dummdidumm commented Feb 2, 2022

The plan is to enable it by default some day but I haven't gathered enough feedback yet to feel confident about it - or maybe everyone's using it and happy and I just don't know yet 😄
Potential downsides are that it could maybe mess with the code in some way that's unexpected, for example #1149

@dummdidumm
Copy link
Member

Mhhhm it seems this may actually be possible: microsoft/vscode-typescript-tslint-plugin#5 seems to implement plugin settings through VS Code settings, so if this does what I think it does we could add a setting to the plugin whether or not it should be enabled and get rid of this weird workaround.

dummdidumm pushed a commit that referenced this issue Mar 2, 2022
Enable ts plugin without updating the package.json, making it possible to enable/disable it without a restart
#1358
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

3 participants