diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 01c325c443d77..d841fb6c44bb1 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -57,6 +57,7 @@ import { hasProperty, hasTrailingDirectorySeparator, hostGetCanonicalFileName, + identity, inferredTypesContainingFile, isArray, isDeclarationFileName, @@ -633,11 +634,15 @@ export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string affectingLocations: initializeResolutionField(affectingLocations), resolutionDiagnostics: initializeResolutionField(diagnostics), }; - if (containingDirectory && cache && !cache.isReadonly) { - cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(typeReferenceDirectiveName, /*mode*/ resolutionMode, result); - if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) { - cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result); - } + if (containingDirectory) { + setPerDirectoryAndNonRelativeNameCacheResult( + cache, + typeReferenceDirectiveName, + resolutionMode, + containingDirectory, + redirectedReference, + result, + ); } if (traceEnabled) traceResult(result); return result; @@ -843,7 +848,10 @@ export function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: M } export interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache, NonRelativeNameResolutionCache, PackageJsonInfoCache { - /** @internal */ clearAllExceptPackageJsonInfoCache(): void; +} + +/** @internal */ +export interface TypeReferenceDirectiveResolutionCache extends ModuleOrTypeReferenceResolutionCache { } export interface ModeAwareCache { @@ -881,19 +889,23 @@ export interface NonRelativeNameResolutionCache { * This updates the redirects map as well if needed so module resolutions are cached if they can across the projects */ update(options: CompilerOptions): void; + /** @internal */ moduleNameToDirectoryMap: CacheWithRedirects>; /** @internal */ isReadonly?: boolean; } export interface PerNonRelativeNameCache { get(directory: string): T | undefined; set(directory: string, result: T): void; + /** @inernal */ directoryPathMap: Map; /** @internal */ isReadonly?: boolean; } export interface ModuleResolutionCache extends PerDirectoryResolutionCache, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache { getPackageJsonInfoCache(): PackageJsonInfoCache; - /** @internal */ clearAllExceptPackageJsonInfoCache(): void; - /** @internal */ optionsToRedirectsKey: Map; +} + +/** @internal */ +export interface ModuleResolutionCache extends ModuleOrTypeReferenceResolutionCache { } /** @@ -962,6 +974,7 @@ export interface CacheWithRedirects { update(newOptions: CompilerOptions): void; clear(): void; getOwnMap(): Map; + redirectsKeyToMap: Map>; } /** @internal */ @@ -978,6 +991,7 @@ function createCacheWithRedirects(ownOptions: CompilerOptions | undefined, update, clear, getOwnMap: () => ownMap, + redirectsKeyToMap, }; function getMapOfCacheRedirects(redirectedReference: ResolvedProjectReference | undefined): Map | undefined { @@ -1073,6 +1087,7 @@ function createPerDirectoryResolutionCache( getCanonicalFileName: GetCanonicalFileName, options: CompilerOptions | undefined, optionsToRedirectsKey: Map, + getValidResolution: (resolution: T | undefined) => T | undefined, ): PerDirectoryResolutionCache { const directoryToModuleNameMap = createCacheWithRedirects>(options, optionsToRedirectsKey); return { @@ -1098,7 +1113,7 @@ function createPerDirectoryResolutionCache( function getFromDirectoryCache(name: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined) { const path = toPath(directoryName, currentDirectory, getCanonicalFileName); - return directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)?.get(path)?.get(name, mode); + return getValidResolution(directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)?.get(path)?.get(name, mode)); } } @@ -1162,6 +1177,7 @@ function createNonRelativeNameResolutionCache( options: CompilerOptions | undefined, getResolvedFileName: (result: T) => string | undefined, optionsToRedirectsKey: Map, + getValidResolution: (resolution: T | undefined) => T | undefined, ): NonRelativeNameResolutionCache { const moduleNameToDirectoryMap = createCacheWithRedirects>(options, optionsToRedirectsKey); return { @@ -1169,6 +1185,7 @@ function createNonRelativeNameResolutionCache( getOrCreateCacheForNonRelativeName, clear, update, + moduleNameToDirectoryMap, }; function clear() { @@ -1181,21 +1198,32 @@ function createNonRelativeNameResolutionCache( function getFromNonRelativeNameCache(nonRelativeModuleName: string, mode: ResolutionMode, directoryName: string, redirectedReference?: ResolvedProjectReference): T | undefined { Debug.assert(!isExternalModuleNameRelative(nonRelativeModuleName)); - return moduleNameToDirectoryMap.getMapOfCacheRedirects(redirectedReference)?.get(createModeAwareCacheKey(nonRelativeModuleName, mode))?.get(directoryName); + return moduleNameToDirectoryMap.getMapOfCacheRedirects(redirectedReference)?.get( + createModeAwareCacheKey(nonRelativeModuleName, mode), + )?.get(directoryName); } function getOrCreateCacheForNonRelativeName(nonRelativeModuleName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerNonRelativeNameCache { Debug.assert(!isExternalModuleNameRelative(nonRelativeModuleName)); - return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, createModeAwareCacheKey(nonRelativeModuleName, mode), createPerModuleNameCache); + return getOrCreateCache( + moduleNameToDirectoryMap, + redirectedReference, + createModeAwareCacheKey(nonRelativeModuleName, mode), + createPerModuleNameCache, + ); } function createPerModuleNameCache(): PerNonRelativeNameCache { const directoryPathMap = new Map(); - return { get, set }; + return { get, set, directoryPathMap }; function get(directory: string): T | undefined { - return directoryPathMap.get(toPath(directory, currentDirectory, getCanonicalFileName)); + return getByPath(toPath(directory, currentDirectory, getCanonicalFileName)); + } + + function getByPath(directoryPath: Path): T | undefined { + return getValidResolution(directoryPathMap.get(directoryPath)); } /** @@ -1212,32 +1240,45 @@ function createNonRelativeNameResolutionCache( function set(directory: string, result: T): void { const path = toPath(directory, currentDirectory, getCanonicalFileName); // if entry is already in cache do nothing - if (directoryPathMap.has(path)) { + if (getByPath(path)) { return; } + + const existing = directoryPathMap.get(path); + // Remove invalidated result from parent + if (existing) { + const existingCommonPrefix = getCommonPrefix(path, existing); + withCommonPrefix(path, existingCommonPrefix, parent => directoryPathMap.delete(parent)); + } + directoryPathMap.set(path, result); - const resolvedFileName = getResolvedFileName(result); // find common prefix between directory and resolved file name // this common prefix should be the shortest path that has the same resolution // directory: /a/b/c/d/e // resolvedFileName: /a/b/foo.d.ts // commonPrefix: /a/b // for failed lookups cache the result for every directory up to root - const commonPrefix = resolvedFileName && getCommonPrefix(path, resolvedFileName); + const commonPrefix = getCommonPrefix(path, result); + withCommonPrefix(path, commonPrefix, parent => directoryPathMap.set(parent, result)); + } + + function withCommonPrefix(path: Path, commonPrefix: Path | undefined, action: (parent: Path) => void) { let current = path; while (current !== commonPrefix) { const parent = getDirectoryPath(current); - if (parent === current || directoryPathMap.has(parent)) { + if (parent === current || getByPath(parent)) { break; } - directoryPathMap.set(parent, result); + action(parent); current = parent; } } - function getCommonPrefix(directory: Path, resolution: string) { - const resolutionDirectory = toPath(getDirectoryPath(resolution), currentDirectory, getCanonicalFileName); + function getCommonPrefix(directory: Path, resolution: T) { + const resolvedFileName = getResolvedFileName(resolution); + if (!resolvedFileName) return undefined; + const resolutionDirectory = toPath(getDirectoryPath(resolvedFileName), currentDirectory, getCanonicalFileName); // find first position where directory and resolution differs let i = 0; @@ -1256,12 +1297,13 @@ function createNonRelativeNameResolutionCache( if (sep === -1) { return undefined; } - return directory.substr(0, Math.max(sep, rootLength)); + return directory.substr(0, Math.max(sep, rootLength)) as Path; } } } -interface ModuleOrTypeReferenceResolutionCache extends PerDirectoryResolutionCache, NonRelativeNameResolutionCache, PackageJsonInfoCache { +/** @internal */ +export interface ModuleOrTypeReferenceResolutionCache extends PerDirectoryResolutionCache, NonRelativeNameResolutionCache, PackageJsonInfoCache { getPackageJsonInfoCache(): PackageJsonInfoCache; clearAllExceptPackageJsonInfoCache(): void; optionsToRedirectsKey: Map; @@ -1273,13 +1315,16 @@ function createModuleOrTypeReferenceResolutionCache( packageJsonInfoCache: PackageJsonInfoCache | undefined, getResolvedFileName: (result: T) => string | undefined, optionsToRedirectsKey: Map | undefined, + getValidResolution: ((resolution: T | undefined) => T | undefined) | undefined, ): ModuleOrTypeReferenceResolutionCache { optionsToRedirectsKey ??= new Map(); + getValidResolution ??= identity; const perDirectoryResolutionCache = createPerDirectoryResolutionCache( currentDirectory, getCanonicalFileName, options, optionsToRedirectsKey, + getValidResolution, ); const nonRelativeNameResolutionCache = createNonRelativeNameResolutionCache( currentDirectory, @@ -1287,6 +1332,7 @@ function createModuleOrTypeReferenceResolutionCache( options, getResolvedFileName, optionsToRedirectsKey, + getValidResolution, ); packageJsonInfoCache ??= createPackageJsonInfoCache(currentDirectory, getCanonicalFileName); @@ -1317,6 +1363,24 @@ function createModuleOrTypeReferenceResolutionCache( } } +/** @internal */ +export function setPerDirectoryAndNonRelativeNameCacheResult( + cache: ModuleOrTypeReferenceResolutionCache | undefined, + name: string, + mode: ResolutionMode, + directoryName: string, + redirectedReference: ResolvedProjectReference | undefined, + result: T, +) { + if (cache && !cache.isReadonly) { + cache.getOrCreateCacheForDirectory(directoryName, redirectedReference).set(name, mode, result); + if (!isExternalModuleNameRelative(name)) { + // put result in per-module name cache + cache.getOrCreateCacheForNonRelativeName(name, mode, redirectedReference).set(directoryName, result); + } + } +} + export function createModuleResolutionCache( currentDirectory: string, getCanonicalFileName: (s: string) => string, @@ -1329,7 +1393,10 @@ export function createModuleResolutionCache( getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache, - optionsToRedirectsKey?: Map, // eslint-disable-line @typescript-eslint/unified-signatures + optionsToRedirectsKey?: Map, + getValidResolution?: ( // eslint-disable-line @typescript-eslint/unified-signatures + resolution: ResolvedModuleWithFailedLookupLocations | undefined, + ) => ResolvedModuleWithFailedLookupLocations | undefined, ): ModuleResolutionCache; export function createModuleResolutionCache( currentDirectory: string, @@ -1337,6 +1404,7 @@ export function createModuleResolutionCache( options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache, optionsToRedirectsKey?: Map, + getValidResolution?: (resolution: ResolvedModuleWithFailedLookupLocations | undefined) => ResolvedModuleWithFailedLookupLocations | undefined, ): ModuleResolutionCache { const result = createModuleOrTypeReferenceResolutionCache( currentDirectory, @@ -1345,6 +1413,7 @@ export function createModuleResolutionCache( packageJsonInfoCache, getOriginalOrResolvedModuleFileName, optionsToRedirectsKey, + getValidResolution, ) as ModuleResolutionCache; result.getOrCreateCacheForModuleName = (nonRelativeName, mode, redirectedReference) => result.getOrCreateCacheForNonRelativeName(nonRelativeName, mode, redirectedReference); return result; @@ -1362,7 +1431,10 @@ export function createTypeReferenceDirectiveResolutionCache( getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache, - optionsToRedirectsKey?: Map, // eslint-disable-line @typescript-eslint/unified-signatures + optionsToRedirectsKey?: Map, + getValidResolution?: ( // eslint-disable-line @typescript-eslint/unified-signatures + resolution: ResolvedTypeReferenceDirectiveWithFailedLookupLocations | undefined, + ) => ResolvedTypeReferenceDirectiveWithFailedLookupLocations | undefined, ): TypeReferenceDirectiveResolutionCache; export function createTypeReferenceDirectiveResolutionCache( currentDirectory: string, @@ -1370,6 +1442,7 @@ export function createTypeReferenceDirectiveResolutionCache( options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache, optionsToRedirectsKey?: Map, + getValidResolution?: (resolution: ResolvedTypeReferenceDirectiveWithFailedLookupLocations | undefined) => ResolvedTypeReferenceDirectiveWithFailedLookupLocations | undefined, ): TypeReferenceDirectiveResolutionCache { return createModuleOrTypeReferenceResolutionCache( currentDirectory, @@ -1378,6 +1451,7 @@ export function createTypeReferenceDirectiveResolutionCache( packageJsonInfoCache, getOriginalOrResolvedTypeReferenceFileName, optionsToRedirectsKey, + getValidResolution, ); } @@ -1449,13 +1523,14 @@ export function resolveModuleName(moduleName: string, containingFile: string, co return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`); } - if (cache && !cache.isReadonly) { - cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); - if (!isExternalModuleNameRelative(moduleName)) { - // put result in per-module name cache - cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); - } - } + setPerDirectoryAndNonRelativeNameCacheResult( + cache, + moduleName, + resolutionMode, + containingDirectory, + redirectedReference, + result, + ); } if (traceEnabled) { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a4bb05b3f78fd..cd59eaaf489d7 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -275,7 +275,6 @@ import { removeSuffix, resolutionExtensionIsTSOrJson, ResolutionMode, - ResolutionWithFailedLookupLocations, resolveConfigFileProjectName, ResolvedConfigFileName, ResolvedModuleFull, @@ -1968,6 +1967,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg getResolvedProjectReferenceByPath, forEachResolvedProjectReference, isSourceOfProjectReferenceRedirect, + getRedirectReferenceForResolution, getRedirectReferenceForResolutionFromSourceOfProject, emitBuildInfo, fileExists, @@ -4156,7 +4156,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg resolveModuleNamesReusingOldState(moduleNames, file); Debug.assert(resolutions.length === moduleNames.length); const optionsForFile = redirectedReference?.commandLine.options || options; - const resolutionsInFile = createModeAwareCache(); + const resolutionsInFile = createModeAwareCache(); (resolvedModules ??= new Map()).set(file.path, resolutionsInFile); for (let index = 0; index < moduleNames.length; index++) { const resolution = resolutions[index].resolvedModule; diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 495e1bd43240a..9f743da2f41db 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -3,7 +3,6 @@ import { clearMap, closeFileWatcher, closeFileWatcherOf, - CompilerHostSupportingResolutionCache, CompilerOptions, createModeAwareCache, createModuleResolutionCache, @@ -47,6 +46,7 @@ import { memoize, MinimalResolutionCacheHost, ModeAwareCache, + ModuleOrTypeReferenceResolutionCache, ModuleResolutionCache, moduleResolutionNameAndModeGetter, mutateMap, @@ -99,80 +99,7 @@ export type CallbackOnNewResolution { - rootDirForResolution: string; - resolvedModuleNames: Map>; - resolvedTypeReferenceDirectives: Map>; - resolvedLibraries: Map; - resolvedFileToResolution: Map>; - resolutionsWithFailedLookups: Set; - resolutionsWithOnlyAffectingLocations: Set; - directoryWatchesOfFailedLookups: Map; - fileWatchesOfAffectingLocations: Map; - packageDirWatchers: Map; - dirPathToSymlinkPackageRefCount: Map; - countResolutionsResolvedWithGlobalCache(): number; - countResolutionsResolvedWithoutGlobalCache(): number; - - watchResolution( - resolution: T, - filePath: Path, - getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, - ): void; - - resolveModuleNameLiterals( - moduleLiterals: readonly StringLiteralLike[], - containingFile: string, - redirectedReference: ResolvedProjectReference | undefined, - options: CompilerOptions, - containingSourceFile: SourceFile, - reusedNames: readonly StringLiteralLike[] | undefined, - ambientModuleNames: readonly StringLiteralLike[] | undefined, - onNewResolution?: CallbackOnNewResolution, - ): readonly ResolvedModuleWithFailedLookupLocations[]; - resolveTypeReferenceDirectiveReferences( - typeDirectiveReferences: readonly T[], - containingFile: string, - redirectedReference: ResolvedProjectReference | undefined, - options: CompilerOptions, - containingSourceFile: SourceFile | undefined, - reusedNames: readonly T[] | undefined, - ): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; - resolveLibrary( - libraryName: string, - resolveFrom: string, - options: CompilerOptions, - libFileName: string, - ): ResolvedModuleWithFailedLookupLocations; - resolveSingleModuleNameWithoutWatching( - moduleName: string, - containingFile: string, - ): ResolvedModuleWithFailedLookupLocations; - - invalidateResolutionsOfFailedLookupLocations(): boolean; - invalidateResolutionsWithGlobalCachePass(): void; - invalidateResolutionsWithoutGlobalCachePass(): void; - invalidateUnresolvedResolutionsWithGlobalCachePass(): void; - invalidateResolutionOfFile(filePath: Path): void; - removeResolutionsOfFile(filePath: Path): void; - removeResolutionsFromProjectReferenceRedirects(filePath: Path): void; - createHasInvalidatedResolutions( - customHasInvalidatedResolutions: HasInvalidatedResolutions, - customHasInvalidatedLibResolutions: HasInvalidatedLibResolutions, - ): HasInvalidatedFromResolutionCache; - hasChangedAutomaticTypeDirectiveNames(): boolean; - - startCachingPerDirectoryResolution(): void; - finishCachingPerDirectoryResolution(newProgram: Program | undefined, oldProgram: Program | undefined): void; - - updateTypeRootsWatch(): void; - closeTypeRootsWatch(): void; - - getModuleResolutionCache(): ModuleResolutionCache; - - clear(): void; - onChangesAffectModuleResolution(): void; -} +export type ResolutionCache = ReturnType; /** @internal */ export interface ResolutionWithFailedLookupLocations { @@ -188,12 +115,13 @@ export interface ResolutionWithFailedLookupLocations { globalCacheResolution?: boolean; } -/** @internal */ -export interface CachedResolvedModuleWithFailedLookupLocations extends ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations { -} - -/** @internal */ -export interface CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations { +declare module "./types.js" { + /** @internal */ + export interface ResolvedModuleWithFailedLookupLocations extends ResolutionWithFailedLookupLocations { + } + /** @internal */ + export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ResolutionWithFailedLookupLocations { + } } /** @internal */ @@ -597,11 +525,16 @@ function resolveModuleNameUsingGlobalCache( /** @internal */ export type GetResolutionWithResolvedFileName = (resolution: T) => R | undefined; +function getModuleOrTypeRefResolved(resolution: ResolutionWithFailedLookupLocations) { + return (resolution as ResolvedModuleWithFailedLookupLocations).resolvedModule ?? + (resolution as ResolvedTypeReferenceDirectiveWithFailedLookupLocations).resolvedTypeReferenceDirective; +} + /** @internal */ export function createResolutionCache( resolutionHost: ResolutionCacheHost, rootDirForResolution: string, -): ResolutionCache { +) { let filesWithInvalidatedResolutions: Set | undefined; const resolutionsWithFailedLookups = new Set(); @@ -620,34 +553,44 @@ export function createResolutionCache( let resolutionsWithoutGlobalCachePassAreInvalidated = false; let unresolvedResolutionsWithGlobalCachePassAreInvalidated = false; + let potentiallyUnreferencedResolutions: Map, Set> | undefined; + let potentiallyUnreferencedDirWatchers: Set | undefined; + let newUnresolvedResolutionCachePassResolutions: Set | undefined; + const getCurrentDirectory = memoize(() => resolutionHost.getCurrentDirectory!()); const cachedDirectoryStructureHost = resolutionHost.getCachedDirectoryStructureHost(); // The resolvedModuleNames and resolvedTypeReferenceDirectives are the cache of resolutions per file. // The key in the map is source file's path. // The values are Map of resolutions with key being name lookedup. - const resolvedModuleNames = new Map>(); + const resolvedModuleNames = new Map>(); const moduleResolutionCache = createModuleResolutionCache( getCurrentDirectory(), resolutionHost.getCanonicalFileName, resolutionHost.getCompilationSettings(), + /*packageJsonInfoCache*/ undefined, + /*optionsToRedirectsKey*/ undefined, + getValidResolution, ); - const resolvedTypeReferenceDirectives = new Map>(); + const resolvedTypeReferenceDirectives = new Map>(); const typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache( getCurrentDirectory(), resolutionHost.getCanonicalFileName, resolutionHost.getCompilationSettings(), moduleResolutionCache.getPackageJsonInfoCache(), moduleResolutionCache.optionsToRedirectsKey, + getValidResolution, ); - const resolvedLibraries = new Map(); + const resolvedLibraries = new Map(); const libraryResolutionCache = createModuleResolutionCache( getCurrentDirectory(), resolutionHost.getCanonicalFileName, getOptionsForLibraryResolution(resolutionHost.getCompilationSettings()), moduleResolutionCache.getPackageJsonInfoCache(), + /*optionsToRedirectsKey*/ undefined, + getValidResolution, ); let resolutionsResolvedWithGlobalCache = 0; @@ -671,6 +614,9 @@ export function createResolutionCache( resolvedModuleNames, resolvedTypeReferenceDirectives, resolvedLibraries, + moduleResolutionCache, + typeReferenceDirectiveResolutionCache, + libraryResolutionCache, resolvedFileToResolution, resolutionsWithFailedLookups, resolutionsWithOnlyAffectingLocations, @@ -681,7 +627,6 @@ export function createResolutionCache( countResolutionsResolvedWithGlobalCache: () => resolutionsResolvedWithGlobalCache, countResolutionsResolvedWithoutGlobalCache: () => resolutionsResolvedWithoutGlobalCache, watchResolution, - getModuleResolutionCache: () => moduleResolutionCache, // perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update // (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution) startCachingPerDirectoryResolution, @@ -708,6 +653,9 @@ export function createResolutionCache( }; function clear() { + potentiallyUnreferencedResolutions = undefined; + potentiallyUnreferencedDirWatchers = undefined; + newUnresolvedResolutionCachePassResolutions = undefined; clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf); clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf); isSymlinkCache.clear(); @@ -742,6 +690,8 @@ export function createResolutionCache( function onChangesAffectModuleResolution() { allModuleAndTypeResolutionsAreInvalidated = true; + // TODO: (sheetal) Here we want to update own options and retain existing resolutions as is + // We will reuse those resolutions where we can and then do cleanup of resolutions that are no longer needed moduleResolutionCache.clearAllExceptPackageJsonInfoCache(); typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache(); moduleResolutionCache.update(resolutionHost.getCompilationSettings()); @@ -775,9 +725,6 @@ export function createResolutionCache( typeReferenceDirectiveResolutionCache.isReadonly = undefined; libraryResolutionCache.isReadonly = undefined; moduleResolutionCache.getPackageJsonInfoCache().isReadonly = undefined; - moduleResolutionCache.clearAllExceptPackageJsonInfoCache(); - typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache(); - libraryResolutionCache.clearAllExceptPackageJsonInfoCache(); isSymlinkCache.clear(); } @@ -787,7 +734,7 @@ export function createResolutionCache( stopWatchFailedLookupLocationOfResolution( resolution, resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)), - getResolvedModuleFromResolution, + libraryResolutionCache, ); resolvedLibraries.delete(libFileName); } @@ -799,8 +746,15 @@ export function createResolutionCache( resolutionsWithGlobalCachePassAreInvalidated = false; resolutionsWithoutGlobalCachePassAreInvalidated = false; unresolvedResolutionsWithGlobalCachePassAreInvalidated = false; + newUnresolvedResolutionCachePassResolutions = undefined; + let potentiallyUnReferencedFileWatcherOfAffectingLocation: Map | undefined; // Update file watches if (newProgram !== oldProgram) { + const releaseFileWatcherOfAffectingLocation = (location: string) => { + const watcher = fileWatchesOfAffectingLocations.get(location)!; + watcher.files--; + (potentiallyUnReferencedFileWatcherOfAffectingLocation ??= new Map()).set(location, watcher); + }; cleanupLibResolutionWatching(newProgram); newProgram?.getSourceFiles().forEach(newFile => { const expected = isExternalOrCommonJsModule(newFile) ? newFile.packageJsonLocations?.length ?? 0 : 0; @@ -810,7 +764,7 @@ export function createResolutionCache( } if (existing.length > expected) { for (let i = expected; i < existing.length; i++) { - fileWatchesOfAffectingLocations.get(existing[i])!.files--; + releaseFileWatcherOfAffectingLocation(existing[i]); } } if (expected) impliedFormatPackageJsons.set(newFile.resolvedPath, newFile.packageJsonLocations!); @@ -819,14 +773,23 @@ export function createResolutionCache( impliedFormatPackageJsons.forEach((existing, path) => { const newFile = newProgram?.getSourceFileByPath(path); if (!newFile || newFile.resolvedPath !== path) { - existing.forEach(location => fileWatchesOfAffectingLocations.get(location)!.files--); + existing.forEach(releaseFileWatcherOfAffectingLocation); impliedFormatPackageJsons.delete(path); } }); } - directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup); - fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation); - packageDirWatchers.forEach(closePackageDirWatcher); + potentiallyUnReferencedFileWatcherOfAffectingLocation?.forEach(closeFileWatcherOfAffectingLocation); + potentiallyUnReferencedFileWatcherOfAffectingLocation = undefined; + // These are only dir watchers that were potentially removed because packageDir symlink status changed while watching resolutions + potentiallyUnreferencedDirWatchers?.forEach(path => + closeDirectoryWatchesOfFailedLookup( + directoryWatchesOfFailedLookups.get(path)!, + path, + ) + ); + potentiallyUnreferencedDirWatchers = undefined; + potentiallyUnreferencedResolutions?.forEach(gcModuleOrTypeRefCache); + potentiallyUnreferencedResolutions = undefined; hasChangedAutomaticTypeDirectiveNames = false; moduleResolutionCache.isReadonly = true; typeReferenceDirectiveResolutionCache.isReadonly = true; @@ -835,6 +798,37 @@ export function createResolutionCache( isSymlinkCache.clear(); } + function gcModuleOrTypeRefCache( + setOfResolutions: Set, + cache: ModuleOrTypeReferenceResolutionCache, + ) { + let needsGc = false; + setOfResolutions.forEach(resolution => { + if (resolution.files!.size) return; + needsGc = true; + releaseResolution(resolution); + }); + if (needsGc) { + // TODO:: sheetal + // Iterate through maps to remove things that have 0 refCount + + // TODO: sheetal working on how to gc moduleOrTypeRef cache: + // | --- a --- file.ts + // | -- b.ts + // | -- c -- another.ts + + // When we remove for file: a/File.ts + // -- do we remove resolutions in directory a? + // -- if yes = we need to update failed lookups and affecting locations - too compicated ? + // I htink we shouldnt remove from directory a till resolution ref reaches 0 as we would be anyways watching these resolutions + // - but that means we have to scan the whole directory to gc ?? + // How do we verify incrementally then? - should we only check that they are correct from expected to resolution + // And check that non of the other ones in the actual cache are invalidated or 0 ref? + // Also this makes it difficult because resolution needs to have name and mode as well + // Should we jsut store it on "ResolutionWihtFailedLookups" and verify it matches or do we build set and release with that data as function - may be later is better + } + } + function closePackageDirWatcher(watcher: PackageDirWatcher, packageDirPath: Path) { if (watcher.dirPathToWatcher.size === 0) { packageDirWatchers.delete(packageDirPath); @@ -855,11 +849,22 @@ export function createResolutionCache( } } - function isResolutionInvalidatedPerGlobalCacheOptions(resolution: ResolutionWithFailedLookupLocations) { - if (resolutionsWithGlobalCachePassAreInvalidated && resolution.globalCacheResolution) return true; - if (resolutionsWithoutGlobalCachePassAreInvalidated && resolution.globalCacheResolution === false) return true; - if (unresolvedResolutionsWithGlobalCachePassAreInvalidated && resolution.globalCacheResolution && isUnresolvedOrResolvedToJs(resolution as ResolvedModuleWithFailedLookupLocations)) return true; - return false; + function getValidResolution(resolution: T | undefined) { + return isInvalidatedResolution(resolution) ? undefined : resolution; + } + + function isInvalidatedResolution(resolution: ResolutionWithFailedLookupLocations | undefined) { + // TODO:: sheetal - waht about refcount = 0 + return !resolution || + resolution.isInvalidated || + (resolutionsWithGlobalCachePassAreInvalidated && resolution.globalCacheResolution) || + (resolutionsWithoutGlobalCachePassAreInvalidated && resolution.globalCacheResolution === false) || + // If this is not a new resolution and its unresolved, its invalid + (!newUnresolvedResolutionCachePassResolutions?.has(resolution) && isInvalidatedUnResolvedGlobalCachePassResolution(resolution)); + } + + function isInvalidatedUnResolvedGlobalCachePassResolution(resolution: ResolutionWithFailedLookupLocations) { + return (unresolvedResolutionsWithGlobalCachePassAreInvalidated && resolution.globalCacheResolution && isUnresolvedOrResolvedToJs(resolution as ResolvedModuleWithFailedLookupLocations)); } interface ResolveNamesWithLocalCacheInput { @@ -871,6 +876,7 @@ export function createResolutionCache( reusedNames?: readonly Entry[]; ambientEntries?: readonly Entry[]; perFileCache: Map>; + moduleOrTypeRefCache: ModuleOrTypeReferenceResolutionCache; loader: ResolutionLoader; getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName; onNewResolution?: CallbackOnNewResolution; @@ -882,6 +888,7 @@ export function createResolutionCache( redirectedReference, options, perFileCache, + moduleOrTypeRefCache, reusedNames, ambientEntries, loader, @@ -910,9 +917,7 @@ export function createResolutionCache( ( allModuleAndTypeResolutionsAreInvalidated || unmatchedRedirects || - !resolution || - resolution.isInvalidated || - isResolutionInvalidatedPerGlobalCacheOptions(resolution) + isInvalidatedResolution(resolution) ) ) { const existingResolution = resolution; @@ -924,9 +929,13 @@ export function createResolutionCache( if (resolution !== existingResolution) { watchResolution(resolution, path, getResolutionWithResolvedFileName); if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + stopWatchFailedLookupLocationOfResolution(existingResolution, path, moduleOrTypeRefCache); } } + // Store new resolutions that are unresolved during global cache pass so we dont see them as invalidated and calculate resolution again + if (isInvalidatedUnResolvedGlobalCachePassResolution(resolution)) { + (newUnresolvedResolutionCachePassResolutions ??= new Set()).add(resolution); + } onNewResolution?.(existingResolution, resolution, path, name, mode); } else { @@ -967,12 +976,12 @@ export function createResolutionCache( resolutionsInFile, seenNamesInFile, nameAndModeGetter: loader.nameAndMode, - getResolutionWithResolvedFileName, + moduleOrTypeRefCache, }); return resolvedModules; } - interface OnReusedResolutionsInput { + interface OnReusedResolutionsInput { reusedNames: readonly Entry[] | undefined; containingSourceFile: SourceFile; redirectedReference: ResolvedProjectReference | undefined; @@ -982,9 +991,9 @@ export function createResolutionCache( resolutionsInFile: ModeAwareCache | undefined; seenNamesInFile?: ModeAwareCache; nameAndModeGetter: ResolutionNameAndModeGetter; - getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName; + moduleOrTypeRefCache: ModuleOrTypeReferenceResolutionCache; } - function onReusedResolutions({ + function onReusedResolutions({ reusedNames, containingSourceFile, redirectedReference, @@ -993,9 +1002,9 @@ export function createResolutionCache( resolutionsInFile, seenNamesInFile, nameAndModeGetter, - getResolutionWithResolvedFileName, ambientEntries, - }: OnReusedResolutionsInput) { + moduleOrTypeRefCache, + }: OnReusedResolutionsInput) { if (!resolutionsInFile) return; if (!seenNamesInFile) seenNamesInFile = createModeAwareCache(); reusedNames?.forEach(entry => @@ -1021,7 +1030,7 @@ export function createResolutionCache( // Stop watching and remove the unused name resolutionsInFile.forEach((resolution, name, mode) => { if (!seenNamesInFile.has(name, mode)) { - stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName); + stopWatchFailedLookupLocationOfResolution(resolution, path, moduleOrTypeRefCache); resolutionsInFile.delete(name, mode); } }); @@ -1044,7 +1053,7 @@ export function createResolutionCache( path: containingSourceFile.path, resolutionsInFile: resolvedModuleNames.get(containingSourceFile.path), nameAndModeGetter: moduleResolutionNameAndModeGetter, - getResolutionWithResolvedFileName: getResolvedModuleFromResolution, + moduleOrTypeRefCache: moduleResolutionCache, }); } @@ -1065,7 +1074,7 @@ export function createResolutionCache( path, resolutionsInFile: resolvedTypeReferenceDirectives.get(path), nameAndModeGetter: typeReferenceResolutionNameAndModeGetter, - getResolutionWithResolvedFileName: getResolvedTypeReferenceDirectiveFromResolution, + moduleOrTypeRefCache: typeReferenceDirectiveResolutionCache, }); } @@ -1085,6 +1094,7 @@ export function createResolutionCache( options, reusedNames, perFileCache: resolvedTypeReferenceDirectives, + moduleOrTypeRefCache: typeReferenceDirectiveResolutionCache, loader: createTypeReferenceResolutionLoader( containingFile, redirectedReference, @@ -1115,6 +1125,7 @@ export function createResolutionCache( reusedNames, ambientEntries: ambientModuleNames, perFileCache: resolvedModuleNames, + moduleOrTypeRefCache: moduleResolutionCache, loader: createModuleResolutionLoaderUsingGlobalCache( containingFile, redirectedReference, @@ -1135,19 +1146,19 @@ export function createResolutionCache( ) { const host = getModuleResolutionHost(resolutionHost); let resolution = resolvedLibraries?.get(libFileName); - if (!resolution || resolution.isInvalidated) { + if (isInvalidatedResolution(resolution)) { const existingResolution = resolution; resolution = ts_resolveLibrary(libraryName, resolveFrom, options, host, libraryResolutionCache); const path = resolutionHost.toPath(resolveFrom); watchResolution(resolution, path, getResolvedModuleFromResolution); resolvedLibraries.set(libFileName, resolution); if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModuleFromResolution); + stopWatchFailedLookupLocationOfResolution(existingResolution, path, libraryResolutionCache); } } else { if (isTraceEnabled(options, host)) { - const resolved = getResolvedModuleFromResolution(resolution); + const resolved = getResolvedModuleFromResolution(resolution!); trace( host, resolved?.resolvedFileName ? @@ -1162,7 +1173,7 @@ export function createResolutionCache( ); } } - return resolution; + return resolution!; } function resolveSingleModuleNameWithoutWatching(moduleName: string, containingFile: string) { @@ -1193,10 +1204,11 @@ export function createResolutionCache( filePath: Path, getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, ) { + const firstTime = !resolution.files; (resolution.files ??= new Set()).add(filePath); watchFailedLookupLocationOfResolution(resolution); watchAffectingLocationsOfResolution(resolution); - if (resolution.files.size !== 1) return; + if (!firstTime) return; if (resolution.globalCacheResolution) resolutionsResolvedWithGlobalCache++; else if (resolution.globalCacheResolution === false) resolutionsResolvedWithoutGlobalCache++; const resolved = getResolutionWithResolvedFileName(resolution); @@ -1362,7 +1374,7 @@ export function createResolutionCache( else if (packageDirWatcher.isSymlink !== isSymlink) { // Handle the change packageDirWatcher.dirPathToWatcher.forEach(watcher => { - removeDirectoryWatcher(packageDirWatcher!.isSymlink ? packageDirPath : dirPath); + removeDirectoryWatcher(packageDirWatcher!.isSymlink ? packageDirPath : dirPath, /*delayed*/ true); watcher.watcher = createDirPathToWatcher(); }); packageDirWatcher.isSymlink = isSymlink; @@ -1418,7 +1430,10 @@ export function createResolutionCache( return dirWatcher; } - function stopWatchFailedLookupLocation(failedLookupLocation: string, removeAtRoot: boolean) { + function stopWatchFailedLookupLocation( + failedLookupLocation: string, + removeAtRoot: boolean, + ) { const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); const toWatch = getDirectoryToWatchFailedLookupLocation( failedLookupLocation, @@ -1439,7 +1454,7 @@ export function createResolutionCache( const forDirPath = packageDirWatcher.dirPathToWatcher.get(dirPath)!; forDirPath.refCount--; if (forDirPath.refCount === 0) { - removeDirectoryWatcher(packageDirWatcher.isSymlink ? packageDirPath : dirPath); + removeDirectoryWatcher(packageDirWatcher.isSymlink ? packageDirPath : dirPath, /*delayed*/ false); packageDirWatcher.dirPathToWatcher.delete(dirPath); if (packageDirWatcher.isSymlink) { const refCount = dirPathToSymlinkPackageRefCount.get(dirPath)! - 1; @@ -1450,26 +1465,36 @@ export function createResolutionCache( dirPathToSymlinkPackageRefCount.set(dirPath, refCount); } } + closePackageDirWatcher(packageDirWatcher, packageDirPath); } } else { - removeDirectoryWatcher(dirPath); + removeDirectoryWatcher(dirPath, /*delayed*/ false); } } return removeAtRoot; } - function stopWatchFailedLookupLocationOfResolution( - resolution: T, + function stopWatchFailedLookupLocationOfResolution( + resolution: ResolutionWithFailedLookupLocations, filePath: Path, - getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, + cache: ModuleOrTypeReferenceResolutionCache, ) { - Debug.checkDefined(resolution.files).delete(filePath); - if (resolution.files!.size) return; + Debug.assertIsDefined(resolution.files); + resolution.files.delete(filePath); + if (resolution.files.size) return; + let setOfResolutions = potentiallyUnreferencedResolutions?.get(cache); + if (!setOfResolutions) (potentiallyUnreferencedResolutions ??= new Map()).set(cache, setOfResolutions = new Set()); + setOfResolutions.add(resolution); + } + + function releaseResolution(resolution: ResolutionWithFailedLookupLocations) { resolution.files = undefined; + // Even if this is in cache, we cant reuse this resolution after this since we are not watching it any more + resolution.isInvalidated = true; if (resolution.globalCacheResolution) resolutionsResolvedWithGlobalCache--; if (resolution.globalCacheResolution === false) resolutionsResolvedWithoutGlobalCache--; - const resolved = getResolutionWithResolvedFileName(resolution); + const resolved = getModuleOrTypeRefResolved(resolution); if (resolved && resolved.resolvedFileName) { const key = resolutionHost.toPath(resolved.resolvedFileName); const resolutions = resolvedFileToResolution.get(key); @@ -1485,7 +1510,7 @@ export function createResolutionCache( } } if (alternateResult) removeAtRoot = stopWatchFailedLookupLocation(alternateResult, removeAtRoot); - if (removeAtRoot) removeDirectoryWatcher(rootPath); + if (removeAtRoot) removeDirectoryWatcher(rootPath, /*delayed*/ false); } else if (affectingLocations?.length) { resolutionsWithOnlyAffectingLocations.delete(resolution); @@ -1495,14 +1520,17 @@ export function createResolutionCache( for (const affectingLocation of affectingLocations) { const watcher = fileWatchesOfAffectingLocations.get(affectingLocation)!; watcher.resolutions--; + closeFileWatcherOfAffectingLocation(watcher, affectingLocation); } } } - function removeDirectoryWatcher(dirPath: Path) { + function removeDirectoryWatcher(dirPath: Path, delayed: boolean) { const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath)!; // Do not close the watcher yet since it might be needed by other failed lookup locations. dirWatcher.refCount--; + if (!delayed) closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath); + else (potentiallyUnreferencedDirWatchers ??= new Set()).add(dirPath); } function createDirectoryWatcher(directory: string, dirPath: Path, nonRecursive: boolean | undefined) { @@ -1517,10 +1545,10 @@ export function createResolutionCache( }, nonRecursive ? WatchDirectoryFlags.None : WatchDirectoryFlags.Recursive); } - function removeResolutionsOfFileFromCache( + function removeResolutionsOfFileFromCache( cache: Map>, filePath: Path, - getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, + moduleOrTypeRefCache: ModuleOrTypeReferenceResolutionCache, ) { // Deleted file, stop watching failed lookups for all the resolutions in the file const resolutions = cache.get(filePath); @@ -1529,7 +1557,7 @@ export function createResolutionCache( stopWatchFailedLookupLocationOfResolution( resolution, filePath, - getResolutionWithResolvedFileName, + moduleOrTypeRefCache, ) ); cache.delete(filePath); @@ -1548,11 +1576,13 @@ export function createResolutionCache( // filePath is for the projectReference and the containing file is from this project reference, invalidate the resolution resolvedProjectReference.commandLine.fileNames.forEach(f => removeResolutionsOfFile(resolutionHost.toPath(f))); + + // TODO: (sheetal) this is not correct as we would want to instead update to re-evaluate redirected-references } function removeResolutionsOfFile(filePath: Path) { - removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModuleFromResolution); - removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirectiveFromResolution); + removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, moduleResolutionCache); + removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, typeReferenceDirectiveResolutionCache); } function invalidateResolutions(resolutions: Set | Map | undefined, canInvalidate: (resolution: ResolutionWithFailedLookupLocations) => boolean | undefined) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c817719e595e7..0a80fdf44eabd 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4817,6 +4817,7 @@ export interface Program extends ScriptReferenceHost { getResolvedProjectReferenceToRedirect(fileName: string): ResolvedProjectReference | undefined; /** @internal */ forEachResolvedProjectReference(cb: (resolvedProjectReference: ResolvedProjectReference) => T | undefined): T | undefined; /** @internal */ getResolvedProjectReferenceByPath(projectReferencePath: Path): ResolvedProjectReference | undefined; + /** @internal */ getRedirectReferenceForResolution(file: SourceFile): ResolvedProjectReference | undefined; /** @internal */ getRedirectReferenceForResolutionFromSourceOfProject(filePath: Path): ResolvedProjectReference | undefined; /** @internal */ isSourceOfProjectReferenceRedirect(fileName: string): boolean; /** @internal */ getBuildInfo?(): BuildInfo; diff --git a/src/compiler/watchPublic.ts b/src/compiler/watchPublic.ts index faa510118cda2..7e9f35914a992 100644 --- a/src/compiler/watchPublic.ts +++ b/src/compiler/watchPublic.ts @@ -538,7 +538,7 @@ export function createWatchProgram(host: WatchCompiler host.resolveLibrary.bind(host); compilerHost.getModuleResolutionCache = host.resolveModuleNameLiterals || host.resolveModuleNames ? maybeBind(host, host.getModuleResolutionCache) : - (() => resolutionCache.getModuleResolutionCache()); + (() => resolutionCache.moduleResolutionCache); const userProvidedResolution = !!host.resolveModuleNameLiterals || !!host.resolveTypeReferenceDirectiveReferences || !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives; // All resolutions are invalid if user provided resolutions and didnt supply hasInvalidatedResolutions diff --git a/src/harness/incrementalUtils.ts b/src/harness/incrementalUtils.ts index 5799833297519..633ca9f2c16db 100644 --- a/src/harness/incrementalUtils.ts +++ b/src/harness/incrementalUtils.ts @@ -210,7 +210,7 @@ export function verifyResolutionCache( const expected = ts.createResolutionCache(resolutionHostCacheHost, actual.rootDirForResolution); expected.startCachingPerDirectoryResolution(); - type ExpectedResolution = ts.CachedResolvedModuleWithFailedLookupLocations & ts.CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations; + type ExpectedResolution = ts.ResolvedModuleWithFailedLookupLocations & ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations; const expectedToResolution = new Map(); const resolutionToExpected = new Map(); @@ -228,6 +228,8 @@ export function verifyResolutionCache( resolutions, getResolvedModuleFileName, expected.resolvedModuleNames, + expected.moduleResolutionCache, + () => actualProgram.getRedirectReferenceForResolution(actualProgram.getSourceFileByPath(path)!), (name, mode) => actualProgram.getResolvedModule(actualProgram.getSourceFileByPath(path)!, name, mode), ) ); @@ -238,6 +240,11 @@ export function verifyResolutionCache( resolutions, getResolvedTypeRefFileName, expected.resolvedTypeReferenceDirectives, + expected.typeReferenceDirectiveResolutionCache, + () => + path !== inferredTypesPath ? + actualProgram.getRedirectReferenceForResolution(actualProgram.getSourceFileByPath(path)!) : + undefined, (name, mode) => path !== inferredTypesPath ? actualProgram.getResolvedTypeReferenceDirective(actualProgram.getSourceFileByPath(path)!, name, mode) : @@ -245,17 +252,24 @@ export function verifyResolutionCache( ) ); actual.resolvedLibraries.forEach((resolved, libFileName) => { + const libResolvedFrom = ts.getInferredLibraryNameResolveFrom(actualProgram.getCompilerOptions(), currentDirectory, libFileName); const expectedResolution = collectResolution( "Libs", - resolutionHostCacheHost.toPath( - ts.getInferredLibraryNameResolveFrom(actualProgram.getCompilerOptions(), currentDirectory, libFileName), - ), + resolutionHostCacheHost.toPath(libResolvedFrom), resolved, getResolvedModuleFileName(resolved), ts.getLibraryNameFromLibFileName(libFileName), /*mode*/ undefined, ); expected.resolvedLibraries.set(libFileName, expectedResolution); + ts.setPerDirectoryAndNonRelativeNameCacheResult( + expected.libraryResolutionCache, + libFileName, + undefined, + ts.getDirectoryPath(libResolvedFrom), + undefined, + expectedResolution, + ); }); // Check for resolutions in program but not in cache to empty resolutions if (!userResolvedModuleNames) { @@ -337,6 +351,11 @@ export function verifyResolutionCache( `${projectName}:: Expected ResolutionsResolvedWithoutGlobalCache count ${expected.countResolutionsResolvedWithoutGlobalCache()} but got ${actual.countResolutionsResolvedWithoutGlobalCache()}`, ); + // Verify that caches are same: + verifyModuleOrTypeResolutionCache(expected.moduleResolutionCache, actual.moduleResolutionCache, "moduleResolutionCache"); + verifyModuleOrTypeResolutionCache(expected.typeReferenceDirectiveResolutionCache, actual.typeReferenceDirectiveResolutionCache, "typeReferenceDirectiveResolutionCache"); + verifyModuleOrTypeResolutionCache(expected.libraryResolutionCache, actual.libraryResolutionCache, "libraryResolutionCache"); + // Stop watching resolutions to verify everything gets closed. expected.startCachingPerDirectoryResolution(); actual.resolvedModuleNames.forEach((_resolutions, path) => expected.removeResolutionsOfFile(path)); @@ -353,6 +372,9 @@ export function verifyResolutionCache( ts.Debug.assert(expected.fileWatchesOfAffectingLocations.size === 0, `${projectName}:: fileWatchesOfAffectingLocations should be released`); ts.Debug.assert(expected.countResolutionsResolvedWithGlobalCache() === 0, `${projectName}:: ResolutionsResolvedWithGlobalCache should be cleared`); ts.Debug.assert(expected.countResolutionsResolvedWithoutGlobalCache() === 0, `${projectName}:: ResolutionsResolvedWithoutGlobalCache should be cleared`); + verifyModuleOrTypeResolutionCacheIsEmpty(expected.moduleResolutionCache, "moduleResolutionCache"); + verifyModuleOrTypeResolutionCacheIsEmpty(expected.typeReferenceDirectiveResolutionCache, "typeReferenceDirectiveResolutionCache"); + verifyModuleOrTypeResolutionCacheIsEmpty(expected.libraryResolutionCache, "libraryResolutionCache"); function verifyResolutionIsInCache( cacheType: string, @@ -384,6 +406,8 @@ export function verifyResolutionCache( cache: ts.ModeAwareCache | undefined, getResolvedFileName: (resolution: T) => string | undefined, storeExpected: Map>, + moduleOrTypeRefCache: ts.ModuleOrTypeReferenceResolutionCache, + getRedirectReferenceForResolution: () => ts.ResolvedProjectReference | undefined, getProgramResolutions: (name: string, mode: ts.ResolutionMode) => T | undefined, ) { ts.Debug.assert( @@ -396,6 +420,14 @@ export function verifyResolutionCache( const expected = collectResolution(cacheType, fileName, resolved, resolvedFileName, name, mode); if (!expectedCache) storeExpected.set(fileName, expectedCache = ts.createModeAwareCache()); expectedCache.set(name, mode, expected); + ts.setPerDirectoryAndNonRelativeNameCacheResult( + moduleOrTypeRefCache, + name, + mode, + ts.getDirectoryPath(fileName), + getRedirectReferenceForResolution(), + expected as unknown as T, + ); // Resolution in cache should be same as that is in program ts.Debug.assert( resolved === getProgramResolutions(name, mode), @@ -526,6 +558,90 @@ export function verifyResolutionCache( ts.Debug.assert(expected === actual, `${projectName}:: ${caption}`); }, "dirPathToSymlinkPackageRefCount"); } + + function verifyModuleOrTypeResolutionCache( + expected: ts.ModuleOrTypeReferenceResolutionCache, + actual: ts.ModuleOrTypeReferenceResolutionCache, + cacheType: string, + ) { + verfiyCacheWithRedirects( + expected.directoryToModuleNameMap, + actual.directoryToModuleNameMap, + verifyDirectoryToModuleNameMap, + `${cacheType}:: directoryToModuleNameMap`, + ); + verfiyCacheWithRedirects( + expected.moduleNameToDirectoryMap, + actual.moduleNameToDirectoryMap, + verifyModuleNameToDirectoryMap, + `${cacheType}:: moduleNameToDirectoryMap`, + ); + } + + function verifyDirectoryToModuleNameMap( + expected: ts.ModeAwareCache | undefined, + actual: ts.ModeAwareCache | undefined, + caption: string, + ) { + verifyModeAwareCache( + expected, + actual, + verfiyResolution, + caption, + ); + } + + function verifyModuleNameToDirectoryMap( + expected: ts.PerNonRelativeNameCache | undefined, + actual: ts.PerNonRelativeNameCache | undefined, + caption: string, + ) { + verifyMap( + expected?.directoryPathMap, + actual?.directoryPathMap, + verfiyResolution, + caption, + ); + } + + function verfiyResolution( + expected: ts.ResolutionWithFailedLookupLocations | undefined, + actual: ts.ResolutionWithFailedLookupLocations | undefined, + caption: string, + ) { + ts.Debug.assert( + expectedToResolution.get(expected as ExpectedResolution) === actual, + `${projectName}:: ${caption} Expected resolution need to match in actual`, + ); + } + + function verifyModuleOrTypeResolutionCacheIsEmpty( + cache: ts.ModuleOrTypeReferenceResolutionCache, + cacheType: string, + ) { + verifyCacheWithRedirectsIsEmpty( + cache.directoryToModuleNameMap, + `${cacheType}:: directoryToModuleNameMap`, + ); + verifyCacheWithRedirectsIsEmpty( + cache.moduleNameToDirectoryMap, + `${cacheType}:: moduleNameToDirectoryMap`, + ); + } + + function verifyCacheWithRedirectsIsEmpty( + cache: ts.CacheWithRedirects, + cacheType: string, + ) { + ts.Debug.assert( + cache.getOwnMap().size === 0, + `${projectName}:: ${cacheType}:: ownMap should be empty`, + ); + ts.Debug.assert( + cache.redirectsKeyToMap.size === 0, + `${projectName}:: ${cacheType}:: redirectsKeyToMap should be empty`, + ); + } } function verifyMap( @@ -565,6 +681,31 @@ function verifyArray( return verifySet(expected && new Set(expected), actual && new Set(actual), caption); } +function verifyModeAwareCache( + expected: ts.ModeAwareCache | undefined, + actual: ts.ModeAwareCache | undefined, + verifyValue: (expected: T | undefined, actual: T | undefined, caption: string) => void, + caption: string, +) { + expected?.forEach((expected, key, mode) => verifyValue(expected, actual?.get(key, mode), `${caption}:: ${key}:: ${mode}`)); + actual?.forEach((actual, key, mode) => verifyValue(expected?.get(key, mode), actual, `${caption}:: ${key}:: ${mode}`)); +} + +function verfiyCacheWithRedirects( + expected: ts.CacheWithRedirects, + actual: ts.CacheWithRedirects, + verifyValue: (expected: V | undefined, actual: V | undefined, caption: string) => void, + cacheType: string, +) { + verifyMap(expected.getOwnMap(), actual.getOwnMap(), verifyValue, `${cacheType}:: ownMap`); + verifyMap( + expected.redirectsKeyToMap, + actual.redirectsKeyToMap, + (expected, actual, key) => verifyMap(expected, actual, verifyValue, key), + `${cacheType}:: redirectsKeyToMap`, + ); +} + function verifyProgram(service: ts.server.ProjectService, project: ts.server.Project) { if (service.serverMode === ts.LanguageServiceMode.Syntactic) return; const options = project.getCompilerOptions(); diff --git a/src/server/project.ts b/src/server/project.ts index 6dec9a942fd47..44c88143d976f 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -836,7 +836,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo /** @internal */ getModuleResolutionCache(): ModuleResolutionCache | undefined { - return this.resolutionCache.getModuleResolutionCache(); + return this.resolutionCache.moduleResolutionCache; } /** @internal */ diff --git a/tests/baselines/reference/tscWatch/moduleResolution/late-discovered-dependency-symlink.js b/tests/baselines/reference/tscWatch/moduleResolution/late-discovered-dependency-symlink.js index 5d505315f53cc..b1513e3a6b205 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/late-discovered-dependency-symlink.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/late-discovered-dependency-symlink.js @@ -203,20 +203,7 @@ Output:: Reusing resolution of module 'package-b' from '/workspace/packageC/index.ts' of old program, it was successfully resolved to '/workspace/packageB/index.d.ts'. ======== Resolving module 'package-b' from '/workspace/packageC/package.json'. ======== -Module resolution kind is not specified, using 'Node10'. -Loading module 'package-b' from 'node_modules' folder, target file types: TypeScript, Declaration. -Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. -File '/workspace/packageC/node_modules/package-b/package.json' exists according to earlier cached lookups. -File '/workspace/packageC/node_modules/package-b.ts' does not exist. -File '/workspace/packageC/node_modules/package-b.tsx' does not exist. -File '/workspace/packageC/node_modules/package-b.d.ts' does not exist. -'package.json' does not have a 'typings' field. -'package.json' does not have a 'types' field. -'package.json' does not have a 'main' field. -File '/workspace/packageC/node_modules/package-b/index.ts' does not exist. -File '/workspace/packageC/node_modules/package-b/index.tsx' does not exist. -File '/workspace/packageC/node_modules/package-b/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/workspace/packageC/node_modules/package-b/index.d.ts', result '/workspace/packageB/index.d.ts'. +Resolution for module 'package-b' was found in cache from location '/workspace/packageC'. ======== Module name 'package-b' was successfully resolved to '/workspace/packageB/index.d.ts'. ======== ======== Resolving module 'package-a' from '/workspace/packageC/package.json'. ======== Module resolution kind is not specified, using 'Node10'. diff --git a/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js b/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js index 2def243df2a06..b13c3e7d5c11b 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-file-are-partially-used.js @@ -277,26 +277,7 @@ File '/user/username/package.json' does not exist according to earlier cached lo File '/user/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. ======== Resolving module 'pkg' from '/user/username/projects/myproject/a.ts'. ======== -Explicitly specified module resolution kind: 'Node16'. -Resolving in ESM mode with conditions 'import', 'types', 'node'. -File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. -File '/user/username/projects/package.json' does not exist according to earlier cached lookups. -File '/user/username/package.json' does not exist according to earlier cached lookups. -File '/user/package.json' does not exist according to earlier cached lookups. -File '/package.json' does not exist according to earlier cached lookups. -Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. -Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. -File '/user/username/projects/myproject/node_modules/pkg/package.json' exists according to earlier cached lookups. -Entering conditional exports. -Matched 'exports' condition 'import'. -Using 'exports' subpath '.' with target './import.js'. -File name '/user/username/projects/myproject/node_modules/pkg/import.js' has a '.js' extension - stripping it. -File '/user/username/projects/myproject/node_modules/pkg/import.ts' does not exist. -File '/user/username/projects/myproject/node_modules/pkg/import.tsx' does not exist. -File '/user/username/projects/myproject/node_modules/pkg/import.d.ts' exists - use it as a name resolution result. -Resolved under condition 'import'. -Exiting conditional exports. -Resolving real path for '/user/username/projects/myproject/node_modules/pkg/import.d.ts', result '/user/username/projects/myproject/node_modules/pkg/import.d.ts'. +Resolution for module 'pkg' was found in cache from location '/user/username/projects/myproject'. ======== Module name 'pkg' was successfully resolved to '/user/username/projects/myproject/node_modules/pkg/import.d.ts' with Package ID 'pkg/import.d.ts@0.0.1'. ======== File '/user/username/projects/myproject/node_modules/pkg/package.json' exists according to earlier cached lookups. File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. diff --git a/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-files-with-partially-used-import-attributes.js b/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-files-with-partially-used-import-attributes.js index fd1cf6e5e43a2..84a78ca12dd7b 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-files-with-partially-used-import-attributes.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/module-resolutions-from-files-with-partially-used-import-attributes.js @@ -277,26 +277,7 @@ File '/user/username/package.json' does not exist according to earlier cached lo File '/user/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. ======== Resolving module 'pkg' from '/user/username/projects/myproject/a.ts'. ======== -Explicitly specified module resolution kind: 'Node16'. -Resolving in ESM mode with conditions 'import', 'types', 'node'. -File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. -File '/user/username/projects/package.json' does not exist according to earlier cached lookups. -File '/user/username/package.json' does not exist according to earlier cached lookups. -File '/user/package.json' does not exist according to earlier cached lookups. -File '/package.json' does not exist according to earlier cached lookups. -Loading module 'pkg' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration. -Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration. -File '/user/username/projects/myproject/node_modules/pkg/package.json' exists according to earlier cached lookups. -Entering conditional exports. -Matched 'exports' condition 'import'. -Using 'exports' subpath '.' with target './import.js'. -File name '/user/username/projects/myproject/node_modules/pkg/import.js' has a '.js' extension - stripping it. -File '/user/username/projects/myproject/node_modules/pkg/import.ts' does not exist. -File '/user/username/projects/myproject/node_modules/pkg/import.tsx' does not exist. -File '/user/username/projects/myproject/node_modules/pkg/import.d.ts' exists - use it as a name resolution result. -Resolved under condition 'import'. -Exiting conditional exports. -Resolving real path for '/user/username/projects/myproject/node_modules/pkg/import.d.ts', result '/user/username/projects/myproject/node_modules/pkg/import.d.ts'. +Resolution for module 'pkg' was found in cache from location '/user/username/projects/myproject'. ======== Module name 'pkg' was successfully resolved to '/user/username/projects/myproject/node_modules/pkg/import.d.ts' with Package ID 'pkg/import.d.ts@0.0.1'. ======== File '/user/username/projects/myproject/node_modules/pkg/package.json' exists according to earlier cached lookups. File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. diff --git a/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited.js b/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited.js index 32ad7e78d9a5e..4f72ca44d659f 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/package-json-file-is-edited.js @@ -653,9 +653,9 @@ Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skip File '/a/lib/package.json' does not exist according to earlier cached lookups. File '/a/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. +FileWatcher:: Close:: WatchInfo: /user/username/projects/package.json 2000 undefined File location affecting resolution DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/src/fileB.mjs 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/src/fileB.mjs 1 undefined Failed Lookup Locations -FileWatcher:: Close:: WatchInfo: /user/username/projects/package.json 2000 undefined File location affecting resolution src/fileA.ts:1:21 - error TS2307: Cannot find module './fileB.mjs' or its corresponding type declarations. 1 import { foo } from "./fileB.mjs"; diff --git a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js index 90cfb9b71ef4c..25006b1100462 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/type-reference-resolutions-reuse.js @@ -293,23 +293,8 @@ File '/user/username/projects/package.json' does not exist according to earlier File '/user/username/package.json' does not exist according to earlier cached lookups. File '/user/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. -======== Resolving type reference directive 'pkg', containing file '/user/username/projects/myproject/a.ts', root directory '/user/username/projects/myproject/node_modules/@types,/user/username/projects/node_modules/@types,/user/username/node_modules/@types,/user/node_modules/@types,/node_modules/@types'. ======== -Resolving with primary search path '/user/username/projects/myproject/node_modules/@types, /user/username/projects/node_modules/@types, /user/username/node_modules/@types, /user/node_modules/@types, /node_modules/@types'. -Directory '/user/username/projects/node_modules/@types' does not exist, skipping all lookups in it. -Directory '/user/username/node_modules/@types' does not exist, skipping all lookups in it. -Directory '/user/node_modules/@types' does not exist, skipping all lookups in it. -Directory '/node_modules/@types' does not exist, skipping all lookups in it. -Looking up in 'node_modules' folder, initial location '/user/username/projects/myproject'. -Searching all ancestor node_modules directories for preferred extensions: Declaration. -File '/user/username/projects/myproject/node_modules/pkg/package.json' exists according to earlier cached lookups. -Entering conditional exports. -Matched 'exports' condition 'import'. -Using 'exports' subpath '.' with target './import.js'. -File name '/user/username/projects/myproject/node_modules/pkg/import.js' has a '.js' extension - stripping it. -File '/user/username/projects/myproject/node_modules/pkg/import.d.ts' exists - use it as a name resolution result. -Resolved under condition 'import'. -Exiting conditional exports. -Resolving real path for '/user/username/projects/myproject/node_modules/pkg/import.d.ts', result '/user/username/projects/myproject/node_modules/pkg/import.d.ts'. +======== Resolving type reference directive 'pkg', containing file '/user/username/projects/myproject/a.ts'. ======== +Resolution for type reference directive 'pkg' was found in cache from location '/user/username/projects/myproject'. ======== Type reference directive 'pkg' was successfully resolved to '/user/username/projects/myproject/node_modules/pkg/import.d.ts' with Package ID 'pkg/import.d.ts@0.0.1', primary: false. ======== File '/user/username/projects/myproject/node_modules/pkg/package.json' exists according to earlier cached lookups. File '/user/username/projects/myproject/package.json' does not exist according to earlier cached lookups. diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-with-nodenext.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-with-nodenext.js index 1696a203bea32..2ce5032376253 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-with-nodenext.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-with-nodenext.js @@ -1310,7 +1310,7 @@ File '/user/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. ======== Resolving module '@ref/a' from '/user/username/projects/transitiveReferences/b.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/transitiveReferences/tsconfig.b.json'. -Module resolution kind is not specified, using 'NodeNext'. +Resolution for module '@ref/a' was found in cache from location '/user/username/projects/transitiveReferences'. ======== Module name '@ref/a' was successfully resolved to '/user/username/projects/transitiveReferences/refs/a.d.ts'. ======== File '/user/username/projects/transitiveReferences/refs/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/transitiveReferences/package.json' does not exist according to earlier cached lookups. @@ -1464,16 +1464,7 @@ File '/user/username/package.json' does not exist according to earlier cached lo File '/user/package.json' does not exist according to earlier cached lookups. File '/package.json' does not exist according to earlier cached lookups. ======== Resolving module '@ref/a' from '/user/username/projects/transitiveReferences/b.ts'. ======== -Module resolution kind is not specified, using 'NodeNext'. -Resolving in CJS mode with conditions 'require', 'types', 'node'. -'baseUrl' option is set to '/user/username/projects/transitiveReferences', using this value to resolve non-relative module name '@ref/a'. -'paths' option is specified, looking for a pattern to match module name '@ref/a'. -Module name '@ref/a', matched pattern '@ref/*'. -Trying substitution './refs/*', candidate module location: './refs/a'. -Loading module as file / folder, candidate module location '/user/username/projects/transitiveReferences/refs/a', target file types: TypeScript, JavaScript, Declaration. -File '/user/username/projects/transitiveReferences/refs/a.ts' does not exist. -File '/user/username/projects/transitiveReferences/refs/a.tsx' does not exist. -File '/user/username/projects/transitiveReferences/refs/a.d.ts' exists - use it as a name resolution result. +Resolution for module '@ref/a' was found in cache from location '/user/username/projects/transitiveReferences'. ======== Module name '@ref/a' was successfully resolved to '/user/username/projects/transitiveReferences/refs/a.d.ts'. ======== File '/user/username/projects/transitiveReferences/refs/package.json' does not exist according to earlier cached lookups. File '/user/username/projects/transitiveReferences/package.json' does not exist according to earlier cached lookups. diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js index b6cd8ea567b72..668a565910746 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js @@ -1067,7 +1067,7 @@ Reusing resolution of module './b' from '/user/username/projects/transitiveRefer Reusing resolution of module '@ref/a' from '/user/username/projects/transitiveReferences/c.ts' of old program, it was successfully resolved to '/user/username/projects/transitiveReferences/refs/a.d.ts'. ======== Resolving module '@ref/a' from '/user/username/projects/transitiveReferences/b.ts'. ======== Using compiler options of project reference redirect '/user/username/projects/transitiveReferences/tsconfig.b.json'. -Module resolution kind is not specified, using 'Node10'. +Resolution for module '@ref/a' was found in cache from location '/user/username/projects/transitiveReferences'. ======== Module name '@ref/a' was successfully resolved to '/user/username/projects/transitiveReferences/refs/a.d.ts'. ======== ../../../../a/lib/lib.d.ts Default library for target 'es5' @@ -1187,15 +1187,7 @@ Output:: Reusing resolution of module './b' from '/user/username/projects/transitiveReferences/c.ts' of old program, it was successfully resolved to '/user/username/projects/transitiveReferences/b.ts'. Reusing resolution of module '@ref/a' from '/user/username/projects/transitiveReferences/c.ts' of old program, it was successfully resolved to '/user/username/projects/transitiveReferences/refs/a.d.ts'. ======== Resolving module '@ref/a' from '/user/username/projects/transitiveReferences/b.ts'. ======== -Module resolution kind is not specified, using 'Node10'. -'baseUrl' option is set to '/user/username/projects/transitiveReferences', using this value to resolve non-relative module name '@ref/a'. -'paths' option is specified, looking for a pattern to match module name '@ref/a'. -Module name '@ref/a', matched pattern '@ref/*'. -Trying substitution './refs/*', candidate module location: './refs/a'. -Loading module as file / folder, candidate module location '/user/username/projects/transitiveReferences/refs/a', target file types: TypeScript, Declaration. -File '/user/username/projects/transitiveReferences/refs/a.ts' does not exist. -File '/user/username/projects/transitiveReferences/refs/a.tsx' does not exist. -File '/user/username/projects/transitiveReferences/refs/a.d.ts' exists - use it as a name resolution result. +Resolution for module '@ref/a' was found in cache from location '/user/username/projects/transitiveReferences'. ======== Module name '@ref/a' was successfully resolved to '/user/username/projects/transitiveReferences/refs/a.d.ts'. ======== tsconfig.c.json:14:5 - error TS6053: File '/user/username/projects/transitiveReferences/tsconfig.b.json' not found. diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Linux.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Linux.js index a45737a9c1015..cb267b67f3c20 100644 --- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Linux.js +++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Linux.js @@ -960,14 +960,14 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/c.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/index.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/index.d.ts 250 undefined Source file +DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations -DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Failed Lookup Locations -Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Failed Lookup Locations FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined File location affecting resolution src/index.ts:1:19 - error TS2307: Cannot find module 'a' or its corresponding type declarations. diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-MacOs.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-MacOs.js index d44c002843b0d..ebf929a1a9764 100644 --- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-MacOs.js +++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-MacOs.js @@ -939,14 +939,14 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/c.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/index.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/index.d.ts 250 undefined Source file +DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations -DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations -Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined File location affecting resolution src/index.ts:1:19 - error TS2307: Cannot find module 'a' or its corresponding type declarations. diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Windows.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Windows.js index d71a01cc171ba..76119bc811b53 100644 --- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Windows.js +++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-Windows.js @@ -879,14 +879,14 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/c.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/index.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/index.d.ts 250 undefined Source file +DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations -DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations -Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined File location affecting resolution src/index.ts:1:19 - error TS2307: Cannot find module 'a' or its corresponding type declarations. diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Linux.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Linux.js index 4c71a54e76567..75702a5511414 100644 --- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Linux.js +++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Linux.js @@ -681,14 +681,14 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/c.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/index.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/index.d.ts 250 undefined Source file +DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations -DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Failed Lookup Locations -Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Failed Lookup Locations FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined File location affecting resolution src/index.ts:1:19 - error TS2307: Cannot find module 'a' or its corresponding type declarations. diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-MacOs.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-MacOs.js index 429688609da6d..0188066f9a8ff 100644 --- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-MacOs.js +++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-MacOs.js @@ -723,14 +723,14 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/c.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/index.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/index.d.ts 250 undefined Source file +DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations -DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations -Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined File location affecting resolution src/index.ts:1:19 - error TS2307: Cannot find module 'a' or its corresponding type declarations. diff --git a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Windows.js b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Windows.js index 1d5273a777753..e88bc03be41cb 100644 --- a/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Windows.js +++ b/tests/baselines/reference/tscWatch/symlinks/packages-outside-project-folder-built-Windows.js @@ -663,14 +663,14 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/c.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib/index.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/index.d.ts 250 undefined Source file +DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Failed Lookup Locations -DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations -Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Failed Lookup Locations FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined File location affecting resolution src/index.ts:1:19 - error TS2307: Cannot find module 'a' or its corresponding type declarations. diff --git a/tests/baselines/reference/tsserver/cachingFileSystemInformation/loads-missing-files-from-disk.js b/tests/baselines/reference/tsserver/cachingFileSystemInformation/loads-missing-files-from-disk.js index 711aa5ed4aea7..1131a89c21fb5 100644 --- a/tests/baselines/reference/tsserver/cachingFileSystemInformation/loads-missing-files-from-disk.js +++ b/tests/baselines/reference/tsserver/cachingFileSystemInformation/loads-missing-files-from-disk.js @@ -376,12 +376,12 @@ Projects:: Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/bar.d.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) diff --git a/tests/baselines/reference/tsserver/symLinks/module-resolution-with-path-mapping-when-project-has-node_modules-setup-but-doesnt-have-modules-in-typings-folder-and-then-recompiles.js b/tests/baselines/reference/tsserver/symLinks/module-resolution-with-path-mapping-when-project-has-node_modules-setup-but-doesnt-have-modules-in-typings-folder-and-then-recompiles.js index 61df6c179040d..ac269e04830c6 100644 --- a/tests/baselines/reference/tsserver/symLinks/module-resolution-with-path-mapping-when-project-has-node_modules-setup-but-doesnt-have-modules-in-typings-folder-and-then-recompiles.js +++ b/tests/baselines/reference/tsserver/symLinks/module-resolution-with-path-mapping-when-project-has-node_modules-setup-but-doesnt-have-modules-in-typings-folder-and-then-recompiles.js @@ -425,10 +425,10 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/p Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-text 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/src 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/src 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules/@microsoft/recognizers-text 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules/@microsoft/recognizers-text 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/symLinks/module-resolution-with-path-mapping-when-project-recompiles-after-deleting-generated-folders.js b/tests/baselines/reference/tsserver/symLinks/module-resolution-with-path-mapping-when-project-recompiles-after-deleting-generated-folders.js index 32d5567a17e1d..57e452d76f6a8 100644 --- a/tests/baselines/reference/tsserver/symLinks/module-resolution-with-path-mapping-when-project-recompiles-after-deleting-generated-folders.js +++ b/tests/baselines/reference/tsserver/symLinks/module-resolution-with-path-mapping-when-project-recompiles-after-deleting-generated-folders.js @@ -662,10 +662,10 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/p Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-text 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/src 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/src 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules/@microsoft/recognizers-text 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules/@microsoft/recognizers-text 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/recognizers-date-time/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/packages/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/myproject/javascript/node_modules 1 undefined Project: /users/username/projects/myproject/javascript/packages/recognizers-date-time/tsconfig.json WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux-canUseWatchEvents.js index a00d6053ca830..78aca577d9676 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux-canUseWatchEvents.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux-canUseWatchEvents.js @@ -1969,6 +1969,18 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Added:: {"id":29,"path":"/home/src/projects/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 23 + } + } +Custom watchDirectory:: Close:: {"id":23,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] event: { @@ -2005,18 +2017,6 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Close:: {"id":19,"path":"/home/src/projects/a/1/a-impl/a/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "closeFileWatcher", - "body": { - "id": 23 - } - } -Custom watchDirectory:: Close:: {"id":23,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] event: { diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux.js index 0f1029819a99f..845f25bea91c6 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Linux.js @@ -1555,14 +1555,14 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/b/2/b-impl/b/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/b/2/b-impl/b/tsconfig.json' (Configured) diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs-canUseWatchEvents.js index 57810f52031b7..18b5f32e23592 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs-canUseWatchEvents.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs-canUseWatchEvents.js @@ -1956,6 +1956,18 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Added:: {"id":29,"path":"/home/src/projects/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 23 + } + } +Custom watchDirectory:: Close:: {"id":23,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] event: { @@ -1992,18 +2004,6 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Close:: {"id":19,"path":"/home/src/projects/a/1/a-impl/a/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "closeFileWatcher", - "body": { - "id": 23 - } - } -Custom watchDirectory:: Close:: {"id":23,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] event: { diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs.js index 1c09ff99d9230..c5aec31db10d7 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-MacOs.js @@ -1532,14 +1532,14 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/b/2/b-impl/b/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/b/2/b-impl/b/tsconfig.json' (Configured) diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Windows-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Windows-canUseWatchEvents.js index ecf5f374c572c..e0147ebe0e35d 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Windows-canUseWatchEvents.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Windows-canUseWatchEvents.js @@ -1969,6 +1969,18 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Added:: {"id":29,"path":"/home/src/projects/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 23 + } + } +Custom watchDirectory:: Close:: {"id":23,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] event: { @@ -2005,18 +2017,6 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Close:: {"id":19,"path":"/home/src/projects/a/1/a-impl/a/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "closeFileWatcher", - "body": { - "id": 23 - } - } -Custom watchDirectory:: Close:: {"id":23,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] event: { diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Windows.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Windows.js index b406beb9213a4..30519af1459ad 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Windows.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-Windows.js @@ -1478,14 +1478,14 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/b/2/b-impl/b/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/b/2/b-impl/b/tsconfig.json' (Configured) diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux-canUseWatchEvents.js index 6a30981af13c7..ab76f5588c5eb 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux-canUseWatchEvents.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux-canUseWatchEvents.js @@ -1491,6 +1491,18 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Added:: {"id":24,"path":"/home/src/projects/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 12 + } + } +Custom watchDirectory:: Close:: {"id":12,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] event: { @@ -1527,18 +1539,6 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Close:: {"id":8,"path":"/home/src/projects/a/1/a-impl/a/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "closeFileWatcher", - "body": { - "id": 12 - } - } -Custom watchDirectory:: Close:: {"id":12,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] event: { diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux.js index 16570b0e726a1..f0e0e86b777f3 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Linux.js @@ -1187,14 +1187,14 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/b/2/b-impl/b/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/b/2/b-impl/b/tsconfig.json' (Configured) diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs-canUseWatchEvents.js index fa95914f4d26b..c7be27d3ee475 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs-canUseWatchEvents.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs-canUseWatchEvents.js @@ -1491,6 +1491,18 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Added:: {"id":24,"path":"/home/src/projects/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 12 + } + } +Custom watchDirectory:: Close:: {"id":12,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] event: { @@ -1527,18 +1539,6 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Close:: {"id":8,"path":"/home/src/projects/a/1/a-impl/a/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "closeFileWatcher", - "body": { - "id": 12 - } - } -Custom watchDirectory:: Close:: {"id":12,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] event: { diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs.js index 393e34be863db..533859fccb243 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-MacOs.js @@ -1219,14 +1219,14 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/b/2/b-impl/b/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/b/2/b-impl/b/tsconfig.json' (Configured) diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Windows-canUseWatchEvents.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Windows-canUseWatchEvents.js index 006ac59592ff3..76a490b209e1f 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Windows-canUseWatchEvents.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Windows-canUseWatchEvents.js @@ -1491,6 +1491,18 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Added:: {"id":24,"path":"/home/src/projects/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 12 + } + } +Custom watchDirectory:: Close:: {"id":12,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] event: { @@ -1527,18 +1539,6 @@ Info seq [hh:mm:ss:mss] event: } Custom watchDirectory:: Close:: {"id":8,"path":"/home/src/projects/a/1/a-impl/a/node_modules","recursive":true} Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "closeFileWatcher", - "body": { - "id": 12 - } - } -Custom watchDirectory:: Close:: {"id":12,"path":"/home/src/projects/c/3/c-impl/c/lib","recursive":false,"ignoreUpdate":true} -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/lib 0 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] event: { diff --git a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Windows.js b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Windows.js index 48fbb1aa58857..11e59b4facbdd 100644 --- a/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Windows.js +++ b/tests/baselines/reference/tsserver/symLinks/packages-outside-project-folder-built-Windows.js @@ -1165,14 +1165,14 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/b/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/lib/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/a/1/a-impl/a/node_modules 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/c 1 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/c/3/c-impl/c/package.json 2000 undefined Project: /home/src/projects/b/2/b-impl/b/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/b/2/b-impl/b/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/b/2/b-impl/b/tsconfig.json' (Configured)