-
Notifications
You must be signed in to change notification settings - Fork 12.8k
fix(41736): tsserver should not crash if external file does not exist #41737
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good but please add a test in configured project testRunner\unittests\tsserver\configuredProjects.ts
.. Some of the tests that use plugin are
https://github.com/microsoft/TypeScript/blob/master/src/testRunner/unittests/tsserver/metadataInResponse.ts#L27
https://github.com/microsoft/TypeScript/blob/master/src/testRunner/unittests/tsserver/externalProjects.ts#L60
If a file does not exist, `projectService.getOrCreateScriptInfoNotOpenedByClient()` will return `undefined`, but tsserver does not handle this case. Fix microsoft#41736
6aa4e97
to
ae04ec4
Compare
@sheetalkamat thank you very much for the pointer! I've added a test for external file 😄 |
…exist There is a bug in tsserver that causes it to crash when it tries to create script info for an external template that does not exist. I've submitted an upstream PR microsoft/TypeScript#41737 to fix this, but before the commit lands in the stable release, we'll have to workaround the issue in language service. Close angular/vscode-ng-language-service#1001
…exist (#39898) There is a bug in tsserver that causes it to crash when it tries to create script info for an external template that does not exist. I've submitted an upstream PR microsoft/TypeScript#41737 to fix this, but before the commit lands in the stable release, we'll have to workaround the issue in language service. Close angular/vscode-ng-language-service#1001 PR Close #39898
…exist (#39898) There is a bug in tsserver that causes it to crash when it tries to create script info for an external template that does not exist. I've submitted an upstream PR microsoft/TypeScript#41737 to fix this, but before the commit lands in the stable release, we'll have to workaround the issue in language service. Close angular/vscode-ng-language-service#1001 PR Close #39898
If a file does not exist,
projectService.getOrCreateScriptInfoNotOpenedByClient()
will return
undefined
, but tsserver does not handle this case.Fixes #41736