Skip to content

Do not create packagejson imports and auto import provider in partial semantic server mode #40890

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

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

sheetalkamat
Copy link
Member

Found this while looking into #39656 where it tried to read package.json file

@@ -1622,6 +1622,7 @@ namespace ts.server {

/*@internal*/
getPackageJsonsVisibleToFile(fileName: string, rootDir?: string): readonly PackageJsonInfo[] {
if (this.projectService.serverMode !== LanguageServiceMode.Semantic) return emptyArray;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly afraid of all the places that are going to need to be patched up in the future to check like this, but I guess that's programming

Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get @andrewbranch to review but looks good to me.

@sheetalkamat sheetalkamat merged commit fb2f3d4 into master Oct 2, 2020
@sheetalkamat sheetalkamat deleted the partialModeDiasablingAutoImportProvider branch October 2, 2020 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants