From 4bc74b98c23f52d51415c3c49f762e62eb44cbc5 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 8 Jul 2022 15:17:16 -0700 Subject: [PATCH] Add reusing cache stub --- src/compiler/builder.ts | 35 ++++++++++++++++- src/compiler/builderPublic.ts | 7 ++++ src/compiler/program.ts | 38 ++++++++++++++----- src/compiler/types.ts | 17 +++++++++ .../bundle-emit-already-built.js | 10 ++--- .../cacheResolutions/bundle-emit.js | 10 ++--- .../multi-file-already-built.js | 10 ++--- .../cacheResolutions/multi-file.js | 10 ++--- .../bundle-emit-already-built.js | 8 ++-- .../tscWatch/cacheResolutions/bundle-emit.js | 8 ++-- .../multi-file-already-built.js | 8 ++-- .../tscWatch/cacheResolutions/multi-file.js | 8 ++-- .../cacheResolutions/bundle-emit-not-built.js | 8 ++-- .../tsserver/cacheResolutions/bundle-emit.js | 8 ++-- .../cacheResolutions/multi-file-not-built.js | 8 ++-- .../tsserver/cacheResolutions/multi-file.js | 8 ++-- 16 files changed, 139 insertions(+), 62 deletions(-) diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index d01b2bd05b7..b0277cf53d2 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -65,6 +65,9 @@ import { ModeAwareCache, noop, notImplemented, + OldBuildInfoProgram, + OldBuildInfoProgramConstructor, + OldBuildInfoProgramHost, outFile, Path, Program, @@ -1431,7 +1434,7 @@ export function getBuilderCreationParameters(newProgramOrRootNames: Program | re rootNames: newProgramOrRootNames, options: hostOrOptions as CompilerOptions, host: oldProgramOrHost as CompilerHost, - oldProgram: oldProgram && oldProgram.getProgramOrUndefined(), + oldProgram: oldProgram?.getProgramOrOldBuildInfoProgramUndefined(), configFileParsingDiagnostics, projectReferences }); @@ -1525,6 +1528,7 @@ export function createBuilderProgram(kind: BuilderProgramKind, { newProgram, hos builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; builderProgram.emit = emit; builderProgram.releaseProgram = () => releaseCache(state); + builderProgram.getProgramOrOldBuildInfoProgramUndefined = createGetProgramOrOldBuildInfoProgramUndefined(state); if (kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram) { (builderProgram as SemanticDiagnosticsBuilderProgram).getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; @@ -1945,6 +1949,7 @@ export function createBuilderProgramUsingProgramBuildInfo(buildInfo: BuildInfo, restoreEmitState: noop, getProgram: notImplemented, getProgramOrUndefined: returnUndefined, + getProgramOrOldBuildInfoProgramUndefined: createGetProgramOrOldBuildInfoProgramUndefined(state), releaseProgram: noop, getCompilerOptions: () => state.compilerOptions, getSourceFile: notImplemented, @@ -1990,6 +1995,33 @@ export function createBuilderProgramUsingProgramBuildInfo(buildInfo: BuildInfo, } } +function createGetProgramOrOldBuildInfoProgramUndefined(state: ReusableBuilderProgramState): () => Program | OldBuildInfoProgramConstructor | undefined { + return () => state.program ?? + (state.cacheResolutions || state.resuableCacheResolutions ? + (host => createOldBuildInfoProgram( + host, + state.compilerOptions, + state.cacheResolutions, + // Prefer cached resolutions over serialized format + !state.cacheResolutions ? state.resuableCacheResolutions : undefined, + )) : + undefined + ); +} + +/** @internal */ +export function createOldBuildInfoProgram( + _host: OldBuildInfoProgramHost, + compilerOptions: CompilerOptions, + cacheResolutions: ReusableBuilderProgramState["cacheResolutions"], + resuableCacheResolutions: ReusableBuilderProgramState["resuableCacheResolutions"], +): OldBuildInfoProgram | undefined { + if (!cacheResolutions && !resuableCacheResolutions) return undefined; + return { + getCompilerOptions: () => compilerOptions, + }; +} + /** @internal */ export function getBuildInfoFileVersionMap( program: ProgramBuildInfo, @@ -2015,6 +2047,7 @@ export function createRedirectedBuilderProgram(getState: () => { program?: Progr restoreEmitState: noop, getProgram, getProgramOrUndefined: () => getState().program, + getProgramOrOldBuildInfoProgramUndefined: () => getState().program, releaseProgram: () => getState().program = undefined, getCompilerOptions: () => getState().compilerOptions, getSourceFile: fileName => getProgram().getSourceFile(fileName), diff --git a/src/compiler/builderPublic.ts b/src/compiler/builderPublic.ts index 4cfcb731fb6..c0e70fae752 100644 --- a/src/compiler/builderPublic.ts +++ b/src/compiler/builderPublic.ts @@ -10,6 +10,7 @@ import { DiagnosticWithLocation, EmitResult, getBuilderCreationParameters, + OldBuildInfoProgramConstructor, Program, ProjectReference, ReusableBuilderProgramState, @@ -63,6 +64,12 @@ export interface BuilderProgram { * @internal */ getProgramOrUndefined(): Program | undefined; + /** + * Returns current program that could be undefined if the program was released, or cached build info program (currently module and type ref cache) + * + * @internal + */ + getProgramOrOldBuildInfoProgramUndefined(): Program | OldBuildInfoProgramConstructor | undefined; /** * Releases reference to the program, making all the other operations that need program to fail. * diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 705efab4f8a..cd6a4f39298 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -45,6 +45,7 @@ import { createModuleResolutionCache, createMultiMap, CreateProgramOptions, + CreateProgramOptionsWithOldBuildInfoProgramConstructor, createSourceFile, CreateSourceFileOptions, createSymlinkCache, @@ -226,6 +227,8 @@ import { notImplementedResolver, noTransformers, ObjectLiteralExpression, + OldBuildInfoProgram, + OldBuildInfoProgramConstructor, OperationCanceledException, optionsHaveChanges, outFile, @@ -1388,7 +1391,7 @@ function shouldProgramCreateNewSourceFiles(program: Program | undefined, newOpti return optionsHaveChanges(program.getCompilerOptions(), newOptions, sourceFileAffectingCompilerOptions); } -function createCreateProgramOptions(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): CreateProgramOptions { +function createCreateProgramOptions(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program | OldBuildInfoProgramConstructor, configFileParsingDiagnostics?: readonly Diagnostic[]): CreateProgramOptionsWithOldBuildInfoProgramConstructor { return { rootNames, options, @@ -1409,6 +1412,8 @@ function createCreateProgramOptions(rootNames: readonly string[], options: Compi * @returns A 'Program' object. */ export function createProgram(createProgramOptions: CreateProgramOptions): Program; +/** @internal */ +export function createProgram(createProgramOptions: CreateProgramOptionsWithOldBuildInfoProgramConstructor): Program; // eslint-disable-line @typescript-eslint/unified-signatures /** * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' * that represent a compilation unit. @@ -1424,10 +1429,10 @@ export function createProgram(createProgramOptions: CreateProgramOptions): Progr * @returns A 'Program' object. */ export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program; -export function createProgram(rootNamesOrOptions: readonly string[] | CreateProgramOptions, _options?: CompilerOptions, _host?: CompilerHost, _oldProgram?: Program, _configFileParsingDiagnostics?: readonly Diagnostic[]): Program { +export function createProgram(rootNamesOrOptions: readonly string[] | CreateProgramOptionsWithOldBuildInfoProgramConstructor, _options?: CompilerOptions, _host?: CompilerHost, _oldProgram?: Program, _configFileParsingDiagnostics?: readonly Diagnostic[]): Program { const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options!, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; // TODO: GH#18217 const { rootNames, options, configFileParsingDiagnostics, projectReferences } = createProgramOptions; - let { oldProgram } = createProgramOptions; + let { oldProgram: oldProgramOrOldBuildInfoProgramConstructor } = createProgramOptions; let processingDefaultLibFiles: SourceFile[] | undefined; let processingOtherFiles: SourceFile[] | undefined; @@ -1569,6 +1574,12 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg ); } + let oldProgram = typeof oldProgramOrOldBuildInfoProgramConstructor === "object" ? oldProgramOrOldBuildInfoProgramConstructor : undefined; + let oldBuildInfoProgram: OldBuildInfoProgram | undefined; + if (!oldProgram && typeof oldProgramOrOldBuildInfoProgramConstructor === "function") { + oldBuildInfoProgram = oldProgramOrOldBuildInfoProgramConstructor(host); + } + // Map from a stringified PackageId to the source file with that id. // Only one source file may have a given packageId. Others become redirects (see createRedirectSourceFile). // `packageIdToSourceFile` is only used while building the program, while `sourceFileToPackageName` and `isSourceFileTargetOfRedirect` are kept around. @@ -1749,6 +1760,8 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg // unconditionally set oldProgram to undefined to prevent it from being captured in closure oldProgram = undefined; + oldBuildInfoProgram = undefined; + oldProgramOrOldBuildInfoProgramConstructor = undefined; const program: Program = { getRootFileNames: () => rootNames, @@ -2222,14 +2235,21 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } function tryReuseStructureFromOldProgram(): StructureIsReused { - if (!oldProgram) { + // check properties that can affect structure of the program or module resolution strategy + // if any of these properties has changed - structure cannot be reused + const oldOptions = oldProgram?.getCompilerOptions() || oldBuildInfoProgram?.getCompilerOptions(); + if (!oldOptions || changesAffectModuleResolution(oldOptions, options)) { return StructureIsReused.Not; } - // check properties that can affect structure of the program or module resolution strategy - // if any of these properties has changed - structure cannot be reused - const oldOptions = oldProgram.getCompilerOptions(); - if (changesAffectModuleResolution(oldOptions, options)) { + const result = tryReuseStructureFromOldProgramWorker(); + return options.cacheResolutions && (oldProgram || oldBuildInfoProgram) && result === StructureIsReused.Not ? + StructureIsReused.SafeModuleCache : + result; + } + + function tryReuseStructureFromOldProgramWorker(): StructureIsReused { + if (!oldProgram) { return StructureIsReused.Not; } @@ -2414,7 +2434,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg return structureIsReused; } - if (changesAffectingProgramStructure(oldOptions, options)) { + if (changesAffectingProgramStructure(oldProgram.getCompilerOptions(), options)) { return StructureIsReused.SafeModules; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index e748999faa8..d538ceeeb4a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4571,6 +4571,7 @@ export interface ResolvedProjectReference { /** @internal */ export const enum StructureIsReused { Not, + SafeModuleCache, SafeModules, Completely, } @@ -6968,6 +6969,22 @@ export interface CreateProgramOptions { configFileParsingDiagnostics?: readonly Diagnostic[]; } +/** @internal */ +export interface OldBuildInfoProgram { + getCompilerOptions(): CompilerOptions; +} + +/** @internal */ +export interface OldBuildInfoProgramHost { + fileExists(fileName: string): boolean; +} + +/** @internal */ +export type OldBuildInfoProgramConstructor = (host: OldBuildInfoProgramHost) => OldBuildInfoProgram | undefined; + +/** @internal */ +export type CreateProgramOptionsWithOldBuildInfoProgramConstructor = Omit & { oldProgram?: Program | OldBuildInfoProgramConstructor; }; + /** @internal */ export interface CommandLineOptionBase { name: string; diff --git a/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit-already-built.js b/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit-already-built.js index f422a0ba904..0452b8e3e62 100644 --- a/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit-already-built.js +++ b/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit-already-built.js @@ -447,7 +447,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -708,7 +708,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -970,7 +970,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -1212,7 +1212,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -1927,7 +1927,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts diff --git a/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit.js b/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit.js index 96f2179be7b..3d8105f9baf 100644 --- a/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit.js +++ b/tests/baselines/reference/tsbuildWatch/cacheResolutions/bundle-emit.js @@ -382,7 +382,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -643,7 +643,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -905,7 +905,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -1147,7 +1147,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -1862,7 +1862,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts diff --git a/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file-already-built.js b/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file-already-built.js index 1769480df7c..3feea5d9bb7 100644 --- a/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file-already-built.js +++ b/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file-already-built.js @@ -1183,7 +1183,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -2064,7 +2064,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -2961,7 +2961,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -3955,7 +3955,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -5086,7 +5086,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts diff --git a/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file.js b/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file.js index 7cb1f441f24..08c413c2270 100644 --- a/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file.js +++ b/tests/baselines/reference/tsbuildWatch/cacheResolutions/multi-file.js @@ -1087,7 +1087,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -1968,7 +1968,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -2865,7 +2865,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -3859,7 +3859,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -4990,7 +4990,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithImports.ts","/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts diff --git a/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit-already-built.js b/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit-already-built.js index 1b2b1e86276..66c8a6c6168 100644 --- a/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit-already-built.js +++ b/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit-already-built.js @@ -3030,7 +3030,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg2/index.d.ts @@ -3607,7 +3607,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -4079,7 +4079,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/randomFileForImport.ts @@ -4435,7 +4435,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/randomFileForImport.ts diff --git a/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit.js b/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit.js index b74b0043742..c9d1167f1f0 100644 --- a/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit.js +++ b/tests/baselines/reference/tscWatch/cacheResolutions/bundle-emit.js @@ -2966,7 +2966,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg2/index.d.ts @@ -3543,7 +3543,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/pkg0.d.ts @@ -4015,7 +4015,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/randomFileForImport.ts @@ -4371,7 +4371,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"module":2,"composite":true,"cacheResolutions":true,"traceResolution":true,"out":"./out.js","watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/randomFileForImport.ts diff --git a/tests/baselines/reference/tscWatch/cacheResolutions/multi-file-already-built.js b/tests/baselines/reference/tscWatch/cacheResolutions/multi-file-already-built.js index 250d1260c96..bccf2c6e97c 100644 --- a/tests/baselines/reference/tscWatch/cacheResolutions/multi-file-already-built.js +++ b/tests/baselines/reference/tscWatch/cacheResolutions/multi-file-already-built.js @@ -5320,7 +5320,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg2/import.d.ts @@ -6107,7 +6107,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -6741,7 +6741,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/randomFileForImport.ts @@ -7217,7 +7217,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/randomFileForImport.ts diff --git a/tests/baselines/reference/tscWatch/cacheResolutions/multi-file.js b/tests/baselines/reference/tscWatch/cacheResolutions/multi-file.js index 3c03e51d4ac..9721fe013a9 100644 --- a/tests/baselines/reference/tscWatch/cacheResolutions/multi-file.js +++ b/tests/baselines/reference/tscWatch/cacheResolutions/multi-file.js @@ -4766,7 +4766,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/fileWithTypeRefs.ts","/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg2/import.d.ts @@ -5553,7 +5553,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/node_modules/pkg0/import.d.ts @@ -6187,7 +6187,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/randomFileForImport.ts @@ -6663,7 +6663,7 @@ node_modules/@types/pkg4/index.d.ts Program root files: ["/src/project/randomFileForImport.ts","/src/project/randomFileForTypeRef.ts"] Program options: {"moduleResolution":3,"composite":true,"cacheResolutions":true,"traceResolution":true,"watch":true,"explainFiles":true,"extendedDiagnostics":true,"configFilePath":"/src/project/tsconfig.json"} -Program structureReused: Not +Program structureReused: SafeModuleCache Program files:: /a/lib/lib.d.ts /src/project/randomFileForImport.ts diff --git a/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit-not-built.js b/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit-not-built.js index eacf5d49a95..3afa8b907f1 100644 --- a/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit-not-built.js +++ b/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit-not-built.js @@ -883,7 +883,7 @@ Info 208 [00:04:58.000] Reusing resolution of type reference directive 'pkg3' f Info 209 [00:04:59.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. Info 210 [00:05:00.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. Info 211 [00:05:01.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. -Info 212 [00:05:02.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 212 [00:05:02.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 213 [00:05:03.000] Project '/src/project/tsconfig.json' (Configured) Info 214 [00:05:04.000] Files (8) /a/lib/lib.d.ts @@ -1000,7 +1000,7 @@ Info 233 [00:05:40.000] Starting updateGraphWorker: Project: /src/project/tscon Info 234 [00:05:41.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. Info 235 [00:05:42.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. Info 236 [00:05:43.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. -Info 237 [00:05:44.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 237 [00:05:44.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 238 [00:05:45.000] Project '/src/project/tsconfig.json' (Configured) Info 239 [00:05:46.000] Files (6) /a/lib/lib.d.ts @@ -1126,7 +1126,7 @@ Info 277 [00:06:41.000] File '/pkg0.jsx' does not exist. Info 278 [00:06:42.000] ======== Module name 'pkg0' was not resolved. ======== Info 279 [00:06:43.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. Info 280 [00:06:44.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. -Info 281 [00:06:45.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 281 [00:06:45.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 282 [00:06:46.000] Project '/src/project/tsconfig.json' (Configured) Info 283 [00:06:47.000] Files (5) /a/lib/lib.d.ts @@ -1232,7 +1232,7 @@ Info 306 [00:07:27.000] Directory '/src/node_modules' does not exist, skipping Info 307 [00:07:28.000] Directory '/node_modules' does not exist, skipping all lookups in it. Info 308 [00:07:29.000] ======== Type reference directive 'pkg2' was not resolved. ======== Info 309 [00:07:30.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. -Info 310 [00:07:31.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 310 [00:07:31.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 311 [00:07:32.000] Project '/src/project/tsconfig.json' (Configured) Info 312 [00:07:33.000] Files (4) /a/lib/lib.d.ts diff --git a/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit.js b/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit.js index eacf5d49a95..3afa8b907f1 100644 --- a/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit.js +++ b/tests/baselines/reference/tsserver/cacheResolutions/bundle-emit.js @@ -883,7 +883,7 @@ Info 208 [00:04:58.000] Reusing resolution of type reference directive 'pkg3' f Info 209 [00:04:59.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. Info 210 [00:05:00.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. Info 211 [00:05:01.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. -Info 212 [00:05:02.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 212 [00:05:02.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 213 [00:05:03.000] Project '/src/project/tsconfig.json' (Configured) Info 214 [00:05:04.000] Files (8) /a/lib/lib.d.ts @@ -1000,7 +1000,7 @@ Info 233 [00:05:40.000] Starting updateGraphWorker: Project: /src/project/tscon Info 234 [00:05:41.000] Reusing resolution of module 'pkg0' from '/src/project/randomFileForImport.ts' of old program, it was successfully resolved to '/src/project/pkg0.d.ts'. Info 235 [00:05:42.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. Info 236 [00:05:43.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. -Info 237 [00:05:44.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 237 [00:05:44.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 238 [00:05:45.000] Project '/src/project/tsconfig.json' (Configured) Info 239 [00:05:46.000] Files (6) /a/lib/lib.d.ts @@ -1126,7 +1126,7 @@ Info 277 [00:06:41.000] File '/pkg0.jsx' does not exist. Info 278 [00:06:42.000] ======== Module name 'pkg0' was not resolved. ======== Info 279 [00:06:43.000] Reusing resolution of type reference directive 'pkg2' from '/src/project/randomFileForTypeRef.ts' of old program, it was successfully resolved to '/src/project/node_modules/pkg2/index.d.ts'. Info 280 [00:06:44.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. -Info 281 [00:06:45.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 281 [00:06:45.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 282 [00:06:46.000] Project '/src/project/tsconfig.json' (Configured) Info 283 [00:06:47.000] Files (5) /a/lib/lib.d.ts @@ -1232,7 +1232,7 @@ Info 306 [00:07:27.000] Directory '/src/node_modules' does not exist, skipping Info 307 [00:07:28.000] Directory '/node_modules' does not exist, skipping all lookups in it. Info 308 [00:07:29.000] ======== Type reference directive 'pkg2' was not resolved. ======== Info 309 [00:07:30.000] Reusing resolution of type reference directive 'pkg4' from '/src/project/__inferred type names__.ts' of old program, it was successfully resolved to '/src/project/node_modules/@types/pkg4/index.d.ts'. -Info 310 [00:07:31.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 310 [00:07:31.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 311 [00:07:32.000] Project '/src/project/tsconfig.json' (Configured) Info 312 [00:07:33.000] Files (4) /a/lib/lib.d.ts diff --git a/tests/baselines/reference/tsserver/cacheResolutions/multi-file-not-built.js b/tests/baselines/reference/tsserver/cacheResolutions/multi-file-not-built.js index ba53926d2db..0ecd4f896b1 100644 --- a/tests/baselines/reference/tsserver/cacheResolutions/multi-file-not-built.js +++ b/tests/baselines/reference/tsserver/cacheResolutions/multi-file-not-built.js @@ -1400,7 +1400,7 @@ Info 490 [00:10:01.000] File '/a/lib/package.json' does not exist according to Info 491 [00:10:02.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 492 [00:10:03.000] File '/package.json' does not exist according to earlier cached lookups. Info 493 [00:10:04.000] FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution -Info 494 [00:10:05.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 494 [00:10:05.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 495 [00:10:06.000] Project '/src/project/tsconfig.json' (Configured) Info 496 [00:10:07.000] Files (8) /a/lib/lib.d.ts @@ -1558,7 +1558,7 @@ Info 533 [00:11:01.000] File '/a/lib/package.json' does not exist according to Info 534 [00:11:02.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 535 [00:11:03.000] File '/package.json' does not exist according to earlier cached lookups. Info 536 [00:11:04.000] FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution -Info 537 [00:11:05.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 537 [00:11:05.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 538 [00:11:06.000] Project '/src/project/tsconfig.json' (Configured) Info 539 [00:11:07.000] Files (6) /a/lib/lib.d.ts @@ -1725,7 +1725,7 @@ Info 599 [00:12:24.000] File '/package.json' does not exist according to earlie Info 600 [00:12:25.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. Info 601 [00:12:26.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 602 [00:12:27.000] File '/package.json' does not exist according to earlier cached lookups. -Info 603 [00:12:28.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 603 [00:12:28.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 604 [00:12:29.000] Project '/src/project/tsconfig.json' (Configured) Info 605 [00:12:30.000] Files (5) /a/lib/lib.d.ts @@ -1875,7 +1875,7 @@ Info 652 [00:13:34.000] File '/package.json' does not exist according to earlie Info 653 [00:13:35.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. Info 654 [00:13:36.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 655 [00:13:37.000] File '/package.json' does not exist according to earlier cached lookups. -Info 656 [00:13:38.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 656 [00:13:38.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 657 [00:13:39.000] Project '/src/project/tsconfig.json' (Configured) Info 658 [00:13:40.000] Files (4) /a/lib/lib.d.ts diff --git a/tests/baselines/reference/tsserver/cacheResolutions/multi-file.js b/tests/baselines/reference/tsserver/cacheResolutions/multi-file.js index 8621bf6379c..3afe13b7999 100644 --- a/tests/baselines/reference/tsserver/cacheResolutions/multi-file.js +++ b/tests/baselines/reference/tsserver/cacheResolutions/multi-file.js @@ -1863,7 +1863,7 @@ Info 490 [00:10:06.000] File '/a/lib/package.json' does not exist according to Info 491 [00:10:07.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 492 [00:10:08.000] File '/package.json' does not exist according to earlier cached lookups. Info 493 [00:10:09.000] FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg1/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution -Info 494 [00:10:10.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 494 [00:10:10.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 6 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 495 [00:10:11.000] Project '/src/project/tsconfig.json' (Configured) Info 496 [00:10:12.000] Files (8) /a/lib/lib.d.ts @@ -2021,7 +2021,7 @@ Info 533 [00:11:06.000] File '/a/lib/package.json' does not exist according to Info 534 [00:11:07.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 535 [00:11:08.000] File '/package.json' does not exist according to earlier cached lookups. Info 536 [00:11:09.000] FileWatcher:: Close:: WatchInfo: /src/project/node_modules/pkg3/package.json 2000 undefined Project: /src/project/tsconfig.json WatchType: File location affecting resolution -Info 537 [00:11:10.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 537 [00:11:10.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 7 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 538 [00:11:11.000] Project '/src/project/tsconfig.json' (Configured) Info 539 [00:11:12.000] Files (6) /a/lib/lib.d.ts @@ -2188,7 +2188,7 @@ Info 599 [00:12:29.000] File '/package.json' does not exist according to earlie Info 600 [00:12:30.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. Info 601 [00:12:31.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 602 [00:12:32.000] File '/package.json' does not exist according to earlier cached lookups. -Info 603 [00:12:33.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 603 [00:12:33.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 8 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 604 [00:12:34.000] Project '/src/project/tsconfig.json' (Configured) Info 605 [00:12:35.000] Files (5) /a/lib/lib.d.ts @@ -2338,7 +2338,7 @@ Info 652 [00:13:39.000] File '/package.json' does not exist according to earlie Info 653 [00:13:40.000] File '/a/lib/package.json' does not exist according to earlier cached lookups. Info 654 [00:13:41.000] File '/a/package.json' does not exist according to earlier cached lookups. Info 655 [00:13:42.000] File '/package.json' does not exist according to earlier cached lookups. -Info 656 [00:13:43.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info 656 [00:13:43.000] Finishing updateGraphWorker: Project: /src/project/tsconfig.json Version: 9 structureChanged: true structureIsReused:: SafeModuleCache Elapsed:: *ms Info 657 [00:13:44.000] Project '/src/project/tsconfig.json' (Configured) Info 658 [00:13:45.000] Files (4) /a/lib/lib.d.ts