From 62c6fe2ccc0bcd4022efb2cc8e05204b938b26aa Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 3 Apr 2018 13:12:37 -0700 Subject: [PATCH] There is no need to ensure project structure when tryiong to get inferred project The project operations will validate if its valid anyways --- src/harness/unittests/typingsInstaller.ts | 5 +++-- src/server/editorServices.ts | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/harness/unittests/typingsInstaller.ts b/src/harness/unittests/typingsInstaller.ts index 0a27f860352..5bf968064f6 100644 --- a/src/harness/unittests/typingsInstaller.ts +++ b/src/harness/unittests/typingsInstaller.ts @@ -188,7 +188,7 @@ namespace ts.projectSystem { checkProjectActualFiles(p, [file1.path]); installer.installAll(/*expectedCount*/ 1); - + host.checkTimeoutQueueLengthAndRun(2); checkNumberOfProjects(projectService, { inferredProjects: 1 }); checkProjectActualFiles(p, [file1.path, jquery.path]); }); @@ -961,6 +961,7 @@ namespace ts.projectSystem { assert.isTrue(host.fileExists(node.path), "typings for 'node' should be created"); assert.isTrue(host.fileExists(commander.path), "typings for 'commander' should be created"); + host.checkTimeoutQueueLengthAndRun(2); checkProjectActualFiles(service.inferredProjects[0], [file.path, node.path, commander.path]); }); @@ -1106,7 +1107,7 @@ namespace ts.projectSystem { checkProjectActualFiles(p, [file1.path]); installer.installAll(/*expectedCount*/ 1); - + host.checkTimeoutQueueLengthAndRun(2); checkNumberOfProjects(projectService, { inferredProjects: 1 }); checkProjectActualFiles(p, [file1.path, jquery.path]); }); diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 09c5e784ba8..3fe7100f052 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -642,7 +642,6 @@ namespace ts.server { return undefined; } if (isInferredProjectName(projectName)) { - this.ensureProjectStructuresUptoDate(); return findProjectByName(projectName, this.inferredProjects); } return this.findExternalProjectByProjectName(projectName) || this.findConfiguredProjectByProjectName(toNormalizedPath(projectName));