diff --git a/src/compiler/watchPublic.ts b/src/compiler/watchPublic.ts index 33220b03d2e43..14a60843dd2df 100644 --- a/src/compiler/watchPublic.ts +++ b/src/compiler/watchPublic.ts @@ -273,6 +273,7 @@ namespace ts { let sharedExtendedConfigFileWatchers: ESMap>; // Map of file watchers for extended files, shared between different referenced projects let extendedConfigCache = host.extendedConfigCache; // Cache for extended config evaluation let changesAffectResolution = false; // Flag for indicating non-config changes affect module resolution + let reportFileChangeDetectedOnCreateProgram = false; // True if synchronizeProgram should report "File change detected..." when a new program is created const sourceFilesCache = new Map(); // Cache that stores the source file and version info let missingFilePathsRequestedForRelease: Path[] | undefined; // These paths are held temporarily so that we can remove the entry from source file cache if the file is not tracked by missing files @@ -434,15 +435,22 @@ namespace ts { const hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution); if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { if (hasChangedConfigFileParsingErrors) { + if (reportFileChangeDetectedOnCreateProgram) { + reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation); + } builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); hasChangedConfigFileParsingErrors = false; } } else { + if (reportFileChangeDetectedOnCreateProgram) { + reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation); + } createNewProgram(hasInvalidatedResolution); } changesAffectResolution = false; // reset for next sync + reportFileChangeDetectedOnCreateProgram = false; if (host.afterProgramCreate && program !== builderProgram) { host.afterProgramCreate(builderProgram); @@ -665,7 +673,7 @@ namespace ts { function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; - reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation); + reportFileChangeDetectedOnCreateProgram = true; updateProgram(); } diff --git a/src/testRunner/unittests/tscWatch/programUpdates.ts b/src/testRunner/unittests/tscWatch/programUpdates.ts index c7d2e1dec26f7..ea5ab542f52a9 100644 --- a/src/testRunner/unittests/tscWatch/programUpdates.ts +++ b/src/testRunner/unittests/tscWatch/programUpdates.ts @@ -638,6 +638,34 @@ export class A { ] }); + verifyTscWatch({ + scenario, + subScenario: "file in files is deleted", + commandLineArgs: ["-w", "-p", configFilePath], + sys: () => { + const file1 = { + path: "/a/b/f1.ts", + content: "let x = 1" + }; + const file2 = { + path: "/a/b/f2.ts", + content: "let y = 1" + }; + const configFile = { + path: configFilePath, + content: JSON.stringify({ compilerOptions: {}, files: ["f1.ts", "f2.ts"] }) + }; + return createWatchedSystem([file1, file2, libFile, configFile]); + }, + changes: [ + { + caption: "Delete f2", + change: sys => sys.deleteFile("/a/b/f2.ts"), + timeouts: checkSingleTimeoutQueueLengthAndRun, + } + ] + }); + verifyTscWatch({ scenario, subScenario: "config file is deleted", @@ -1815,5 +1843,29 @@ import { x } from "../b";`), }, ] }); + + verifyTscWatch({ + scenario, + subScenario: "when creating extensionless file", + commandLineArgs: ["-w", "-p", ".", "--extendedDiagnostics"], + sys: () => { + const module1: File = { + path: `${projectRoot}/index.ts`, + content: `` + }; + const config: File = { + path: `${projectRoot}/tsconfig.json`, + content: `{}` + }; + return createWatchedSystem([module1, config, libFile], { currentDirectory: projectRoot }); + }, + changes: [ + { + caption: "Create foo in project root", + change: sys => sys.writeFile(`${projectRoot}/foo`, ``), + timeouts: checkSingleTimeoutQueueLengthAndRun, + }, + ] + }); }); } diff --git a/tests/baselines/reference/tscWatch/consoleClearing/with---diagnostics.js b/tests/baselines/reference/tscWatch/consoleClearing/with---diagnostics.js index 0416d37ad8b5b..d032563a545d9 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/with---diagnostics.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/with---diagnostics.js @@ -71,9 +71,9 @@ Output:: FileWatcher:: Triggered with /f.ts 1:: WatchInfo: /f.ts 250 undefined Source file Scheduling update Elapsed:: *ms FileWatcher:: Triggered with /f.ts 1:: WatchInfo: /f.ts 250 undefined Source file +Synchronizing program [12:00:17 AM] File change detected. Starting incremental compilation... -Synchronizing program CreatingProgramWith:: roots: ["/f.ts"] options: {"watch":true,"diagnostics":true} diff --git a/tests/baselines/reference/tscWatch/consoleClearing/with---extendedDiagnostics.js b/tests/baselines/reference/tscWatch/consoleClearing/with---extendedDiagnostics.js index 8889c3fd19377..e021f79145ef0 100644 --- a/tests/baselines/reference/tscWatch/consoleClearing/with---extendedDiagnostics.js +++ b/tests/baselines/reference/tscWatch/consoleClearing/with---extendedDiagnostics.js @@ -73,9 +73,9 @@ Output:: FileWatcher:: Triggered with /f.ts 1:: WatchInfo: /f.ts 250 undefined Source file Scheduling update Elapsed:: *ms FileWatcher:: Triggered with /f.ts 1:: WatchInfo: /f.ts 250 undefined Source file +Synchronizing program [12:00:17 AM] File change detected. Starting incremental compilation... -Synchronizing program CreatingProgramWith:: roots: ["/f.ts"] options: {"watch":true,"extendedDiagnostics":true} diff --git a/tests/baselines/reference/tscWatch/programUpdates/config-file-is-deleted.js b/tests/baselines/reference/tscWatch/programUpdates/config-file-is-deleted.js index f58c7de595092..1a995e90899aa 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/config-file-is-deleted.js +++ b/tests/baselines/reference/tscWatch/programUpdates/config-file-is-deleted.js @@ -84,9 +84,6 @@ Input:: //// [/a/b/tsconfig.json] deleted Output:: ->> Screen clear -[12:00:24 AM] File change detected. Starting incremental compilation... - error TS5083: Cannot read file '/a/b/tsconfig.json'. diff --git a/tests/baselines/reference/tscWatch/programUpdates/file-in-files-is-deleted.js b/tests/baselines/reference/tscWatch/programUpdates/file-in-files-is-deleted.js new file mode 100644 index 0000000000000..67b8d85e3d235 --- /dev/null +++ b/tests/baselines/reference/tscWatch/programUpdates/file-in-files-is-deleted.js @@ -0,0 +1,131 @@ +Input:: +//// [/a/b/f1.ts] +let x = 1 + +//// [/a/b/f2.ts] +let y = 1 + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/a/b/tsconfig.json] +{"compilerOptions":{},"files":["f1.ts","f2.ts"]} + + +/a/lib/tsc.js -w -p /a/b/tsconfig.json +Output:: +>> Screen clear +[12:00:17 AM] Starting compilation in watch mode... + +[12:00:22 AM] Found 0 errors. Watching for file changes. + + + +Program root files: ["/a/b/f1.ts","/a/b/f2.ts"] +Program options: {"watch":true,"project":"/a/b/tsconfig.json","configFilePath":"/a/b/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/a/b/f1.ts +/a/b/f2.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/a/b/f1.ts +/a/b/f2.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/a/b/f1.ts (used version) +/a/b/f2.ts (used version) + +WatchedFiles:: +/a/b/tsconfig.json: + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} +/a/b/f1.ts: + {"fileName":"/a/b/f1.ts","pollingInterval":250} +/a/b/f2.ts: + {"fileName":"/a/b/f2.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/a/b/node_modules/@types: + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/a/b/f1.js] +var x = 1; + + +//// [/a/b/f2.js] +var y = 1; + + + +Change:: Delete f2 + +Input:: +//// [/a/b/f2.ts] deleted + +Output:: +>> Screen clear +[12:00:24 AM] File change detected. Starting incremental compilation... + +error TS6053: File '/a/b/f2.ts' not found. + The file is in the program because: + Part of 'files' list in tsconfig.json + + a/b/tsconfig.json:1:40 + 1 {"compilerOptions":{},"files":["f1.ts","f2.ts"]} +    ~~~~~~~ + File is matched by 'files' list specified here. + +[12:00:28 AM] Found 1 error. Watching for file changes. + + + +Program root files: ["/a/b/f1.ts","/a/b/f2.ts"] +Program options: {"watch":true,"project":"/a/b/tsconfig.json","configFilePath":"/a/b/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/a/b/f1.ts + +No cached semantic diagnostics in the builder:: + +Shape signatures in builder refreshed for:: +/a/b/f1.ts (computed .d.ts) + +WatchedFiles:: +/a/b/tsconfig.json: + {"fileName":"/a/b/tsconfig.json","pollingInterval":250} +/a/b/f1.ts: + {"fileName":"/a/b/f1.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/b/f2.ts: + {"fileName":"/a/b/f2.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/a/b/node_modules/@types: + {"directoryName":"/a/b/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/a/b/f1.js] file written with same contents diff --git a/tests/baselines/reference/tscWatch/programUpdates/when-creating-extensionless-file.js b/tests/baselines/reference/tscWatch/programUpdates/when-creating-extensionless-file.js new file mode 100644 index 0000000000000..fe976b5d9346a --- /dev/null +++ b/tests/baselines/reference/tscWatch/programUpdates/when-creating-extensionless-file.js @@ -0,0 +1,111 @@ +Input:: +//// [/user/username/projects/myproject/index.ts] + + +//// [/user/username/projects/myproject/tsconfig.json] +{} + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js -w -p . --extendedDiagnostics +Output:: +[12:00:21 AM] Starting compilation in watch mode... + +Current directory: /user/username/projects/myproject CaseSensitiveFileNames: false +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Config file +Synchronizing program +CreatingProgramWith:: + roots: ["/user/username/projects/myproject/index.ts"] + options: {"watch":true,"project":"/user/username/projects/myproject","extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/index.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 undefined Source file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +[12:00:24 AM] Found 0 errors. Watching for file changes. + +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory + + +Program root files: ["/user/username/projects/myproject/index.ts"] +Program options: {"watch":true,"project":"/user/username/projects/myproject","extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/index.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/index.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/myproject/index.ts (used version) + +WatchedFiles:: +/user/username/projects/myproject/tsconfig.json: + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} +/user/username/projects/myproject/index.ts: + {"fileName":"/user/username/projects/myproject/index.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/user/username/projects/myproject: + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + +//// [/user/username/projects/myproject/index.js] + + + +Change:: Create foo in project root + +Input:: +//// [/user/username/projects/myproject/foo] + + + +Output:: +DirectoryWatcher:: Triggered with /user/username/projects/myproject/foo :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory +Scheduling update +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/foo :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory +Reloading new file names and options +Synchronizing program + + +WatchedFiles:: +/user/username/projects/myproject/tsconfig.json: + {"fileName":"/user/username/projects/myproject/tsconfig.json","pollingInterval":250} +/user/username/projects/myproject/index.ts: + {"fileName":"/user/username/projects/myproject/index.ts","pollingInterval":250} +/a/lib/lib.d.ts: + {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} + +FsWatches:: + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/user/username/projects/myproject: + {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} + +exitCode:: ExitStatus.undefined + diff --git a/tests/baselines/reference/tscWatch/programUpdates/when-creating-new-file-in-symlinked-folder.js b/tests/baselines/reference/tscWatch/programUpdates/when-creating-new-file-in-symlinked-folder.js index ee6c33aa4a43a..af10639931622 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/when-creating-new-file-in-symlinked-folder.js +++ b/tests/baselines/reference/tscWatch/programUpdates/when-creating-new-file-in-symlinked-folder.js @@ -115,10 +115,10 @@ Output:: DirectoryWatcher:: Triggered with /user/username/projects/myproject/folder2/module3.ts :: WatchInfo: /user/username/projects/myproject/folder2 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/folder2/module3.ts :: WatchInfo: /user/username/projects/myproject/folder2 1 undefined Wild card directory -[12:00:41 AM] File change detected. Starting incremental compilation... - Reloading new file names and options Synchronizing program +[12:00:41 AM] File change detected. Starting incremental compilation... + CreatingProgramWith:: roots: ["/user/username/projects/myproject/client/folder1/module1.ts","/user/username/projects/myproject/client/linktofolder2/module2.ts","/user/username/projects/myproject/client/linktofolder2/module3.ts"] options: {"baseUrl":"/user/username/projects/myproject/client","paths":{"*":["*"]},"pathsBasePath":"/user/username/projects/myproject","watch":true,"project":"/user/username/projects/myproject","extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} diff --git a/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js b/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js index 7adf3b20ec88f..e24e1ba0986f1 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js +++ b/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js @@ -171,10 +171,10 @@ Output:: DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project -[12:00:45 AM] File change detected. Starting incremental compilation... - Synchronizing program Reloading new file names and options +[12:00:45 AM] File change detected. Starting incremental compilation... + CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"watch":true,"project":"/user/username/projects/myproject/projects/project2/tsconfig.json","extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"} @@ -251,9 +251,9 @@ Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/pro DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Project: /user/username/projects/myproject/projects/project1/tsconfig.json Detected output file: /user/username/projects/myproject/projects/project1/class3.d.ts Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project +Synchronizing program [12:00:49 AM] File change detected. Starting incremental compilation... -Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"watch":true,"project":"/user/username/projects/myproject/projects/project2/tsconfig.json","extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"} @@ -424,9 +424,9 @@ Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/pro DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Project: /user/username/projects/myproject/projects/project1/tsconfig.json Detected output file: /user/username/projects/myproject/projects/project1/class3.d.ts Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project +Synchronizing program [12:01:08 AM] File change detected. Starting incremental compilation... -Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"watch":true,"project":"/user/username/projects/myproject/projects/project2/tsconfig.json","extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"} @@ -550,9 +550,9 @@ Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/pro DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Project: /user/username/projects/myproject/projects/project1/tsconfig.json Detected output file: /user/username/projects/myproject/projects/project1/class3.d.ts Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project +Synchronizing program [12:01:24 AM] File change detected. Starting incremental compilation... -Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"watch":true,"project":"/user/username/projects/myproject/projects/project2/tsconfig.json","extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"} diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js index 8541f38217fc1..0f536d2d6faf1 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js @@ -215,10 +215,10 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myprojec DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -[12:00:48 AM] File change detected. Starting incremental compilation... - Reloading new file names and options Synchronizing program +[12:00:48 AM] File change detected. Starting incremental compilation... + CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} @@ -310,10 +310,10 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myprojec DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -[12:00:59 AM] File change detected. Starting incremental compilation... - Reloading new file names and options Synchronizing program +[12:00:59 AM] File change detected. Starting incremental compilation... + CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} @@ -382,10 +382,10 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myprojec DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -[12:01:03 AM] File change detected. Starting incremental compilation... - Reloading new file names and options Synchronizing program +[12:01:03 AM] File change detected. Starting incremental compilation... + CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} @@ -481,10 +481,10 @@ DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules Project: /user/username/projects/myproject/tsconfig.json Detected file add/remove of non supported extension: /user/username/projects/myproject/node_modules/@types/node/ts3.6 Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update -[12:01:15 AM] File change detected. Starting incremental compilation... - Reloading new file names and options Synchronizing program +[12:01:15 AM] File change detected. Starting incremental compilation... + CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} diff --git a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js index 7be9d571284e8..9a42287a007e2 100644 --- a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js +++ b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js @@ -133,11 +133,11 @@ Output:: DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project +Synchronizing program +Loading config file: /user/username/projects/myproject/projects/project1/tsconfig.json 12:00:43 AM - File change detected. Starting incremental compilation... -Synchronizing program -Loading config file: /user/username/projects/myproject/projects/project1/tsconfig.json CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"} @@ -208,10 +208,10 @@ Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/pro DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Project: /user/username/projects/myproject/projects/project1/tsconfig.json Detected output file: /user/username/projects/myproject/projects/project1/class3.d.ts Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project +Synchronizing program 12:00:47 AM - File change detected. Starting incremental compilation... -Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"} @@ -340,10 +340,10 @@ Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/pro DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Project: /user/username/projects/myproject/projects/project1/tsconfig.json Detected output file: /user/username/projects/myproject/projects/project1/class3.d.ts Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project +Synchronizing program 12:01:03 AM - File change detected. Starting incremental compilation... -Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"} @@ -424,10 +424,10 @@ Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/pro DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Project: /user/username/projects/myproject/projects/project1/tsconfig.json Detected output file: /user/username/projects/myproject/projects/project1/class3.d.ts Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.d.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project +Synchronizing program 12:01:16 AM - File change detected. Starting incremental compilation... -Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"} diff --git a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine.js b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine.js index 1480894fbe6f6..ae46872cf8043 100644 --- a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine.js +++ b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine.js @@ -133,11 +133,11 @@ Output:: DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/projects/project1/class3.ts :: WatchInfo: /user/username/projects/myproject/projects/project1 1 undefined Wild card directory of referenced project +Synchronizing program +Loading config file: /user/username/projects/myproject/projects/project1/tsconfig.json 12:00:43 AM - File change detected. Starting incremental compilation... -Synchronizing program -Loading config file: /user/username/projects/myproject/projects/project1/tsconfig.json CreatingProgramWith:: roots: ["/user/username/projects/myproject/projects/project2/class2.ts"] options: {"module":0,"composite":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/projects/project2/tsconfig.json"}