mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Add disableReferencedProjectLoad to stop loading child projects to allow users to disable loading large solutions (#39593)
* Use disableReferencedProjectLoad to stop loading child projects to allow users to disable loading large solutions Fixes #39144 * Handle indirect references * PR feedback
This commit is contained in:
@@ -2264,9 +2264,16 @@ namespace ts.server {
|
||||
// The project is referenced only if open files impacted by this project are present in this project
|
||||
return forEachEntry(
|
||||
configFileExistenceInfo.openFilesImpactedByConfigFile,
|
||||
(_value, infoPath) => isSolution ?
|
||||
!!this.getDefaultChildProjectFromSolution(this.projectService.getScriptInfoForPath(infoPath)!) :
|
||||
this.containsScriptInfo(this.projectService.getScriptInfoForPath(infoPath)!)
|
||||
(_value, infoPath) => {
|
||||
const info = this.projectService.getScriptInfoForPath(infoPath)!;
|
||||
return isSolution ?
|
||||
!!forEachResolvedProjectReferenceProject(
|
||||
this,
|
||||
child => child.containsScriptInfo(info),
|
||||
ProjectReferenceProjectLoadKind.Find
|
||||
) :
|
||||
this.containsScriptInfo(info);
|
||||
}
|
||||
) || false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user