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

v1.4.0 crashes VS Code TS Language Server #52

Closed
patroza opened this issue Jul 13, 2021 · 1 comment
Closed

v1.4.0 crashes VS Code TS Language Server #52

patroza opened this issue Jul 13, 2021 · 1 comment

Comments

@patroza
Copy link

patroza commented Jul 13, 2021

VS Code 1.58, 1.58.1 and 1.59 Insiders immediately crash on startup with "Typescript crashed 5 times and won't be restarted aymore"

1.3.4 works.

@nonara
Copy link
Owner

nonara commented Jul 13, 2021

I was able to replicate this. Fixed in v1.4.1, and I deprecated 1.4.0.

Post-mortem

I recently added tsserver.js as a possible patchable library, by request. My mistake was in thinking that I'd configured the installer to only patch tsc.js and typescript.js by default. These are generally the only libraries that one would need to patch, and I have my implementation setup this way.

It seems that it was still configured to patch all libraries, which is unnecessary. I've adjusted to only patch tsc.js and typescript.ts by default. For sake of caution, I would normally bump major, but because v1 is in maintenance, I'll just update as a patch. I don't think this change will effect too many. If it does, however, you can simply use the ts-patch patch command to specify the libraries you'd like to patch.

Regarding VS Code's crash, it uses tsserver.js. I generally use WebStorm, and it has no problem with the patched version. My version of VS Code did not either, however, updating to the latest VS Code replicated the crash. Strangely, even with "typescript.tsserver.log": "verbose", it is not outputting any log files. It just produces empty log directories.

Given the v1's scope, I can't imagine there would be any use to patching tsserver, so I'm not going to dig too much further anymore, however, if anyone has a legitimate need to patch tsserver, I can investigate further.

@nonara nonara closed this as completed in 4d029f6 Jul 13, 2021
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

No branches or pull requests

2 participants