Skip to content

Commit 62c6fe2

Browse files
committed
There is no need to ensure project structure when tryiong to get inferred project
The project operations will validate if its valid anyways
1 parent e304178 commit 62c6fe2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/harness/unittests/typingsInstaller.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ namespace ts.projectSystem {
188188
checkProjectActualFiles(p, [file1.path]);
189189

190190
installer.installAll(/*expectedCount*/ 1);
191-
191+
host.checkTimeoutQueueLengthAndRun(2);
192192
checkNumberOfProjects(projectService, { inferredProjects: 1 });
193193
checkProjectActualFiles(p, [file1.path, jquery.path]);
194194
});
@@ -961,6 +961,7 @@ namespace ts.projectSystem {
961961
assert.isTrue(host.fileExists(node.path), "typings for 'node' should be created");
962962
assert.isTrue(host.fileExists(commander.path), "typings for 'commander' should be created");
963963

964+
host.checkTimeoutQueueLengthAndRun(2);
964965
checkProjectActualFiles(service.inferredProjects[0], [file.path, node.path, commander.path]);
965966
});
966967

@@ -1106,7 +1107,7 @@ namespace ts.projectSystem {
11061107
checkProjectActualFiles(p, [file1.path]);
11071108

11081109
installer.installAll(/*expectedCount*/ 1);
1109-
1110+
host.checkTimeoutQueueLengthAndRun(2);
11101111
checkNumberOfProjects(projectService, { inferredProjects: 1 });
11111112
checkProjectActualFiles(p, [file1.path, jquery.path]);
11121113
});

src/server/editorServices.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,6 @@ namespace ts.server {
642642
return undefined;
643643
}
644644
if (isInferredProjectName(projectName)) {
645-
this.ensureProjectStructuresUptoDate();
646645
return findProjectByName(projectName, this.inferredProjects);
647646
}
648647
return this.findExternalProjectByProjectName(projectName) || this.findConfiguredProjectByProjectName(toNormalizedPath(projectName));

0 commit comments

Comments
 (0)