mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Always update LS state through Project (#56356)
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
This commit is contained in:
co-authored by
Daniel Rosenwasser
parent
80ab111685
commit
ca7a3af5e6
+11
-1
@@ -1330,6 +1330,14 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
this.hasAddedOrRemovedSymlinks = true;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
updateFromProjectInProgress = false;
|
||||
|
||||
/** @internal */
|
||||
updateFromProject() {
|
||||
updateProjectIfDirty(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates set of files that contribute to this project
|
||||
* @returns: true if set of files in the project stays the same and false - otherwise.
|
||||
@@ -1523,8 +1531,10 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
this.hasInvalidatedResolutions = hasInvalidatedResolutions;
|
||||
this.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions;
|
||||
this.resolutionCache.startCachingPerDirectoryResolution();
|
||||
this.program = this.languageService.getProgram(); // TODO: GH#18217
|
||||
this.dirty = false;
|
||||
this.updateFromProjectInProgress = true;
|
||||
this.program = this.languageService.getProgram(); // TODO: GH#18217
|
||||
this.updateFromProjectInProgress = false;
|
||||
tracing?.push(tracing.Phase.Session, "finishCachingPerDirectoryResolution");
|
||||
this.resolutionCache.finishCachingPerDirectoryResolution(this.program, oldProgram);
|
||||
tracing?.pop();
|
||||
|
||||
Reference in New Issue
Block a user