X Tutup
The Wayback Machine - https://web.archive.org/web/20210721151741/https://github.com/microsoft/TypeScript/pull/45126
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

Don’t try to create auto import provider when host program doesn’t exist #45126

Merged
merged 3 commits into from Jul 20, 2021

Conversation

@andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Jul 20, 2021

Fixes #44849

Looking at the error stack and the code path leading to the crash, I’m not sure how to produce this, but one user claimed that they had some reason to believe it was triggered by an unofficial Vue extension, and indeed both VS Code reports list that extension, but I couldn’t trigger it myself. At any rate, the auto import provider can be loaded lazily, and if someone somehow requests it before having a program, there’s no reason to crash; we can just return undefined.

src/server/project.ts Outdated Show resolved Hide resolved
@andrewbranch andrewbranch merged commit 31d98ec into microsoft:main Jul 20, 2021
9 checks passed
9 checks passed
@github-actions
build (10.x)
Details
@github-actions
CodeQL-Build
Details
@github-actions
build (12.x)
Details
@github-actions
build (14.x)
Details
@github-code-scanning
CodeQL No new or fixed alerts
Details
@microsoft-cla
license/cla All CLA requirements met.
@azure-pipelines
node10 Build #107164 succeeded
Details
@azure-pipelines
node12 Build #107162 succeeded
Details
@azure-pipelines
node14 Build #107163 succeeded
Details
@andrewbranch andrewbranch deleted the andrewbranch:bug/44849 branch Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
X Tutup