On linux or editor with canUseEvents to prefer immediate directory if its not in root or node_modules (#58866)

This commit is contained in:
Sheetal Nandi
2024-06-27 11:32:33 -07:00
committed by GitHub
parent fe0bdc8cde
commit f7833b2a72
86 changed files with 135375 additions and 230 deletions
+17 -5
View File
@@ -187,6 +187,7 @@ export interface ResolutionCacheHost extends MinimalResolutionCacheHost {
toPath(fileName: string): Path;
getCanonicalFileName: GetCanonicalFileName;
getCompilationSettings(): CompilerOptions;
preferNonRecursiveWatch: boolean | undefined;
watchDirectoryOfFailedLookupLocation(directory: string, cb: DirectoryWatcherCallback, flags: WatchDirectoryFlags): FileWatcher;
watchAffectingFileLocation(file: string, cb: FileWatcherCallback): FileWatcher;
onInvalidatedResolution(): void;
@@ -346,6 +347,7 @@ export function getDirectoryToWatchFailedLookupLocation(
rootPath: Path,
rootPathComponents: Readonly<PathPathComponents>,
getCurrentDirectory: () => string | undefined,
preferNonRecursiveWatch: boolean | undefined,
): DirectoryOfFailedLookupWatch | undefined {
const failedLookupPathComponents: Readonly<PathPathComponents> = getPathComponents(failedLookupLocationPath);
// Ensure failed look up is normalized path
@@ -385,6 +387,7 @@ export function getDirectoryToWatchFailedLookupLocation(
nodeModulesIndex,
rootPathComponents,
lastNodeModulesIndex,
preferNonRecursiveWatch,
);
}
@@ -396,6 +399,7 @@ function getDirectoryToWatchFromFailedLookupLocationDirectory(
nodeModulesIndex: number,
rootPathComponents: Readonly<PathPathComponents>,
lastNodeModulesIndex: number,
preferNonRecursiveWatch: boolean | undefined,
): DirectoryOfFailedLookupWatch | undefined {
// If directory path contains node module, get the most parent node_modules directory for watching
if (nodeModulesIndex !== -1) {
@@ -407,14 +411,17 @@ function getDirectoryToWatchFromFailedLookupLocationDirectory(
lastNodeModulesIndex,
);
}
// Use some ancestor of the root directory
let nonRecursive = true;
let length = dirPathComponentsLength;
for (let i = 0; i < dirPathComponentsLength; i++) {
if (dirPathComponents[i] !== rootPathComponents[i]) {
nonRecursive = false;
length = Math.max(i + 1, perceivedOsRootLength + 1);
break;
if (!preferNonRecursiveWatch) {
for (let i = 0; i < dirPathComponentsLength; i++) {
if (dirPathComponents[i] !== rootPathComponents[i]) {
nonRecursive = false;
length = Math.max(i + 1, perceivedOsRootLength + 1);
break;
}
}
}
return getDirectoryOfFailedLookupWatch(
@@ -458,6 +465,7 @@ export function getDirectoryToWatchFailedLookupLocationFromTypeRoot(
rootPath: Path,
rootPathComponents: Readonly<PathPathComponents>,
getCurrentDirectory: () => string | undefined,
preferNonRecursiveWatch: boolean | undefined,
filterCustomPath: (path: Path) => boolean, // Return true if this path can be used
): Path | undefined {
const typeRootPathComponents = getPathComponents(typeRootPath);
@@ -474,6 +482,7 @@ export function getDirectoryToWatchFailedLookupLocationFromTypeRoot(
typeRootPathComponents.indexOf("node_modules" as Path),
rootPathComponents,
typeRootPathComponents.lastIndexOf("node_modules" as Path),
preferNonRecursiveWatch,
);
return toWatch && filterCustomPath(toWatch.dirPath) ? toWatch.dirPath : undefined;
}
@@ -1120,6 +1129,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
rootPath,
rootPathComponents,
getCurrentDirectory,
resolutionHost.preferNonRecursiveWatch,
);
if (toWatch) {
const { dir, dirPath, nonRecursive, packageDir, packageDirPath } = toWatch;
@@ -1334,6 +1344,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
rootPath,
rootPathComponents,
getCurrentDirectory,
resolutionHost.preferNonRecursiveWatch,
);
if (toWatch) {
const { dirPath, packageDirPath } = toWatch;
@@ -1640,6 +1651,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD
rootPath,
rootPathComponents,
getCurrentDirectory,
resolutionHost.preferNonRecursiveWatch,
dirPath => directoryWatchesOfFailedLookups.has(dirPath) || dirPathToSymlinkPackageRefCount.has(dirPath),
);
if (dirPath) {
+2
View File
@@ -1409,6 +1409,7 @@ export interface System {
*/
watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
/**@internal */ preferNonRecursiveWatch?: boolean;
resolvePath(path: string): string;
fileExists(path: string): boolean;
directoryExists(path: string): boolean;
@@ -1534,6 +1535,7 @@ export let sys: System = (() => {
writeFile,
watchFile,
watchDirectory,
preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,
resolvePath: path => _path.resolve(path),
fileExists,
directoryExists,
+1
View File
@@ -667,6 +667,7 @@ export function createWatchHost(system = sys, reportWatchStatus?: WatchStatusRep
watchDirectory: maybeBind(system, system.watchDirectory) || returnNoopFileWatcher,
setTimeout: maybeBind(system, system.setTimeout) || noop,
clearTimeout: maybeBind(system, system.clearTimeout) || noop,
preferNonRecursiveWatch: system.preferNonRecursiveWatch,
};
}
+2
View File
@@ -169,6 +169,7 @@ export interface WatchHost {
setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
/** If provided, will be used to reset existing delayed compilation */
clearTimeout?(timeoutId: any): void;
preferNonRecursiveWatch?: boolean;
}
export interface ProgramHost<T extends BuilderProgram> {
/**
@@ -498,6 +499,7 @@ export function createWatchProgram<T extends BuilderProgram>(host: WatchCompiler
compilerHost.toPath = toPath;
compilerHost.getCompilationSettings = () => compilerOptions!;
compilerHost.useSourceOfProjectReferenceRedirect = maybeBind(host, host.useSourceOfProjectReferenceRedirect);
compilerHost.preferNonRecursiveWatch = host.preferNonRecursiveWatch;
compilerHost.watchDirectoryOfFailedLookupLocation = (dir, cb, flags) => watchDirectory(dir, cb, flags, watchOptions, WatchType.FailedLookupLocations);
compilerHost.watchAffectingFileLocation = (file, cb) => watchFile(file, cb, PollingInterval.High, watchOptions, WatchType.AffectingFileLocation);
compilerHost.watchTypeRootsDirectory = (dir, cb, flags) => watchDirectory(dir, cb, flags, watchOptions, WatchType.TypeRoots);
+1
View File
@@ -511,6 +511,7 @@ function verifyProgram(service: ts.server.ProjectService, project: ts.server.Pro
fileIsOpen: project.fileIsOpen.bind(project),
getCurrentProgram: () => project.getCurrentProgram(),
preferNonRecursiveWatch: project.preferNonRecursiveWatch,
watchDirectoryOfFailedLookupLocation: ts.returnNoopFileWatcher,
watchAffectingFileLocation: ts.returnNoopFileWatcher,
onInvalidatedResolution: ts.noop,
+8 -2
View File
@@ -1083,13 +1083,17 @@ function getHostWatcherMap<T>(): HostWatcherMap<T> {
return { idToCallbacks: new Map(), pathToId: new Map() };
}
function getCanUseWatchEvents(service: ProjectService, canUseWatchEvents: boolean | undefined) {
return !!canUseWatchEvents && !!service.eventHandler && !!service.session;
}
function createWatchFactoryHostUsingWatchEvents(service: ProjectService, canUseWatchEvents: boolean | undefined): WatchFactoryHost | undefined {
if (!canUseWatchEvents || !service.eventHandler || !service.session) return undefined;
if (!getCanUseWatchEvents(service, canUseWatchEvents)) return undefined;
const watchedFiles = getHostWatcherMap<FileWatcherCallback>();
const watchedDirectories = getHostWatcherMap<DirectoryWatcherCallback>();
const watchedDirectoriesRecursive = getHostWatcherMap<DirectoryWatcherCallback>();
let ids = 1;
service.session.addProtocolHandler(protocol.CommandTypes.WatchChange, req => {
service.session!.addProtocolHandler(protocol.CommandTypes.WatchChange, req => {
onWatchChange((req as protocol.WatchChangeRequest).arguments);
return { responseRequired: false };
});
@@ -1327,6 +1331,7 @@ export class ProjectService {
/** @internal */ verifyDocumentRegistry = noop;
/** @internal */ verifyProgram: (project: Project) => void = noop;
/** @internal */ onProjectCreation: (project: Project) => void = noop;
/** @internal */ canUseWatchEvents: boolean;
readonly jsDocParsingMode: JSDocParsingMode | undefined;
@@ -1396,6 +1401,7 @@ export class ProjectService {
log,
getDetailWatchInfo,
);
this.canUseWatchEvents = getCanUseWatchEvents(this, opts.canUseWatchEvents);
opts.incrementalVerifier?.(this);
}
+2
View File
@@ -555,6 +555,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
protected typeAcquisition: TypeAcquisition | undefined;
/** @internal */
createHash = maybeBind(this.projectService.host, this.projectService.host.createHash);
/** @internal*/ preferNonRecursiveWatch: boolean | undefined;
readonly jsDocParsingMode: JSDocParsingMode | undefined;
@@ -615,6 +616,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
this.trace = s => host.trace!(s);
}
this.realpath = maybeBind(host, host.realpath);
this.preferNonRecursiveWatch = this.projectService.canUseWatchEvents || host.preferNonRecursiveWatch;
// Use the current directory as resolution root only if the project created using current directory string
this.resolutionCache = createResolutionCache(
+1
View File
@@ -29,6 +29,7 @@ export type RequireResult = ModuleImportResult;
export interface ServerHost extends System {
watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
preferNonRecursiveWatch?: boolean;
setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
clearTimeout(timeoutId: any): void;
setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
+66 -60
View File
@@ -55,71 +55,77 @@ describe("unittests:: canWatch::", () => {
scenario: string,
forPath: "node_modules" | "node_modules/@types" | "",
) {
["file", "dir", "subDir"].forEach(type => {
baselineCanWatch(
`${scenario}In${type}`,
() => `Determines whether to watch given failed lookup location (file that didnt exist) when resolving module.\r\nIt also determines the directory to watch and whether to watch it recursively or not.`,
(paths, longestPathLength, baseline) => {
const recursive = "Recursive";
const maxLength = longestPathLength + ts.combinePaths(forPath, "dir/subdir/somefile.d.ts").length;
const maxLengths = [maxLength, maxLength, recursive.length, maxLength] as const;
baselineCanWatchForRoot(paths, baseline, (rootPathCompoments, root) => {
pushHeader(baseline, ["Location", "getDirectoryToWatchFailedLookupLocation", recursive, "Location if not symlink"], maxLengths);
paths.forEach(path => {
let subPath;
switch (type) {
case "file":
subPath = "somefile.d.ts";
break;
case "dir":
subPath = "dir/somefile.d.ts";
break;
case "subDir":
subPath = "dir/subdir/somefile.d.ts";
break;
}
const testPath = combinePaths(path, forPath, subPath);
const result = ts.getDirectoryToWatchFailedLookupLocation(
testPath,
testPath,
root,
root,
rootPathCompoments,
ts.returnUndefined,
);
pushRow(baseline, [testPath, result ? result.packageDir ?? result.dir : "", result ? `${!result.nonRecursive}` : "", result?.packageDir ? result.dir : ""], maxLengths);
[undefined, true].forEach(preferNonRecursiveWatch => {
["file", "dir", "subDir"].forEach(type => {
baselineCanWatch(
`${scenario}In${type}${preferNonRecursiveWatch ? "NonRecursive" : ""}`,
() => `Determines whether to watch given failed lookup location (file that didnt exist) when resolving module.\r\nIt also determines the directory to watch and whether to watch it recursively or not.`,
(paths, longestPathLength, baseline) => {
const recursive = "Recursive";
const maxLength = longestPathLength + ts.combinePaths(forPath, "dir/subdir/somefile.d.ts").length;
const maxLengths = [maxLength, maxLength, recursive.length, maxLength] as const;
baselineCanWatchForRoot(paths, baseline, (rootPathCompoments, root) => {
pushHeader(baseline, ["Location", "getDirectoryToWatchFailedLookupLocation", recursive, "Location if not symlink"], maxLengths);
paths.forEach(path => {
let subPath;
switch (type) {
case "file":
subPath = "somefile.d.ts";
break;
case "dir":
subPath = "dir/somefile.d.ts";
break;
case "subDir":
subPath = "dir/subdir/somefile.d.ts";
break;
}
const testPath = combinePaths(path, forPath, subPath);
const result = ts.getDirectoryToWatchFailedLookupLocation(
testPath,
testPath,
root,
root,
rootPathCompoments,
ts.returnUndefined,
preferNonRecursiveWatch,
);
pushRow(baseline, [testPath, result ? result.packageDir ?? result.dir : "", result ? `${!result.nonRecursive}` : "", result?.packageDir ? result.dir : ""], maxLengths);
});
});
});
},
);
},
);
});
});
}
baselineCanWatch(
"getDirectoryToWatchFailedLookupLocationFromTypeRoot",
() => `When watched typeRoot handler is invoked, this method determines the directory for which the failedLookupLocation would need to be invalidated.\r\nSince this is invoked only when watching default typeRoot and is used to handle flaky directory watchers, this is used as a fail safe where if failed lookup starts with returned directory we will invalidate that resolution.`,
(paths, longestPathLength, baseline) => {
const maxLength = longestPathLength + "/node_modules/@types".length;
const maxLengths = [maxLength, maxLength] as const;
baselineCanWatchForRoot(paths, baseline, (rootPathCompoments, root) => {
pushHeader(baseline, ["Directory", "getDirectoryToWatchFailedLookupLocationFromTypeRoot"], maxLengths);
paths.forEach(path => {
path = combinePaths(path, "node_modules/@types");
// This is invoked only on paths that are watched
if (!ts.canWatchAtTypes(path)) return;
const result = ts.getDirectoryToWatchFailedLookupLocationFromTypeRoot(
path,
path,
root,
rootPathCompoments,
ts.returnUndefined,
ts.returnTrue,
);
pushRow(baseline, [path, result !== undefined ? result : ""], maxLengths);
[undefined, true].forEach(preferNonRecursiveWatch => {
baselineCanWatch(
`getDirectoryToWatchFailedLookupLocationFromTypeRoot${preferNonRecursiveWatch ? "NonRecursive" : ""}`,
() => `When watched typeRoot handler is invoked, this method determines the directory for which the failedLookupLocation would need to be invalidated.\r\nSince this is invoked only when watching default typeRoot and is used to handle flaky directory watchers, this is used as a fail safe where if failed lookup starts with returned directory we will invalidate that resolution.`,
(paths, longestPathLength, baseline) => {
const maxLength = longestPathLength + "/node_modules/@types".length;
const maxLengths = [maxLength, maxLength] as const;
baselineCanWatchForRoot(paths, baseline, (rootPathCompoments, root) => {
pushHeader(baseline, ["Directory", "getDirectoryToWatchFailedLookupLocationFromTypeRoot"], maxLengths);
paths.forEach(path => {
path = combinePaths(path, "node_modules/@types");
// This is invoked only on paths that are watched
if (!ts.canWatchAtTypes(path)) return;
const result = ts.getDirectoryToWatchFailedLookupLocationFromTypeRoot(
path,
path,
root,
rootPathCompoments,
ts.returnUndefined,
preferNonRecursiveWatch,
ts.returnTrue,
);
pushRow(baseline, [path, result !== undefined ? result : ""], maxLengths);
});
});
});
},
);
},
);
});
function baselineCanWatchForRoot(paths: readonly ts.Path[], baseline: string[], baselineForRoot: (rootPathCompoments: Readonly<ts.PathPathComponents>, root: ts.Path) => void) {
paths.forEach(rootDirForResolution => {
@@ -1,15 +1,25 @@
import {
emptyArray,
noop,
} from "../../_namespaces/ts.js";
import { dedent } from "../../_namespaces/Utils.js";
import { jsonToReadableText } from "../helpers.js";
import { libContent } from "./contents.js";
import { solutionBuildWithBaseline } from "./solutionBuilder.js";
import {
TscWatchCompileChange,
TscWatchSystem,
} from "./tscWatch.js";
import {
createServerHost,
createWatchedSystem,
libFile,
osFlavorToString,
TestServerHost,
TestServerHostOsFlavor,
} from "./virtualFileSystemWithWatch.js";
export function getMonorepoSymlinkedSiblingPackagesSys(forTsserver: boolean, built: boolean, osFlavor?: TestServerHostOsFlavor): TestServerHost {
function getMonorepoSymlinkedSiblingPackagesSys(forTsserver: boolean, built: boolean, osFlavor?: TestServerHostOsFlavor): TestServerHost {
const configText = jsonToReadableText({
compilerOptions: {
target: "es2016",
@@ -57,10 +67,224 @@ function getPackageJson(packageName: string) {
});
}
export function buildMonorepoSymlinkedSiblingPackage1(host: TestServerHost) {
function buildMonorepoSymlinkedSiblingPackage1(host: TestServerHost) {
solutionBuildWithBaseline(host, ["packages/package1"]);
}
export function cleanMonorepoSymlinkedSiblingPackage1(host: TestServerHost) {
function cleanMonorepoSymlinkedSiblingPackage1(host: TestServerHost) {
host.deleteFolder("/home/src/projects/project/packages/package1/dist", /*recursive*/ true);
}
function forEachMonorepoSymlinkedSiblingPackagesSys(
forTsserver: boolean,
action: (
scenario: string,
sys: () => TestServerHost,
edits: () => readonly TscWatchCompileChange[],
project: string,
) => void,
) {
for (const built of [false, true]) {
for (const osFlavor of [undefined, TestServerHostOsFlavor.Linux]) {
action(
`monorepo style sibling packages symlinked${built ? " package1 built" : ""}${osFlavor ? ` ${osFlavorToString(osFlavor)}` : ""}`,
() => getMonorepoSymlinkedSiblingPackagesSys(forTsserver, built, osFlavor),
() =>
getEditsWithBuildAndClean(
forTsserver,
built,
osFlavor,
buildMonorepoSymlinkedSiblingPackage1,
cleanMonorepoSymlinkedSiblingPackage1,
),
"packages/package2",
);
}
}
}
function threeTimeouts(sys: TscWatchSystem) {
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
}
function getEditsWithBuildAndClean(
forTsserver: boolean,
built: boolean,
osFlavor: TestServerHostOsFlavor | undefined,
build: (host: TscWatchSystem) => void,
clean: (host: TscWatchSystem) => void,
beforeBuild?: readonly TscWatchCompileChange[],
beforeClean?: readonly TscWatchCompileChange[],
): readonly TscWatchCompileChange[] {
return [
...beforeBuild ?? emptyArray,
...built ? emptyArray : [{
caption: "Build dependencies",
edit: build,
timeouts: threeTimeouts,
}],
...beforeClean ?? emptyArray,
{
caption: "Clean dependencies build",
edit: clean,
timeouts: forTsserver ? threeTimeouts : sys => sys.runQueuedTimeoutCallbacks(),
},
...!forTsserver && osFlavor === TestServerHostOsFlavor.Linux ? [{
caption: "After updating childs",
edit: noop,
timeouts: threeTimeouts,
}] : emptyArray,
{
caption: "Build dependencies",
edit: build,
timeouts: threeTimeouts,
},
];
}
function getMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders(
forTsserver: boolean,
built: boolean,
osFlavor: TestServerHostOsFlavor,
): TestServerHost {
const sys = (!forTsserver ? createWatchedSystem : createServerHost)({
"/home/src/projects/c/3/c-impl/c/src/c.ts": `export const c: string = 'test';`,
"/home/src/projects/c/3/c-impl/c/src/index.ts": `export * from './c';`,
"/home/src/projects/c/3/c-impl/c/tsconfig.json": jsonToReadableText({
compilerOptions: {
outDir: "lib",
declaration: true,
},
include: ["src/**/*.ts"],
}),
"/home/src/projects/c/3/c-impl/c/package.json": jsonToReadableText({
name: "c",
version: "1.0.0",
types: "./lib/index.d.ts",
}),
"/home/src/projects/c/4/unrelated/somefile.ts": `export const a: string = 'test';`,
"/home/src/projects/a/1/a-impl/a/src/a.ts": `export const a: string = 'test';`,
"/home/src/projects/a/1/a-impl/a/src/index.ts": dedent`
export * from './a';
export * from 'c';
`,
"/home/src/projects/a/1/a-impl/a/tsconfig.json": jsonToReadableText({
compilerOptions: {
outDir: "lib",
declaration: true,
},
include: ["src/**/*.ts"],
}),
"/home/src/projects/a/1/a-impl/a/package.json": jsonToReadableText({
name: "a",
version: "1.0.0",
types: "./lib/index.d.ts",
}),
"/home/src/projects/a/1/a-impl/a/node_modules/c": { symLink: "/home/src/projects/c/3/c-impl/c" },
"/home/src/projects/a/2/unrelated/somefile.ts": `export const a: string = 'test';`,
"/home/src/projects/b/2/b-impl/b/src/index.ts": `import { a } from 'a';`,
"/home/src/projects/b/2/b-impl/b/tsconfig.json": jsonToReadableText({
compilerOptions: {
outDir: "lib",
},
include: ["src/**/*.ts"],
}),
"/home/src/projects/b/2/b-impl/b/node_modules/a": { symLink: "/home/src/projects/a/1/a-impl/a" },
[libFile.path]: libContent,
}, { currentDirectory: "/home/src/projects/b/2/b-impl/b", osFlavor });
if (built) buildDependenciesOfMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders(sys);
return sys;
}
function buildDependenciesOfMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders(host: TestServerHost) {
solutionBuildWithBaseline(host, ["../../../../c/3/c-impl/c", "../../../../a/1/a-impl/a"]);
}
function cleanDependenciesOfMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders(host: TestServerHost) {
host.deleteFolder("/home/src/projects/c/3/c-impl/c/lib", /*recursive*/ true);
host.deleteFolder("/home/src/projects/a/1/a-impl/a/lib", /*recursive*/ true);
}
function forEachMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders(
forTsserver: boolean,
action: (
scenario: string,
sys: () => TestServerHost,
edits: () => readonly TscWatchCompileChange[],
indexFile: string,
) => void,
) {
for (const built of [false, true]) {
for (const osFlavor of [TestServerHostOsFlavor.Windows, TestServerHostOsFlavor.MacOs, TestServerHostOsFlavor.Linux]) {
action(
`packages outside project folder${built ? " built" : ""} ${osFlavorToString(osFlavor)}`,
() => getMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders(forTsserver, built, osFlavor),
() =>
getEditsWithBuildAndClean(
forTsserver,
built,
osFlavor,
buildDependenciesOfMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders,
cleanDependenciesOfMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders,
[
{
caption: "change in unrelated folder in a",
edit: sys => sys.writeFile("/home/src/projects/a/2/unrelated/somethingUnrelated.ts", "export const a = 10;"),
timeouts: sys => {
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
},
},
{
caption: "change in unrelated folder in c",
edit: sys => sys.writeFile("/home/src/projects/c/4/unrelated/somethingUnrelated.ts", "export const a = 10;"),
timeouts: sys => {
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
},
},
],
[
{
caption: "change in unrelated folder in a",
edit: sys => sys.writeFile("/home/src/projects/a/2/unrelated/anotherFile.ts", "export const a = 10;"),
timeouts: sys => {
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
},
},
{
caption: "change in unrelated folder in c",
edit: sys => sys.writeFile("/home/src/projects/c/4/unrelated/anotherFile.ts", "export const a = 10;"),
timeouts: sys => {
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
},
},
],
),
".",
);
}
}
}
export function forEachMonorepoSymlinkScenario(
forTsserver: boolean,
action: (
scenario: string,
sys: () => TestServerHost,
edits: () => readonly TscWatchCompileChange[],
indexFile: string,
) => void,
) {
describe("monorepoSymlinkedSiblingPackages:: monorepo style sibling packages symlinked", () => {
forEachMonorepoSymlinkedSiblingPackagesSys(forTsserver, action);
});
describe("monorepoSymlinkedSiblingPackagesWithUnrelatedFolders:: packages outside project folder", () => {
forEachMonorepoSymlinkedSiblingPackagesSysWithUnRelatedFolders(forTsserver, action);
});
}
@@ -310,6 +310,7 @@ function verifyProgramStructureAndResolutionCache(
getCompilationSettings: () => options,
fileIsOpen: ts.returnFalse,
getCurrentProgram: () => program,
preferNonRecursiveWatch: sys.preferNonRecursiveWatch,
watchDirectoryOfFailedLookupLocation: ts.returnNoopFileWatcher,
watchAffectingFileLocation: ts.returnNoopFileWatcher,
@@ -10,6 +10,7 @@ import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes.js";
import * as Harness from "../../_namespaces/Harness.js";
import * as ts from "../../_namespaces/ts.js";
import { ensureErrorFreeBuild } from "./solutionBuilder.js";
import { TscWatchCompileChange } from "./tscWatch.js";
import {
customTypesMap,
TestTypingsInstallerAdapter,
@@ -630,3 +631,17 @@ export function createHostWithSolutionBuild(files: readonly FileOrFolderOrSymLin
ensureErrorFreeBuild(host, rootNames);
return host;
}
export function forEachTscWatchEdit(
session: TestSession,
edits: readonly TscWatchCompileChange[],
action: () => void,
) {
edits.forEach(edit => {
session.logger.log(edit.caption);
edit.edit(session.host);
if (session.watchChanges.size) session.invokeWatchChanges();
edit.timeouts(session.host, undefined!, undefined!);
action();
});
}
@@ -368,6 +368,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost,
watchDirectory: HostWatchDirectory;
service?: server.ProjectService;
osFlavor: TestServerHostOsFlavor;
preferNonRecursiveWatch: boolean;
constructor(
fileOrFolderorSymLinkList: FileOrFolderOrSymLinkMap | readonly FileOrFolderOrSymLink[],
{
@@ -395,6 +396,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost,
this.runWithFallbackPolling = !!runWithFallbackPolling;
const tscWatchFile = this.environmentVariables && this.environmentVariables.get("TSC_WATCHFILE");
const tscWatchDirectory = this.environmentVariables && this.environmentVariables.get("TSC_WATCHDIRECTORY");
this.preferNonRecursiveWatch = this.osFlavor === TestServerHostOsFlavor.Linux;
this.inodeWatching = this.osFlavor !== TestServerHostOsFlavor.Windows;
if (this.inodeWatching) this.inodes = new Map();
@@ -410,7 +412,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost,
fileSystemEntryExists: this.fileSystemEntryExists.bind(this),
useCaseSensitiveFileNames: this.useCaseSensitiveFileNames,
getCurrentDirectory: this.getCurrentDirectory.bind(this),
fsSupportsRecursiveFsWatch: this.osFlavor !== TestServerHostOsFlavor.Linux,
fsSupportsRecursiveFsWatch: !this.preferNonRecursiveWatch,
getAccessibleSortedChildDirectories: path => this.getDirectories(path),
realpath: this.realpath.bind(this),
tscWatchFile,
+10 -61
View File
@@ -1,65 +1,14 @@
import {
buildMonorepoSymlinkedSiblingPackage1,
cleanMonorepoSymlinkedSiblingPackage1,
getMonorepoSymlinkedSiblingPackagesSys,
} from "../helpers/monorepoSymlinkedSiblingPackages.js";
import {
noopChange,
verifyTscWatch,
} from "../helpers/tscWatch.js";
import {
osFlavorToString,
TestServerHostOsFlavor,
} from "../helpers/virtualFileSystemWithWatch.js";
import { forEachMonorepoSymlinkScenario } from "../helpers/monorepoSymlinkedSiblingPackages.js";
import { verifyTscWatch } from "../helpers/tscWatch.js";
describe("unittests:: tsc-watch:: symlinks::", () => {
describe("monorepoSymlinkedSiblingPackages:: monorepo style sibling packages symlinked", () => {
verify(/*built*/ false);
verify(/*built*/ true);
verify(/*built*/ false, TestServerHostOsFlavor.Linux);
verify(/*built*/ true, TestServerHostOsFlavor.Linux);
function verify(built: boolean, osFlavor?: TestServerHostOsFlavor) {
verifyTscWatch({
scenario: "symlinks",
subScenario: `monorepo style sibling packages symlinked${built ? " package1 built" : ""}${osFlavor ? ` ${osFlavorToString(osFlavor)}` : ""}`,
commandLineArgs: ["--w", "-p", "packages/package2", "--extendedDiagnostics"],
sys: () => getMonorepoSymlinkedSiblingPackagesSys(/*forTsserver*/ false, built, osFlavor),
edits: [
built ? noopChange : {
caption: "Build package1",
edit: buildMonorepoSymlinkedSiblingPackage1,
timeouts: sys => {
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
},
},
{
caption: "Clean package1 build",
edit: cleanMonorepoSymlinkedSiblingPackage1,
timeouts: sys => {
sys.runQueuedTimeoutCallbacks();
},
},
osFlavor === TestServerHostOsFlavor.Linux ? {
caption: "After updating childs",
edit: noopChange.edit,
timeouts: sys => {
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
},
} : noopChange,
{
caption: "Build package1",
edit: buildMonorepoSymlinkedSiblingPackage1,
timeouts: sys => {
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
sys.runQueuedTimeoutCallbacks();
},
},
],
});
}
forEachMonorepoSymlinkScenario(/*forTsserver*/ false, (subScenario, sys, edits, project) => {
verifyTscWatch({
scenario: "symlinks",
subScenario,
commandLineArgs: ["--w", "-p", project, "--extendedDiagnostics", "--explainFiles", "--traceResolution"],
sys,
edits: edits(),
});
});
});
+11 -40
View File
@@ -1,14 +1,11 @@
import * as ts from "../../_namespaces/ts.js";
import { dedent } from "../../_namespaces/Utils.js";
import { jsonToReadableText } from "../helpers.js";
import {
buildMonorepoSymlinkedSiblingPackage1,
cleanMonorepoSymlinkedSiblingPackage1,
getMonorepoSymlinkedSiblingPackagesSys,
} from "../helpers/monorepoSymlinkedSiblingPackages.js";
import { forEachMonorepoSymlinkScenario } from "../helpers/monorepoSymlinkedSiblingPackages.js";
import {
baselineTsserverLogs,
closeFilesForSession,
forEachTscWatchEdit,
openFilesForSession,
protocolLocationFromSubstring,
TestSession,
@@ -18,10 +15,8 @@ import {
createServerHost,
File,
libFile,
osFlavorToString,
SymLink,
TestServerHost,
TestServerHostOsFlavor,
} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: symLinks::", () => {
@@ -272,41 +267,17 @@ new C();`,
baselineTsserverLogs("symLinks", "when not symlink but differs in casing", session);
});
describe("monorepoSymlinkedSiblingPackages:: monorepo style sibling packages symlinked", () => {
verify(/*built*/ false);
verify(/*built*/ true);
verify(/*built*/ false, TestServerHostOsFlavor.Linux);
verify(/*built*/ true, TestServerHostOsFlavor.Linux);
function verify(built: boolean, osFlavor?: TestServerHostOsFlavor) {
it(`monorepo style sibling packages symlinked${built ? " package1 built" : ""}${osFlavor ? ` ${osFlavorToString(osFlavor)}` : ""}`, () => {
const indexFile = "/home/src/projects/project/packages/package2/src/index.ts";
const host = getMonorepoSymlinkedSiblingPackagesSys(/*forTsserver*/ true, built, osFlavor);
const session = new TestSession(host);
forEachMonorepoSymlinkScenario(/*forTsserver*/ true, (scenario, getHost, edits, project) => {
[undefined, true].forEach(canUseWatchEvents => {
it(`${scenario}${canUseWatchEvents ? " canUseWatchEvents" : ""}`, () => {
const host = getHost();
const indexFile = ts.normalizePath(ts.combinePaths(host.getCurrentDirectory(), project, "src/index.ts"));
const session = new TestSession({ host, canUseWatchEvents });
openFilesForSession([indexFile], session);
verifyGetErrRequest({ session, files: [indexFile] });
if (!built) {
buildMonorepoSymlinkedSiblingPackage1(host);
host.runQueuedTimeoutCallbacks();
host.runQueuedTimeoutCallbacks();
host.runQueuedTimeoutCallbacks();
verifyGetErrRequest({ session, files: [indexFile] });
}
cleanMonorepoSymlinkedSiblingPackage1(host);
host.runQueuedTimeoutCallbacks();
host.runQueuedTimeoutCallbacks();
host.runQueuedTimeoutCallbacks();
verifyGetErrRequest({ session, files: [indexFile] });
buildMonorepoSymlinkedSiblingPackage1(host);
host.runQueuedTimeoutCallbacks();
host.runQueuedTimeoutCallbacks();
host.runQueuedTimeoutCallbacks();
verifyGetErrRequest({ session, files: [indexFile] });
baselineTsserverLogs("symLinks", `monorepo style sibling packages symlinked${built ? " package1 built" : ""}${osFlavor ? ` ${osFlavorToString(osFlavor)}` : ""}`, session);
forEachTscWatchEdit(session, edits(), () => verifyGetErrRequest({ session, files: [indexFile] }));
baselineTsserverLogs("symLinks", `${scenario}${canUseWatchEvents ? " canUseWatchEvents" : ""}`, session);
});
}
});
});
});
+2
View File
@@ -2651,6 +2651,7 @@ declare namespace ts {
interface ServerHost extends System {
watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
preferNonRecursiveWatch?: boolean;
setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
clearTimeout(timeoutId: any): void;
setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
@@ -9591,6 +9592,7 @@ declare namespace ts {
setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
/** If provided, will be used to reset existing delayed compilation */
clearTimeout?(timeoutId: any): void;
preferNonRecursiveWatch?: boolean;
}
interface ProgramHost<T extends BuilderProgram> {
/**
@@ -82,7 +82,7 @@ interface ReadonlyArray<T> {}
declare const console: { log(msg: any): void; };
/a/lib/tsc.js --w -p packages/package2 --extendedDiagnostics
/a/lib/tsc.js --w -p packages/package2 --extendedDiagnostics --explainFiles --traceResolution
Output::
[HH:MM:SS AM] Starting compilation in watch mode...
@@ -91,7 +91,7 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2/ts
Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2/src/index.ts 250 undefined Source file
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
@@ -189,6 +189,10 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu
1 import { FooType, BarType } from "package1"
   ~~~~~~~~~~
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 1 error. Watching for file changes.
DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2 1 undefined Wild card directory
@@ -262,6 +266,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: Not
@@ -279,7 +284,7 @@ Shape signatures in builder refreshed for::
exitCode:: ExitStatus.undefined
Change:: Build package1
Change:: Build dependencies
Input::
//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 25
@@ -392,7 +397,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
Loading module 'package1' from 'node_modules' folder, target file types: TypeScript, Declaration.
@@ -418,6 +423,12 @@ Resolving real path for '/home/src/projects/project/node_modules/package1/dist/i
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package1/dist/index.d.ts
Imported via "package1" from file 'packages/package2/src/index.ts' with packageId 'package1/dist/index.d.ts@1.0.0'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
@@ -489,6 +500,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: SafeModules
@@ -507,7 +519,7 @@ Shape signatures in builder refreshed for::
exitCode:: ExitStatus.undefined
Change:: Clean package1 build
Change:: Clean dependencies build
Input::
//// [/home/src/projects/project/packages/package1/dist/index.js] deleted
@@ -584,7 +596,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
FileWatcher:: Close:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
@@ -661,6 +673,10 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu
1 import { FooType, BarType } from "package1"
   ~~~~~~~~~~
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 1 error. Watching for file changes.
DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules :: WatchInfo: /home/src/projects/project/node_modules 1 undefined Failed Lookup Locations
@@ -741,6 +757,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: Not
@@ -784,7 +801,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
Loading module 'package1' from 'node_modules' folder, target file types: TypeScript, Declaration.
@@ -859,11 +876,19 @@ Directory '/node_modules' does not exist, skipping all lookups in it.
1 import { FooType, BarType } from "package1"
   ~~~~~~~~~~
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 1 error. Watching for file changes.
Before running Timeout callback:: count: 0
After running Timeout callback:: count: 0
Program root files: [
"/home/src/projects/project/packages/package2/src/index.ts"
@@ -882,6 +907,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: SafeModules
@@ -895,7 +921,7 @@ No shapes updated in the builder::
exitCode:: ExitStatus.undefined
Change:: Build package1
Change:: Build dependencies
Input::
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 27
@@ -997,7 +1023,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
Loading module 'package1' from 'node_modules' folder, target file types: TypeScript, Declaration.
@@ -1023,6 +1049,12 @@ Resolving real path for '/home/src/projects/project/node_modules/package1/dist/i
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package1/dist/index.d.ts
Imported via "package1" from file 'packages/package2/src/index.ts' with packageId 'package1/dist/index.d.ts@1.0.0'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
@@ -1094,6 +1126,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: SafeModules
@@ -104,7 +104,7 @@ export type BarType = "bar";
}
/a/lib/tsc.js --w -p packages/package2 --extendedDiagnostics
/a/lib/tsc.js --w -p packages/package2 --extendedDiagnostics --explainFiles --traceResolution
Output::
[HH:MM:SS AM] Starting compilation in watch mode...
@@ -113,7 +113,7 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2/ts
Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2/src/index.ts 250 undefined Source file
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
@@ -158,6 +158,12 @@ DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@t
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Type roots
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Type roots
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package1/dist/index.d.ts
Imported via "package1" from file 'packages/package2/src/index.ts' with packageId 'package1/dist/index.d.ts@1.0.0'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2 1 undefined Wild card directory
@@ -233,6 +239,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: Not
@@ -253,14 +260,7 @@ Shape signatures in builder refreshed for::
exitCode:: ExitStatus.undefined
Change:: No change
Input::
exitCode:: ExitStatus.undefined
Change:: Clean package1 build
Change:: Clean dependencies build
Input::
//// [/home/src/projects/project/packages/package1/dist/index.js] deleted
@@ -337,7 +337,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
FileWatcher:: Close:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
@@ -414,6 +414,10 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu
1 import { FooType, BarType } from "package1"
   ~~~~~~~~~~
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 1 error. Watching for file changes.
sysLog:: onTimerToUpdateChildWatches:: 3
@@ -497,6 +501,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: Not
@@ -540,7 +545,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
Loading module 'package1' from 'node_modules' folder, target file types: TypeScript, Declaration.
@@ -615,11 +620,19 @@ Directory '/node_modules' does not exist, skipping all lookups in it.
1 import { FooType, BarType } from "package1"
   ~~~~~~~~~~
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 1 error. Watching for file changes.
Before running Timeout callback:: count: 0
After running Timeout callback:: count: 0
Program root files: [
"/home/src/projects/project/packages/package2/src/index.ts"
@@ -638,6 +651,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: SafeModules
@@ -651,7 +665,7 @@ No shapes updated in the builder::
exitCode:: ExitStatus.undefined
Change:: Build package1
Change:: Build dependencies
Input::
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 24
@@ -753,7 +767,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
Loading module 'package1' from 'node_modules' folder, target file types: TypeScript, Declaration.
@@ -779,6 +793,12 @@ Resolving real path for '/home/src/projects/project/node_modules/package1/dist/i
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package1/dist/index.d.ts
Imported via "package1" from file 'packages/package2/src/index.ts' with packageId 'package1/dist/index.d.ts@1.0.0'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
@@ -850,6 +870,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: SafeModules
@@ -104,7 +104,7 @@ export type BarType = "bar";
}
/a/lib/tsc.js --w -p packages/package2 --extendedDiagnostics
/a/lib/tsc.js --w -p packages/package2 --extendedDiagnostics --explainFiles --traceResolution
Output::
[HH:MM:SS AM] Starting compilation in watch mode...
@@ -113,7 +113,7 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2/ts
Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2/src/index.ts 250 undefined Source file
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
@@ -158,6 +158,12 @@ DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@t
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Type roots
DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Type roots
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Type roots
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package1/dist/index.d.ts
Imported via "package1" from file 'packages/package2/src/index.ts' with packageId 'package1/dist/index.d.ts@1.0.0'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2 1 undefined Wild card directory
@@ -227,6 +233,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: Not
@@ -247,14 +254,7 @@ Shape signatures in builder refreshed for::
exitCode:: ExitStatus.undefined
Change:: No change
Input::
exitCode:: ExitStatus.undefined
Change:: Clean package1 build
Change:: Clean dependencies build
Input::
//// [/home/src/projects/project/packages/package1/dist/index.js] deleted
@@ -290,7 +290,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
FileWatcher:: Close:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
@@ -368,6 +368,10 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu
1 import { FooType, BarType } from "package1"
   ~~~~~~~~~~
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 1 error. Watching for file changes.
@@ -436,6 +440,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: Not
@@ -451,14 +456,7 @@ Shape signatures in builder refreshed for::
exitCode:: ExitStatus.undefined
Change:: No change
Input::
exitCode:: ExitStatus.undefined
Change:: Build package1
Change:: Build dependencies
Input::
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents
@@ -512,7 +510,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
Loading module 'package1' from 'node_modules' folder, target file types: TypeScript, Declaration.
@@ -538,6 +536,12 @@ Resolving real path for '/home/src/projects/project/node_modules/package1/dist/i
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package1/dist/index.d.ts
Imported via "package1" from file 'packages/package2/src/index.ts' with packageId 'package1/dist/index.d.ts@1.0.0'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
@@ -607,6 +611,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: SafeModules
@@ -82,7 +82,7 @@ interface ReadonlyArray<T> {}
declare const console: { log(msg: any): void; };
/a/lib/tsc.js --w -p packages/package2 --extendedDiagnostics
/a/lib/tsc.js --w -p packages/package2 --extendedDiagnostics --explainFiles --traceResolution
Output::
[HH:MM:SS AM] Starting compilation in watch mode...
@@ -91,7 +91,7 @@ FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2/ts
Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2/src/index.ts 250 undefined Source file
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
@@ -189,6 +189,10 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu
1 import { FooType, BarType } from "package1"
   ~~~~~~~~~~
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 1 error. Watching for file changes.
DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2 1 undefined Wild card directory
@@ -258,6 +262,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: Not
@@ -275,7 +280,7 @@ Shape signatures in builder refreshed for::
exitCode:: ExitStatus.undefined
Change:: Build package1
Change:: Build dependencies
Input::
//// [/home/src/projects/project/packages/package1/dist/index.js]
@@ -346,7 +351,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
Loading module 'package1' from 'node_modules' folder, target file types: TypeScript, Declaration.
@@ -372,6 +377,12 @@ Resolving real path for '/home/src/projects/project/node_modules/package1/dist/i
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package1/dist/index.d.ts
Imported via "package1" from file 'packages/package2/src/index.ts' with packageId 'package1/dist/index.d.ts@1.0.0'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
@@ -441,6 +452,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: SafeModules
@@ -459,7 +471,7 @@ Shape signatures in builder refreshed for::
exitCode:: ExitStatus.undefined
Change:: Clean package1 build
Change:: Clean dependencies build
Input::
//// [/home/src/projects/project/packages/package1/dist/index.js] deleted
@@ -495,7 +507,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
FileWatcher:: Close:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
@@ -573,6 +585,10 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu
1 import { FooType, BarType } from "package1"
   ~~~~~~~~~~
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 1 error. Watching for file changes.
@@ -641,6 +657,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: Not
@@ -656,14 +673,7 @@ Shape signatures in builder refreshed for::
exitCode:: ExitStatus.undefined
Change:: No change
Input::
exitCode:: ExitStatus.undefined
Change:: Build package1
Change:: Build dependencies
Input::
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents
@@ -717,7 +727,7 @@ Synchronizing program
CreatingProgramWith::
roots: ["/home/src/projects/project/packages/package2/src/index.ts"]
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
options: {"target":3,"module":1,"rootDir":"/home/src/projects/project/packages/package2/src","declaration":true,"outDir":"/home/src/projects/project/packages/package2/dist","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"traceResolution":true,"watch":true,"project":"/home/src/projects/project/packages/package2","extendedDiagnostics":true,"explainFiles":true,"configFilePath":"/home/src/projects/project/packages/package2/tsconfig.json"}
======== Resolving module 'package1' from '/home/src/projects/project/packages/package2/src/index.ts'. ========
Module resolution kind is not specified, using 'Node10'.
Loading module 'package1' from 'node_modules' folder, target file types: TypeScript, Declaration.
@@ -743,6 +753,12 @@ Resolving real path for '/home/src/projects/project/node_modules/package1/dist/i
FileWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 250 undefined Source file
DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Failed Lookup Locations
../../../../a/lib/lib.es2016.full.d.ts
Default library for target 'es2016'
packages/package1/dist/index.d.ts
Imported via "package1" from file 'packages/package2/src/index.ts' with packageId 'package1/dist/index.d.ts@1.0.0'
packages/package2/src/index.ts
Matched by default include pattern '**/*'
[HH:MM:SS AM] Found 0 errors. Watching for file changes.
@@ -812,6 +828,7 @@ Program options: {
"watch": true,
"project": "/home/src/projects/project/packages/package2",
"extendedDiagnostics": true,
"explainFiles": true,
"configFilePath": "/home/src/projects/project/packages/package2/tsconfig.json"
}
Program structureReused: SafeModules
@@ -501,6 +501,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Build dependencies
Before running Timeout callback:: count: 1
7: timerToUpdateChildWatches
//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 22
@@ -852,6 +853,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Clean dependencies build
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 2:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/packages/package2/tsconfig.json
Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*
@@ -1373,6 +1375,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Build dependencies
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 0:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 0:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 0:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
@@ -470,6 +470,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Clean dependencies build
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 2:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/packages/package2/tsconfig.json
Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*
@@ -994,6 +995,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Build dependencies
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 0:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 0:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 0:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
@@ -466,6 +466,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Clean dependencies build
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 2:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/packages/package2/tsconfig.json
Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*
@@ -810,6 +811,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Build dependencies
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/package1/dist :: WatchInfo: /home/src/projects/project/node_modules/package1 1 undefined Project: /home/src/projects/project/packages/package2/tsconfig.json WatchType: Failed Lookup Locations
Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/packages/package2/tsconfig.jsonFailedLookupInvalidation
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/package1/dist :: WatchInfo: /home/src/projects/project/node_modules/package1 1 undefined Project: /home/src/projects/project/packages/package2/tsconfig.json WatchType: Failed Lookup Locations
@@ -499,6 +499,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Build dependencies
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/package1/dist :: WatchInfo: /home/src/projects/project/node_modules/package1 1 undefined Project: /home/src/projects/project/packages/package2/tsconfig.json WatchType: Failed Lookup Locations
Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/packages/package2/tsconfig.jsonFailedLookupInvalidation
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/package1/dist :: WatchInfo: /home/src/projects/project/node_modules/package1 1 undefined Project: /home/src/projects/project/packages/package2/tsconfig.json WatchType: Failed Lookup Locations
@@ -810,6 +811,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Clean dependencies build
Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/packages/package1/dist/index.d.ts 2:: WatchInfo: /home/src/projects/project/packages/package1/dist/index.d.ts 500 undefined WatchType: Closed Script info
Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/packages/package2/tsconfig.json
Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*
@@ -1154,6 +1156,7 @@ Info seq [hh:mm:ss:mss] event:
}
After running Immedidate callback:: count: 0
Build dependencies
Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/package1/dist :: WatchInfo: /home/src/projects/project/node_modules/package1 1 undefined Project: /home/src/projects/project/packages/package2/tsconfig.json WatchType: Failed Lookup Locations
Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/packages/package2/tsconfig.jsonFailedLookupInvalidation
Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/package1/dist :: WatchInfo: /home/src/projects/project/node_modules/package1 1 undefined Project: /home/src/projects/project/packages/package2/tsconfig.json WatchType: Failed Lookup Locations