From 6fe6cb3913a779a2091606a23af552f3800ebb67 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Fri, 9 Aug 2019 14:32:34 -0700 Subject: [PATCH 1/2] Correct string template --- src/server/session.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/session.ts b/src/server/session.ts index 12d3ba474769b..f7d6e4a747a07 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -713,7 +713,7 @@ namespace ts.server { if (err.ProgramFiles) { - msg += `\n\nProgram files: {JSON.stringify(error.ProgramFiles}}\n`; + msg += `\n\nProgram files: ${JSON.stringify(err.ProgramFiles)}\n`; msg += `\n\nProjects::\n`; let counter = 0; const addProjectInfo = (project: Project) => { From 8c6612b31efde12b969a0dbc66496dab6b5d7c78 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Fri, 9 Aug 2019 14:50:24 -0700 Subject: [PATCH 2/2] Tweak message text --- src/services/services.ts | 2 +- .../unittests/tsserver/cachingFileSystemInformation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 93145e0122343..10d038d3975ff 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1158,7 +1158,7 @@ namespace ts { function getValidSourceFile(fileName: string): SourceFile { const sourceFile = program.getSourceFile(fileName); if (!sourceFile) { - const error: Error & PossibleProgramFileInfo = new Error(`Could not find sourceFile: '${fileName}'.`); + const error: Error & PossibleProgramFileInfo = new Error(`Could not find source file: '${fileName}'.`); // We've been having trouble debugging this, so attach sidecar data for the tsserver log. // See https://github.com/microsoft/TypeScript/issues/30180. diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index 468ad35155292..b6df518387305 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -139,7 +139,7 @@ namespace ts.projectSystem { assert.isTrue(false, `should not find file '${imported.path}'`); } catch (e) { - assert.isTrue(e.message.indexOf(`Could not find sourceFile: '${imported.path}'.`) === 0, `Actual: ${e.message}`); + assert.isTrue(e.message.indexOf(`Could not find source file: '${imported.path}'.`) === 0, `Actual: ${e.message}`); } const f2Lookups = getLocationsForModuleLookup("f2"); callsTrackingHost.verifyCalledOnEachEntryNTimes(CalledMapsWithSingleArg.fileExists, f2Lookups, 1);