From 113537713d813e501e52b1452bd1dc3abce6547d Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 25 Jan 2024 08:59:56 -0800 Subject: [PATCH] Fix ReloadRequest in protocol found while updating to use session in tests (#57158) --- src/server/protocol.ts | 2 +- .../unittests/tsserver/autoImportProvider.ts | 84 +- .../unittests/tsserver/projectErrors.ts | 3 +- .../unittests/tsserver/projectReferences.ts | 76 +- src/testRunner/unittests/tsserver/projects.ts | 8 +- src/testRunner/unittests/tsserver/reload.ts | 5 +- .../unittests/tsserver/symlinkCache.ts | 93 +- .../unittests/tsserver/typingsInstaller.ts | 3 +- tests/baselines/reference/api/typescript.d.ts | 2 +- .../ancestor-and-project-ref-management.js | 97 +- ...indirect-project-but-not-in-another-one.js | 389 +++++++- ...dProjectLoad-is-set-in-indirect-project.js | 364 +++++++- ...-if-disableReferencedProjectLoad-is-set.js | 430 ++++++++- ...oes-not-error-on-container-only-project.js | 857 +++++++++--------- ...ject-is-directly-referenced-by-solution.js | 631 ++++++++++--- ...ct-is-indirectly-referenced-by-solution.js | 773 ++++++++++++---- ...indirect-project-but-not-in-another-one.js | 419 ++++++++- ...dProjectLoad-is-set-in-indirect-project.js | 384 +++++++- ...-if-disableReferencedProjectLoad-is-set.js | 371 +++++++- ...ces-open-file-through-project-reference.js | 673 +++++++++++--- ...ct-is-indirectly-referenced-by-solution.js | 829 ++++++++++++----- 21 files changed, 5244 insertions(+), 1249 deletions(-) diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 29d11637cff..e61c2393f1d 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -211,7 +211,7 @@ export interface Request extends Message { /** * Request to reload the project structure for all the opened files */ -export interface ReloadProjectsRequest extends Message { +export interface ReloadProjectsRequest extends Request { command: CommandTypes.ReloadProjects; } diff --git a/src/testRunner/unittests/tsserver/autoImportProvider.ts b/src/testRunner/unittests/tsserver/autoImportProvider.ts index 5ccd8b06016..b6cbc6d8c80 100644 --- a/src/testRunner/unittests/tsserver/autoImportProvider.ts +++ b/src/testRunner/unittests/tsserver/autoImportProvider.ts @@ -43,7 +43,7 @@ const indexTs: File = { describe("unittests:: tsserver:: autoImportProvider", () => { it("Auto import provider program is not created without dependencies listed in package.json", () => { - const { projectService, session } = setup([ + const { session } = setup([ angularFormsDts, angularFormsPackageJson, tsconfig, @@ -51,12 +51,12 @@ describe("unittests:: tsserver:: autoImportProvider", () => { indexTs, ]); openFilesForSession([indexTs], session); - assert.isUndefined(projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); + assert.isUndefined(session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); baselineTsserverLogs("autoImportProvider", "without dependencies listed", session); }); it("Auto import provider program is not created if dependencies are already in main program", () => { - const { projectService, session } = setup([ + const { session } = setup([ angularFormsDts, angularFormsPackageJson, tsconfig, @@ -64,14 +64,14 @@ describe("unittests:: tsserver:: autoImportProvider", () => { { path: indexTs.path, content: "import '@angular/forms';" }, ]); openFilesForSession([indexTs], session); - assert.isUndefined(projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); + assert.isUndefined(session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); baselineTsserverLogs("autoImportProvider", "dependencies are already in main program", session); }); it("Auto-import program is not created for projects already inside node_modules", () => { // Simulate browsing typings files inside node_modules: no point creating auto import program // for the InferredProject that gets created in there. - const { projectService, session } = setup([ + const { session } = setup([ angularFormsDts, { path: angularFormsPackageJson.path, content: `{ "dependencies": { "@angular/core": "*" } }` }, { path: "/node_modules/@angular/core/package.json", content: `{ "typings": "./core.d.ts" }` }, @@ -80,7 +80,7 @@ describe("unittests:: tsserver:: autoImportProvider", () => { openFilesForSession([angularFormsDts], session); assert.isUndefined( - projectService + session.getProjectService() .getDefaultProjectForFile(angularFormsDts.path as ts.server.NormalizedPath, /*ensureProject*/ true)! .getLanguageService() .getAutoImportProvider(), @@ -89,19 +89,19 @@ describe("unittests:: tsserver:: autoImportProvider", () => { }); it("Auto-importable file is in inferred project until imported", () => { - const { projectService, session, updateFile } = setup([angularFormsDts, angularFormsPackageJson, tsconfig, packageJson, indexTs]); + const { session, updateFile } = setup([angularFormsDts, angularFormsPackageJson, tsconfig, packageJson, indexTs]); openFilesForSession([angularFormsDts], session); - session.logger.log(`Default Project for ${angularFormsDts.path}:: ${projectService.getDefaultProjectForFile(angularFormsDts.path as ts.server.NormalizedPath, /*ensureProject*/ true)?.projectName}`); + session.logger.log(`Default Project for ${angularFormsDts.path}:: ${session.getProjectService().getDefaultProjectForFile(angularFormsDts.path as ts.server.NormalizedPath, /*ensureProject*/ true)?.projectName}`); updateFile(indexTs.path, "import '@angular/forms'"); - session.logger.log(`Default Project for ${angularFormsDts.path}:: ${projectService.getDefaultProjectForFile(angularFormsDts.path as ts.server.NormalizedPath, /*ensureProject*/ true)?.projectName}`); + session.logger.log(`Default Project for ${angularFormsDts.path}:: ${session.getProjectService().getDefaultProjectForFile(angularFormsDts.path as ts.server.NormalizedPath, /*ensureProject*/ true)?.projectName}`); - assert.isUndefined(projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); + assert.isUndefined(session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); baselineTsserverLogs("autoImportProvider", "Auto-importable file is in inferred project until imported", session); }); it("Responds to package.json changes", () => { - const { projectService, session, host } = setup([ + const { session, host } = setup([ angularFormsDts, angularFormsPackageJson, tsconfig, @@ -110,15 +110,15 @@ describe("unittests:: tsserver:: autoImportProvider", () => { ]); openFilesForSession([indexTs], session); - assert.isUndefined(projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); + assert.isUndefined(session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); host.writeFile(packageJson.path, packageJson.content); - assert.ok(projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); + assert.ok(session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); baselineTsserverLogs("autoImportProvider", "Responds to package_json changes", session); }); it("Reuses autoImportProvider when program structure is unchanged", () => { - const { projectService, session, updateFile } = setup([ + const { session, updateFile } = setup([ angularFormsDts, angularFormsPackageJson, tsconfig, @@ -127,19 +127,19 @@ describe("unittests:: tsserver:: autoImportProvider", () => { ]); openFilesForSession([indexTs], session); - const autoImportProvider = projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider(); + const autoImportProvider = session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider(); assert.ok(autoImportProvider); updateFile(indexTs.path, "console.log(0)"); assert.strictEqual( - projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider(), + session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider(), autoImportProvider, ); baselineTsserverLogs("autoImportProvider", "Reuses autoImportProvider when program structure is unchanged", session); }); it("Closes AutoImportProviderProject when host project closes", () => { - const { projectService, session } = setup([ + const { session } = setup([ angularFormsDts, angularFormsPackageJson, tsconfig, @@ -148,7 +148,7 @@ describe("unittests:: tsserver:: autoImportProvider", () => { ]); openFilesForSession([indexTs], session); - const hostProject = projectService.configuredProjects.get(tsconfig.path)!; + const hostProject = session.getProjectService().configuredProjects.get(tsconfig.path)!; hostProject.getPackageJsonAutoImportProvider(); const autoImportProviderProject = hostProject.autoImportProviderHost; assert.ok(autoImportProviderProject); @@ -160,29 +160,29 @@ describe("unittests:: tsserver:: autoImportProvider", () => { }); it("Does not schedule ensureProjectForOpenFiles on AutoImportProviderProject creation", () => { - const { projectService, session, host } = setup([ + const { session, host } = setup([ angularFormsDts, angularFormsPackageJson, tsconfig, indexTs, ]); - // Create configured project only, ensure !projectService.pendingEnsureProjectForOpenFiles + // Create configured project only, ensure !session.getProjectService().pendingEnsureProjectForOpenFiles openFilesForSession([indexTs], session); - const hostProject = projectService.configuredProjects.get(tsconfig.path)!; - projectService.delayEnsureProjectForOpenFiles(); + const hostProject = session.getProjectService().configuredProjects.get(tsconfig.path)!; + session.getProjectService().delayEnsureProjectForOpenFiles(); host.runQueuedTimeoutCallbacks(); - assert.isFalse(projectService.pendingEnsureProjectForOpenFiles); + assert.isFalse(session.getProjectService().pendingEnsureProjectForOpenFiles); - // Create auto import provider project, ensure still !projectService.pendingEnsureProjectForOpenFiles + // Create auto import provider project, ensure still !session.getProjectService().pendingEnsureProjectForOpenFiles host.writeFile(packageJson.path, packageJson.content); hostProject.getPackageJsonAutoImportProvider(); - assert.isFalse(projectService.pendingEnsureProjectForOpenFiles); + assert.isFalse(session.getProjectService().pendingEnsureProjectForOpenFiles); baselineTsserverLogs("autoImportProvider", "Does not schedule ensureProjectForOpenFiles on AutoImportProviderProject creation", session); }); it("Responds to automatic changes in node_modules", () => { - const { projectService, session, host } = setup([ + const { session, host } = setup([ angularFormsDts, angularFormsPackageJson, angularCoreDts, @@ -193,7 +193,7 @@ describe("unittests:: tsserver:: autoImportProvider", () => { ]); openFilesForSession([indexTs], session); - const project = projectService.configuredProjects.get(tsconfig.path)!; + const project = session.getProjectService().configuredProjects.get(tsconfig.path)!; const completionsBefore = project.getLanguageService().getCompletionsAtPosition(indexTs.path, 0, { includeCompletionsForModuleExports: true }); assert.isTrue(completionsBefore?.entries.some(c => c.name === "PatternValidator")); @@ -210,7 +210,7 @@ describe("unittests:: tsserver:: autoImportProvider", () => { }); it("Responds to manual changes in node_modules", () => { - const { projectService, session, updateFile } = setup([ + const { session, updateFile } = setup([ angularFormsDts, angularFormsPackageJson, angularCoreDts, @@ -221,7 +221,7 @@ describe("unittests:: tsserver:: autoImportProvider", () => { ]); openFilesForSession([indexTs, angularFormsDts], session); - const project = projectService.configuredProjects.get(tsconfig.path)!; + const project = session.getProjectService().configuredProjects.get(tsconfig.path)!; const completionsBefore = project.getLanguageService().getCompletionsAtPosition(indexTs.path, 0, { includeCompletionsForModuleExports: true }); assert.isTrue(completionsBefore?.entries.some(c => c.name === "PatternValidator")); @@ -233,7 +233,7 @@ describe("unittests:: tsserver:: autoImportProvider", () => { }); it("Recovers from an unparseable package.json", () => { - const { projectService, session, host } = setup([ + const { session, host } = setup([ angularFormsDts, angularFormsPackageJson, tsconfig, @@ -242,10 +242,10 @@ describe("unittests:: tsserver:: autoImportProvider", () => { ]); openFilesForSession([indexTs], session); - assert.isUndefined(projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); + assert.isUndefined(session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); host.writeFile(packageJson.path, packageJson.content); - assert.ok(projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); + assert.ok(session.getProjectService().configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); baselineTsserverLogs("autoImportProvider", "Recovers from an unparseable package_json", session); }); @@ -262,10 +262,10 @@ describe("unittests:: tsserver:: autoImportProvider", () => { const dependencies = packages.reduce((hash, p) => ({ ...hash, [JSON.parse(p[0].content).name]: "*" }), {}); const packageJson: File = { path: "/package.json", content: jsonToReadableText(dependencies) }; - const { projectService, session } = setup([...ts.flatten(packages), indexTs, tsconfig, packageJson]); + const { session } = setup([...ts.flatten(packages), indexTs, tsconfig, packageJson]); openFilesForSession([indexTs], session); - const project = projectService.configuredProjects.get(tsconfig.path)!; + const project = session.getProjectService().configuredProjects.get(tsconfig.path)!; assert.isUndefined(project.getPackageJsonAutoImportProvider()); baselineTsserverLogs("autoImportProvider", "Does not create an auto import provider if there are too many dependencies", session); }); @@ -286,9 +286,9 @@ describe("unittests:: tsserver:: autoImportProvider", () => { { path: "/index.ts", content: `export {};` }, ]; - const { projectService, session, triggerCompletions } = setup(files); + const { session, triggerCompletions } = setup(files); openFilesForSession([files[files.length - 1]], session); - const project = projectService.configuredProjects.get("/tsconfig.json")!; + const project = session.getProjectService().configuredProjects.get("/tsconfig.json")!; const autoImportProvider = project.getPackageJsonAutoImportProvider()!; assert.isDefined(autoImportProvider); @@ -329,13 +329,13 @@ describe("unittests:: tsserver:: autoImportProvider - monorepo", () => { { path: "/packages/b/index.ts", content: `export class B {}` }, ]; - const { projectService, session, findAllReferences } = setup(files); + const { session, findAllReferences } = setup(files); openFilesForSession([files.find(f => f.path === "/packages/b/index.ts")!], session); findAllReferences("/packages/b/index.ts", 1, "export class B".length - 1); // Project for A is created - ensure it doesn't have an autoImportProvider - assert.isUndefined(projectService.configuredProjects.get("/packages/a/tsconfig.json")!.getLanguageService().getAutoImportProvider()); + assert.isUndefined(session.getProjectService().configuredProjects.get("/packages/a/tsconfig.json")!.getLanguageService().getAutoImportProvider()); baselineTsserverLogs("autoImportProvider", "Does not create auto import providers upon opening projects for find-all-references", session); }); @@ -352,10 +352,10 @@ describe("unittests:: tsserver:: autoImportProvider - monorepo", () => { { path: "/packages/a/node_modules/b/index.ts", content: `export class B {}` }, ]; - const { projectService, session } = setup(files); + const { session } = setup(files); openFilesForSession([files[2]], session); - assert.isDefined(projectService.configuredProjects.get("/packages/a/tsconfig.json")!.getPackageJsonAutoImportProvider()); - assert.isDefined(projectService.configuredProjects.get("/packages/a/tsconfig.json")!.getPackageJsonAutoImportProvider()); + assert.isDefined(session.getProjectService().configuredProjects.get("/packages/a/tsconfig.json")!.getPackageJsonAutoImportProvider()); + assert.isDefined(session.getProjectService().configuredProjects.get("/packages/a/tsconfig.json")!.getPackageJsonAutoImportProvider()); baselineTsserverLogs("autoImportProvider", "Does not close when root files are redirects that dont actually exist", session); }); @@ -372,10 +372,8 @@ describe("unittests:: tsserver:: autoImportProvider - monorepo", () => { function setup(files: File[]) { const host = createServerHost(files); const session = new TestSession(host); - const projectService = session.getProjectService(); return { host, - projectService, session, updateFile, findAllReferences, diff --git a/src/testRunner/unittests/tsserver/projectErrors.ts b/src/testRunner/unittests/tsserver/projectErrors.ts index f735172ad09..8604231a7ef 100644 --- a/src/testRunner/unittests/tsserver/projectErrors.ts +++ b/src/testRunner/unittests/tsserver/projectErrors.ts @@ -583,8 +583,7 @@ describe("unittests:: tsserver:: projectErrors:: dont include overwrite emit err const session = new TestSession(host); openFilesForSession([f1], session); - const projectService = session.getProjectService(); - const projectFileName = projectService.inferredProjects[0].getProjectName(); + const projectFileName = session.getProjectService().inferredProjects[0].getProjectName(); session.executeCommandSeq({ command: ts.server.protocol.CommandTypes.CompilerOptionsDiagnosticsFull, arguments: { projectFileName }, diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index 23c0e5b2aa6..f038a09be9c 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -10,6 +10,7 @@ import { } from "../helpers/solutionBuilder"; import { baselineTsserverLogs, + closeFilesForSession, createHostWithSolutionBuild, openFilesForSession, protocolFileLocationFromSubstring, @@ -121,12 +122,16 @@ describe("unittests:: tsserver:: with project references and tsbuild", () => { it("does not error on container only project", () => { const { files, session, containerConfig } = setup(); - const service = session.getProjectService(); - service.openExternalProjects([{ - projectFileName: "/user/username/projects/container/container", - rootFiles: files.map(f => ({ fileName: f.path })), - options: {}, - }]); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.OpenExternalProjects, + arguments: { + projects: [{ + projectFileName: "/user/username/projects/container/container", + rootFiles: files.map(f => ({ fileName: f.path })), + options: {}, + }], + }, + }); files.forEach(f => { const args: ts.server.protocol.FileRequestArgs = { file: f.path, @@ -141,7 +146,7 @@ describe("unittests:: tsserver:: with project references and tsbuild", () => { arguments: args, }); }); - const containerProject = service.configuredProjects.get(containerConfig.path)!; + const containerProject = session.getProjectService().configuredProjects.get(containerConfig.path)!; session.executeCommandSeq({ command: ts.server.protocol.CommandTypes.CompilerOptionsDiagnosticsFull, arguments: { projectFileName: containerProject.projectName }, @@ -168,7 +173,6 @@ describe("unittests:: tsserver:: with project references and tsbuild", () => { }; const { session, containerCompositeExecIndex } = setup(tempFile); openFilesForSession([containerCompositeExecIndex], session); - const service = session.getProjectService(); // Open temp file and verify all projects alive openFilesForSession([tempFile], session); @@ -184,12 +188,11 @@ describe("unittests:: tsserver:: with project references and tsbuild", () => { }); // Open temp file and verify all projects alive - service.closeClientFile(tempFile.path); + closeFilesForSession([tempFile], session); openFilesForSession([tempFile], session); // Close all files and open temp file, only inferred project should be alive - service.closeClientFile(containerCompositeExecIndex.path); - service.closeClientFile(tempFile.path); + closeFilesForSession([containerCompositeExecIndex, tempFile], session); openFilesForSession([tempFile], session); baselineTsserverLogs("projectReferences", `ancestor and project ref management`, session); }); @@ -1044,36 +1047,35 @@ export function bar() {}`, ...additionalFiles, ]); const session = new TestSession(host); - const service = session.getProjectService(); - service.openClientFile(main.path); - return { session, service, host }; + openFilesForSession([main], session); + return { session, host }; } function verifySolutionScenario(input: Setup) { - const { session, service } = setup(input); + const { session } = setup(input); - const info = service.getScriptInfoForPath(main.path as ts.Path)!; + const info = session.getProjectService().getScriptInfoForPath(main.path as ts.Path)!; session.logger.startGroup(); session.logger.info(`getDefaultProject for ${main.path}: ${info.getDefaultProject().projectName}`); - session.logger.info(`findDefaultConfiguredProject for ${main.path}: ${service.findDefaultConfiguredProject(info)!.projectName}`); + session.logger.info(`findDefaultConfiguredProject for ${main.path}: ${session.getProjectService().findDefaultConfiguredProject(info)!.projectName}`); session.logger.endGroup(); // Verify errors verifyGetErrRequest({ session, files: [main] }); // Verify collection of script infos - service.openClientFile(dummyFilePath); + openFilesForSession([dummyFilePath], session); - service.closeClientFile(main.path); - service.closeClientFile(dummyFilePath); - service.openClientFile(dummyFilePath); + closeFilesForSession([main, dummyFilePath], session); + openFilesForSession([dummyFilePath, main], session); - service.openClientFile(main.path); - service.closeClientFile(dummyFilePath); - service.openClientFile(dummyFilePath); + closeFilesForSession([dummyFilePath], session); + openFilesForSession([dummyFilePath], session); // Verify Reload projects - service.reloadProjects(); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.ReloadProjects, + }); // Find all refs session.executeCommandSeq({ @@ -1081,11 +1083,10 @@ export function bar() {}`, arguments: protocolFileLocationFromSubstring(main, "foo", { index: 1 }), }).response as ts.server.protocol.ReferencesResponseBody; - service.closeClientFile(main.path); - service.closeClientFile(dummyFilePath); + closeFilesForSession([main, dummyFilePath], session); // Verify when declaration map references the file - service.openClientFile(fileResolvingToMainDts.path); + openFilesForSession([fileResolvingToMainDts], session); // Find all refs from dts include session.executeCommandSeq({ @@ -1117,25 +1118,24 @@ export function bar() {}`, } function verifyDisableReferencedProjectLoad(input: Setup) { - const { session, service } = setup(input); + const { session } = setup(input); - const info = service.getScriptInfoForPath(main.path as ts.Path)!; + const info = session.getProjectService().getScriptInfoForPath(main.path as ts.Path)!; session.logger.startGroup(); session.logger.info(`getDefaultProject for ${main.path}: ${info.getDefaultProject().projectName}`); - session.logger.info(`findDefaultConfiguredProject for ${main.path}: ${service.findDefaultConfiguredProject(info)?.projectName}`); + session.logger.info(`findDefaultConfiguredProject for ${main.path}: ${session.getProjectService().findDefaultConfiguredProject(info)?.projectName}`); session.logger.endGroup(); // Verify collection of script infos - service.openClientFile(dummyFilePath); + openFilesForSession([dummyFilePath], session); - service.closeClientFile(main.path); - service.closeClientFile(dummyFilePath); - service.openClientFile(dummyFilePath); - - service.openClientFile(main.path); + closeFilesForSession([main, dummyFilePath], session); + openFilesForSession([dummyFilePath, main], session); // Verify Reload projects - service.reloadProjects(); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.ReloadProjects, + }); baselineTsserverLogs("projectReferences", input.scenario, session); } diff --git a/src/testRunner/unittests/tsserver/projects.ts b/src/testRunner/unittests/tsserver/projects.ts index 93c1f54b80a..082e16efc20 100644 --- a/src/testRunner/unittests/tsserver/projects.ts +++ b/src/testRunner/unittests/tsserver/projects.ts @@ -1115,7 +1115,6 @@ describe("unittests:: tsserver:: projects::", () => { const host = createServerHost([file1, file2, tsconfig]); const session = new TestSession(host); - const projectService = session.getProjectService(); session.executeCommandSeq({ command: ts.server.protocol.CommandTypes.Configure, arguments: { preferences: { lazyConfiguredProjectsFromExternalProject } }, @@ -1139,7 +1138,7 @@ describe("unittests:: tsserver:: projects::", () => { if (lazyConfiguredProjectsFromExternalProject) { // configured project is just created and not yet loaded session.logger.info("Calling ensureInferredProjectsUpToDate_TestOnly"); - projectService.ensureInferredProjectsUpToDate_TestOnly(); + session.getProjectService().ensureInferredProjectsUpToDate_TestOnly(); } // Allow allowNonTsExtensions will be set to true for deferred extensions. @@ -1440,10 +1439,9 @@ describe("unittests:: tsserver:: projects::", () => { const host = createServerHost([commonFile1, commonFile2, randomFile, libFile]); const session = new TestSession(host); openFilesForSession([commonFile1], session); - const service = session.getProjectService(); - const project = service.inferredProjects[0]; + const project = session.getProjectService().inferredProjects[0]; // Intentionally create scriptinfo and attach it to project - const info = service.getOrCreateScriptInfoForNormalizedPath(commonFile2.path as ts.server.NormalizedPath, /*openedByClient*/ false)!; + const info = session.getProjectService().getOrCreateScriptInfoForNormalizedPath(commonFile2.path as ts.server.NormalizedPath, /*openedByClient*/ false)!; info.attachToProject(project); try { session.executeCommandSeq({ diff --git a/src/testRunner/unittests/tsserver/reload.ts b/src/testRunner/unittests/tsserver/reload.ts index 02edb0e599c..6aa65622aaa 100644 --- a/src/testRunner/unittests/tsserver/reload.ts +++ b/src/testRunner/unittests/tsserver/reload.ts @@ -34,8 +34,7 @@ describe("unittests:: tsserver:: reload", () => { }); // verify content - const projectService = session.getProjectService(); - const snap1 = projectService.getScriptInfo(f1.path)!.getSnapshot(); + const snap1 = session.getProjectService().getScriptInfo(f1.path)!.getSnapshot(); session.logger.log(`Content of ${f1.path}:: ${ts.getSnapshotText(snap1)}`); // reload from original file file @@ -45,7 +44,7 @@ describe("unittests:: tsserver:: reload", () => { }); // verify content - const snap2 = projectService.getScriptInfo(f1.path)!.getSnapshot(); + const snap2 = session.getProjectService().getScriptInfo(f1.path)!.getSnapshot(); session.logger.log(`Content of ${f1.path}:: ${ts.getSnapshotText(snap2)}`); baselineTsserverLogs("reload", "should work with temp file", session); }); diff --git a/src/testRunner/unittests/tsserver/symlinkCache.ts b/src/testRunner/unittests/tsserver/symlinkCache.ts index f31233fba57..fd004772ee9 100644 --- a/src/testRunner/unittests/tsserver/symlinkCache.ts +++ b/src/testRunner/unittests/tsserver/symlinkCache.ts @@ -10,9 +10,11 @@ import { SymLink, } from "../helpers/virtualFileSystemWithWatch"; -const appTsconfigJson: File = { - path: "/packages/app/tsconfig.json", - content: ` +describe("unittests:: tsserver:: symlinkCache", () => { + it("contains symlinks discovered by project references resolution after program creation", () => { + const appTsconfigJson: File = { + path: "/packages/app/tsconfig.json", + content: ` { "compilerOptions": { "module": "commonjs", @@ -22,47 +24,53 @@ const appTsconfigJson: File = { } "references": [{ "path": "../dep" }] }`, -}; + }; -const appSrcIndexTs: File = { - path: "/packages/app/src/index.ts", - content: `import "dep/does/not/exist";`, -}; + const appSrcIndexTs: File = { + path: "/packages/app/src/index.ts", + content: `import "dep/does/not/exist";`, + }; -const depPackageJson: File = { - path: "/packages/dep/package.json", - content: `{ "name": "dep", "main": "dist/index.js", "types": "dist/index.d.ts" }`, -}; + const depPackageJson: File = { + path: "/packages/dep/package.json", + content: `{ "name": "dep", "main": "dist/index.js", "types": "dist/index.d.ts" }`, + }; -const depTsconfigJson: File = { - path: "/packages/dep/tsconfig.json", - content: ` + const depTsconfigJson: File = { + path: "/packages/dep/tsconfig.json", + content: ` { "compilerOptions": { "outDir": "dist", "rootDir": "src", "module": "commonjs" } }`, -}; + }; -const depSrcIndexTs: File = { - path: "/packages/dep/src/index.ts", - content: ` + const depSrcIndexTs: File = { + path: "/packages/dep/src/index.ts", + content: ` import "./sub/folder";`, -}; + }; -const depSrcSubFolderIndexTs: File = { - path: "/packages/dep/src/sub/folder/index.ts", - content: `export const dep = 0;`, -}; + const depSrcSubFolderIndexTs: File = { + path: "/packages/dep/src/sub/folder/index.ts", + content: `export const dep = 0;`, + }; -const link: SymLink = { - path: "/packages/app/node_modules/dep", - symLink: "../../dep", -}; - -describe("unittests:: tsserver:: symlinkCache", () => { - it("contains symlinks discovered by project references resolution after program creation", () => { - const { session, projectService } = setup(); + const link: SymLink = { + path: "/packages/app/node_modules/dep", + symLink: "../../dep", + }; + const host = createServerHost([ + appTsconfigJson, + appSrcIndexTs, + depPackageJson, + depTsconfigJson, + depSrcIndexTs, + depSrcSubFolderIndexTs, + link, + ]); + const session = new TestSession(host); openFilesForSession([appSrcIndexTs], session); - const project = projectService.configuredProjects.get(appTsconfigJson.path)!; + const project = session.getProjectService().configuredProjects.get(appTsconfigJson.path)!; assert.deepEqual( project.getSymlinkCache()?.getSymlinkedDirectories()?.get(link.path + "/" as ts.Path), { real: "/packages/dep/", realPath: "/packages/dep/" as ts.Path }, @@ -84,22 +92,3 @@ describe("unittests:: tsserver:: symlinkCache", () => { cache.setSymlinksFromResolutions(ts.noop, ts.noop, map); }); }); - -function setup() { - const host = createServerHost([ - appTsconfigJson, - appSrcIndexTs, - depPackageJson, - depTsconfigJson, - depSrcIndexTs, - depSrcSubFolderIndexTs, - link, - ]); - const session = new TestSession(host); - const projectService = session.getProjectService(); - return { - host, - projectService, - session, - }; -} diff --git a/src/testRunner/unittests/tsserver/typingsInstaller.ts b/src/testRunner/unittests/tsserver/typingsInstaller.ts index 93f31b35915..a7174a4e8d8 100644 --- a/src/testRunner/unittests/tsserver/typingsInstaller.ts +++ b/src/testRunner/unittests/tsserver/typingsInstaller.ts @@ -1144,8 +1144,7 @@ describe("unittests:: tsserver:: typingsInstaller:: General functionality", () = }, }; session.executeCommandSeq(openRequest); - const projectService = session.getProjectService(); - const proj = projectService.inferredProjects[0]; + const proj = session.getProjectService().inferredProjects[0]; const version1 = proj.lastCachedUnresolvedImportsList; // make a change that should not affect the structure of the program diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 4df46013e2e..100081fb8cc 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -205,7 +205,7 @@ declare namespace ts { /** * Request to reload the project structure for all the opened files */ - interface ReloadProjectsRequest extends Message { + interface ReloadProjectsRequest extends Request { command: CommandTypes.ReloadProjects; } /** diff --git a/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js b/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js index 97aa546136b..c04ca42c6eb 100644 --- a/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js +++ b/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js @@ -1072,6 +1072,17 @@ FsWatches:: /user/username/projects/container/tsconfig.json: {} +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/temp/temp.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/temp/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/temp/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/temp/temp.ts 500 undefined WatchType: Closed Script info @@ -1098,7 +1109,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/container/compositeExec/index.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/container/compositeExec/tsconfig.json -Before request +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/container/compositeExec/node_modules/@types: @@ -1138,13 +1153,15 @@ FsWatches:: /user/username/projects/temp/temp.ts: *new* {} +Before request + Info seq [hh:mm:ss:mss] request: { "command": "open", "arguments": { "file": "/user/username/projects/temp/temp.ts" }, - "seq": 4, + "seq": 5, "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/temp/temp.ts 500 undefined WatchType: Closed Script info @@ -1224,6 +1241,17 @@ FsWatches *deleted*:: /user/username/projects/temp/temp.ts: {} +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/container/compositeExec/index.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/container/compositeExec/index.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/container/compositeExec/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) @@ -1248,6 +1276,59 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/temp/temp.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/container/compositeExec/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/container/exec/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/container/lib/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/container/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/temp/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/temp/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/temp/tsconfig.json: + {"pollingInterval":2000} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/container/compositeExec/index.ts: *new* + {} +/user/username/projects/container/compositeExec/tsconfig.json: + {} +/user/username/projects/container/exec/index.ts: + {} +/user/username/projects/container/exec/tsconfig.json: + {} +/user/username/projects/container/lib/index.ts: + {} +/user/username/projects/container/lib/tsconfig.json: + {} +/user/username/projects/container/tsconfig.json: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/temp/temp.ts" + }, + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/temp/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/temp/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/temp/temp.ts 500 undefined WatchType: Closed Script info @@ -1272,7 +1353,11 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: -Before request +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/container/compositeExec/node_modules/@types: @@ -1297,7 +1382,7 @@ PolledWatches *deleted*:: FsWatches:: /a/lib/lib.d.ts: {} -/user/username/projects/container/compositeExec/index.ts: *new* +/user/username/projects/container/compositeExec/index.ts: {} /user/username/projects/container/compositeExec/tsconfig.json: {} @@ -1314,13 +1399,15 @@ FsWatches:: /user/username/projects/temp/temp.ts: *new* {} +Before request + Info seq [hh:mm:ss:mss] request: { "command": "open", "arguments": { "file": "/user/username/projects/temp/temp.ts" }, - "seq": 5, + "seq": 8, "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/temp/temp.ts 500 undefined WatchType: Closed Script info diff --git a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-first-indirect-project-but-not-in-another-one.js b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-first-indirect-project-but-not-in-another-one.js index 664e065fff4..eb9b55eb12f 100644 --- a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-first-indirect-project-but-not-in-another-one.js +++ b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-first-indirect-project-but-not-in-another-one.js @@ -1,5 +1,154 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "references": [ + { + "path": "./tsconfig-indirect1.json" + }, + { + "path": "./tsconfig-indirect2.json" + } + ], + "files": [] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect1.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/", + "disableReferencedProjectLoad": true + }, + "files": [ + "./indirect1/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect1/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect2.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "files": [ + "./indirect2/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect2/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -253,8 +402,49 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-indirect2.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 2, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -288,6 +478,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -304,6 +511,49 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -318,6 +568,51 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -371,6 +666,53 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -543,6 +885,44 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-indirect2.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig-src.json @@ -767,4 +1147,11 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json \ No newline at end of file +Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js index 2d790519b06..ca42a8b359d 100644 --- a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js @@ -1,5 +1,129 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "references": [ + { + "path": "./tsconfig-indirect1.json" + } + ], + "files": [] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect1.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/", + "disableReferencedProjectLoad": true + }, + "files": [ + "./indirect1/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect1/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -235,8 +359,49 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-indirect1.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-indirect1.json Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: undefined +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 2, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -270,6 +435,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-indirect1.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -286,6 +468,49 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -300,6 +525,51 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -355,6 +625,53 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -508,6 +825,44 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-indirect1.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig-indirect1.json @@ -715,4 +1070,11 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-indirect1.json \ No newline at end of file +Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-indirect1.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js index 15e44f19958..c038ee2ea9c 100644 --- a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js +++ b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js @@ -1,5 +1,109 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "disableReferencedProjectLoad": true + }, + "references": [ + { + "path": "./tsconfig-src.json" + } + ], + "files": [] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -156,8 +260,57 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules: *new* + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/src/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/src/node_modules: *new* + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/src/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/node_modules: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: undefined +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 2, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* @@ -201,6 +354,57 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/src/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/src/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/src/tsconfig.json: + {"pollingInterval":2000} +/user/username/projects/node_modules: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/tsconfig-src.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/src/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/src/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file @@ -217,6 +421,55 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/src/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/src/tsconfig.json: + {"pollingInterval":2000} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/tsconfig.json: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -227,6 +480,45 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/src/main.ts: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -266,6 +558,47 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -384,6 +717,52 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules: *new* + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/src/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/src/node_modules: *new* + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/src/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/node_modules: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject3* @@ -549,4 +928,53 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* \ No newline at end of file +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules: + {"pollingInterval":500} *new* +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/src/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/src/node_modules: + {"pollingInterval":500} *new* +/user/username/projects/myproject/src/node_modules/@types: + {"pollingInterval":500} *new* +/user/username/projects/myproject/src/tsconfig.json: + {"pollingInterval":2000} +/user/username/projects/node_modules: + {"pollingInterval":500} *new* +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules: + {"pollingInterval":500} +/user/username/projects/myproject/src/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js b/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js index 0c7ce740fb7..af5a20854d1 100644 --- a/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js @@ -1,5 +1,409 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/user/username/projects/container/lib/tsconfig.json] +{ + "compilerOptions": { + "outFile": "../built/local/lib.js", + "composite": true, + "declarationMap": true + }, + "references": [], + "files": [ + "index.ts" + ] +} + +//// [/user/username/projects/container/lib/index.ts] +namespace container { + export const myConst = 30; +} + + +//// [/user/username/projects/container/exec/tsconfig.json] +{ + "compilerOptions": { + "ignoreDeprecations": "5.0", + "outFile": "../built/local/exec.js" + }, + "files": [ + "index.ts" + ], + "references": [ + { + "path": "../lib", + "prepend": true + } + ] +} + +//// [/user/username/projects/container/exec/index.ts] +namespace container { + export function getMyConst() { + return myConst; + } +} + + +//// [/user/username/projects/container/compositeExec/tsconfig.json] +{ + "compilerOptions": { + "ignoreDeprecations": "5.0", + "outFile": "../built/local/compositeExec.js", + "composite": true, + "declarationMap": true + }, + "files": [ + "index.ts" + ], + "references": [ + { + "path": "../lib", + "prepend": true + } + ] +} + +//// [/user/username/projects/container/compositeExec/index.ts] +namespace container { + export function getMyConst() { + return myConst; + } +} + + +//// [/user/username/projects/container/tsconfig.json] +{ + "files": [], + "include": [], + "references": [ + { + "path": "./exec" + }, + { + "path": "./compositeExec" + } + ] +} + +//// [/user/username/projects/container/built/local/lib.js] +var container; +(function (container) { + container.myConst = 30; +})(container || (container = {})); + + +//// [/user/username/projects/container/built/local/lib.d.ts.map] +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B"} + +//// [/user/username/projects/container/built/local/lib.d.ts] +declare namespace container { + const myConst = 30; +} +//# sourceMappingURL=lib.d.ts.map + +//// [/user/username/projects/container/built/local/lib.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"../../lib","sourceFiles":["../../lib/index.ts"],"js":{"sections":[{"pos":0,"end":102,"kind":"text"}],"hash":"-5780640416-var container;\n(function (container) {\n container.myConst = 30;\n})(container || (container = {}));\n"},"dts":{"sections":[{"pos":0,"end":56,"kind":"text"}],"mapHash":"-12950023432-{\"version\":3,\"file\":\"lib.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\"],\"names\":[],\"mappings\":\"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B\"}","hash":"-3233313694-declare namespace container {\n const myConst = 30;\n}\n//# sourceMappingURL=lib.d.ts.map"}},"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../lib/index.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","-14968179652-namespace container {\n export const myConst = 30;\n}\n"],"root":[2],"options":{"composite":true,"declarationMap":true,"outFile":"./lib.js"},"outSignature":"4250822250-declare namespace container {\n const myConst = 30;\n}\n","latestChangedDtsFile":"./lib.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/container/built/local/lib.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../../lib", + "sourceFiles": [ + "../../lib/index.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 102, + "kind": "text" + } + ], + "hash": "-5780640416-var container;\n(function (container) {\n container.myConst = 30;\n})(container || (container = {}));\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 56, + "kind": "text" + } + ], + "hash": "-3233313694-declare namespace container {\n const myConst = 30;\n}\n//# sourceMappingURL=lib.d.ts.map", + "mapHash": "-12950023432-{\"version\":3,\"file\":\"lib.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\"],\"names\":[],\"mappings\":\"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B\"}" + } + }, + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../../lib/index.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "../../lib/index.ts": "-14968179652-namespace container {\n export const myConst = 30;\n}\n" + }, + "root": [ + [ + 2, + "../../lib/index.ts" + ] + ], + "options": { + "composite": true, + "declarationMap": true, + "outFile": "./lib.js" + }, + "outSignature": "4250822250-declare namespace container {\n const myConst = 30;\n}\n", + "latestChangedDtsFile": "./lib.d.ts" + }, + "version": "FakeTSVersion", + "size": 1401 +} + +//// [/user/username/projects/container/built/local/lib.tsbuildinfo.baseline.txt] +====================================================================== +File:: /user/username/projects/container/built/local/lib.js +---------------------------------------------------------------------- +text: (0-102) +var container; +(function (container) { + container.myConst = 30; +})(container || (container = {})); + +====================================================================== +====================================================================== +File:: /user/username/projects/container/built/local/lib.d.ts +---------------------------------------------------------------------- +text: (0-56) +declare namespace container { + const myConst = 30; +} + +====================================================================== + +//// [/user/username/projects/container/built/local/exec.js] +var container; +(function (container) { + container.myConst = 30; +})(container || (container = {})); +var container; +(function (container) { + function getMyConst() { + return container.myConst; + } + container.getMyConst = getMyConst; +})(container || (container = {})); + + +//// [/user/username/projects/container/built/local/compositeExec.js] +var container; +(function (container) { + container.myConst = 30; +})(container || (container = {})); +var container; +(function (container) { + function getMyConst() { + return container.myConst; + } + container.getMyConst = getMyConst; +})(container || (container = {})); + + +//// [/user/username/projects/container/built/local/compositeExec.d.ts.map] +{"version":3,"file":"compositeExec.d.ts","sourceRoot":"","sources":["../../lib/index.ts","../../compositeExec/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B;ACFD,kBAAU,SAAS,CAAC;IAChB,SAAgB,UAAU,WAEzB;CACJ"} + +//// [/user/username/projects/container/built/local/compositeExec.d.ts] +declare namespace container { + const myConst = 30; +} +declare namespace container { + function getMyConst(): number; +} +//# sourceMappingURL=compositeExec.d.ts.map + +//// [/user/username/projects/container/built/local/compositeExec.tsbuildinfo] +{"bundle":{"commonSourceDirectory":"../../compositeExec","sourceFiles":["../../compositeExec/index.ts"],"js":{"sections":[{"pos":0,"end":102,"kind":"prepend","data":"./lib.js","texts":[{"pos":0,"end":102,"kind":"text"}]},{"pos":102,"end":283,"kind":"text"}],"hash":"-2184050024-var container;\n(function (container) {\n container.myConst = 30;\n})(container || (container = {}));\nvar container;\n(function (container) {\n function getMyConst() {\n return container.myConst;\n }\n container.getMyConst = getMyConst;\n})(container || (container = {}));\n"},"dts":{"sections":[{"pos":0,"end":56,"kind":"prepend","data":"./lib.d.ts","texts":[{"pos":0,"end":56,"kind":"text"}]},{"pos":56,"end":123,"kind":"text"}],"mapHash":"25748245913-{\"version\":3,\"file\":\"compositeExec.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\",\"../../compositeExec/index.ts\"],\"names\":[],\"mappings\":\"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B;ACFD,kBAAU,SAAS,CAAC;IAChB,SAAgB,UAAU,WAEzB;CACJ\"}","hash":"862035579-declare namespace container {\n const myConst = 30;\n}\ndeclare namespace container {\n function getMyConst(): number;\n}\n//# sourceMappingURL=compositeExec.d.ts.map"}},"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./lib.d.ts","../../compositeexec/index.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","4250822250-declare namespace container {\n const myConst = 30;\n}\n","-4062145979-namespace container {\n export function getMyConst() {\n return myConst;\n }\n}\n"],"root":[3],"options":{"composite":true,"declarationMap":true,"outFile":"./compositeExec.js"},"outSignature":"5987946274-declare namespace container {\n const myConst = 30;\n}\ndeclare namespace container {\n function getMyConst(): number;\n}\n","latestChangedDtsFile":"./compositeExec.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/container/built/local/compositeExec.tsbuildinfo.readable.baseline.txt] +{ + "bundle": { + "commonSourceDirectory": "../../compositeExec", + "sourceFiles": [ + "../../compositeExec/index.ts" + ], + "js": { + "sections": [ + { + "pos": 0, + "end": 102, + "kind": "prepend", + "data": "./lib.js", + "texts": [ + { + "pos": 0, + "end": 102, + "kind": "text" + } + ] + }, + { + "pos": 102, + "end": 283, + "kind": "text" + } + ], + "hash": "-2184050024-var container;\n(function (container) {\n container.myConst = 30;\n})(container || (container = {}));\nvar container;\n(function (container) {\n function getMyConst() {\n return container.myConst;\n }\n container.getMyConst = getMyConst;\n})(container || (container = {}));\n" + }, + "dts": { + "sections": [ + { + "pos": 0, + "end": 56, + "kind": "prepend", + "data": "./lib.d.ts", + "texts": [ + { + "pos": 0, + "end": 56, + "kind": "text" + } + ] + }, + { + "pos": 56, + "end": 123, + "kind": "text" + } + ], + "hash": "862035579-declare namespace container {\n const myConst = 30;\n}\ndeclare namespace container {\n function getMyConst(): number;\n}\n//# sourceMappingURL=compositeExec.d.ts.map", + "mapHash": "25748245913-{\"version\":3,\"file\":\"compositeExec.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\",\"../../compositeExec/index.ts\"],\"names\":[],\"mappings\":\"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B;ACFD,kBAAU,SAAS,CAAC;IAChB,SAAgB,UAAU,WAEzB;CACJ\"}" + } + }, + "program": { + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "./lib.d.ts", + "../../compositeexec/index.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "./lib.d.ts": "4250822250-declare namespace container {\n const myConst = 30;\n}\n", + "../../compositeexec/index.ts": "-4062145979-namespace container {\n export function getMyConst() {\n return myConst;\n }\n}\n" + }, + "root": [ + [ + 3, + "../../compositeexec/index.ts" + ] + ], + "options": { + "composite": true, + "declarationMap": true, + "outFile": "./compositeExec.js" + }, + "outSignature": "5987946274-declare namespace container {\n const myConst = 30;\n}\ndeclare namespace container {\n function getMyConst(): number;\n}\n", + "latestChangedDtsFile": "./compositeExec.d.ts" + }, + "version": "FakeTSVersion", + "size": 2201 +} + +//// [/user/username/projects/container/built/local/compositeExec.tsbuildinfo.baseline.txt] +====================================================================== +File:: /user/username/projects/container/built/local/compositeExec.js +---------------------------------------------------------------------- +prepend: (0-102):: ./lib.js texts:: 1 +>>-------------------------------------------------------------------- +text: (0-102) +var container; +(function (container) { + container.myConst = 30; +})(container || (container = {})); + +---------------------------------------------------------------------- +text: (102-283) +var container; +(function (container) { + function getMyConst() { + return container.myConst; + } + container.getMyConst = getMyConst; +})(container || (container = {})); + +====================================================================== +====================================================================== +File:: /user/username/projects/container/built/local/compositeExec.d.ts +---------------------------------------------------------------------- +prepend: (0-56):: ./lib.d.ts texts:: 1 +>>-------------------------------------------------------------------- +text: (0-56) +declare namespace container { + const myConst = 30; +} + +---------------------------------------------------------------------- +text: (56-123) +declare namespace container { + function getMyConst(): number; +} + +====================================================================== + + +Info seq [hh:mm:ss:mss] request: + { + "command": "openExternalProjects", + "arguments": { + "projects": [ + { + "projectFileName": "/user/username/projects/container/container", + "rootFiles": [ + { + "fileName": "/a/lib/lib.d.ts" + }, + { + "fileName": "/user/username/projects/container/lib/tsconfig.json" + }, + { + "fileName": "/user/username/projects/container/lib/index.ts" + }, + { + "fileName": "/user/username/projects/container/exec/tsconfig.json" + }, + { + "fileName": "/user/username/projects/container/exec/index.ts" + }, + { + "fileName": "/user/username/projects/container/compositeExec/tsconfig.json" + }, + { + "fileName": "/user/username/projects/container/compositeExec/index.ts" + }, + { + "fileName": "/user/username/projects/container/tsconfig.json" + } + ], + "options": {} + } + ] + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/container/compositeExec/tsconfig.json Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/container/compositeExec/tsconfig.json 2000 undefined Project: /user/username/projects/container/compositeExec/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] event: @@ -403,369 +807,12 @@ Info seq [hh:mm:ss:mss] event: } } } -Before request -//// [/a/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } - -//// [/user/username/projects/container/lib/tsconfig.json] -{ - "compilerOptions": { - "outFile": "../built/local/lib.js", - "composite": true, - "declarationMap": true - }, - "references": [], - "files": [ - "index.ts" - ] -} - -//// [/user/username/projects/container/lib/index.ts] -namespace container { - export const myConst = 30; -} - - -//// [/user/username/projects/container/exec/tsconfig.json] -{ - "compilerOptions": { - "ignoreDeprecations": "5.0", - "outFile": "../built/local/exec.js" - }, - "files": [ - "index.ts" - ], - "references": [ +Info seq [hh:mm:ss:mss] response: { - "path": "../lib", - "prepend": true - } - ] -} - -//// [/user/username/projects/container/exec/index.ts] -namespace container { - export function getMyConst() { - return myConst; - } -} - - -//// [/user/username/projects/container/compositeExec/tsconfig.json] -{ - "compilerOptions": { - "ignoreDeprecations": "5.0", - "outFile": "../built/local/compositeExec.js", - "composite": true, - "declarationMap": true - }, - "files": [ - "index.ts" - ], - "references": [ - { - "path": "../lib", - "prepend": true - } - ] -} - -//// [/user/username/projects/container/compositeExec/index.ts] -namespace container { - export function getMyConst() { - return myConst; - } -} - - -//// [/user/username/projects/container/tsconfig.json] -{ - "files": [], - "include": [], - "references": [ - { - "path": "./exec" - }, - { - "path": "./compositeExec" - } - ] -} - -//// [/user/username/projects/container/built/local/lib.js] -var container; -(function (container) { - container.myConst = 30; -})(container || (container = {})); - - -//// [/user/username/projects/container/built/local/lib.d.ts.map] -{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B"} - -//// [/user/username/projects/container/built/local/lib.d.ts] -declare namespace container { - const myConst = 30; -} -//# sourceMappingURL=lib.d.ts.map - -//// [/user/username/projects/container/built/local/lib.tsbuildinfo] -{"bundle":{"commonSourceDirectory":"../../lib","sourceFiles":["../../lib/index.ts"],"js":{"sections":[{"pos":0,"end":102,"kind":"text"}],"hash":"-5780640416-var container;\n(function (container) {\n container.myConst = 30;\n})(container || (container = {}));\n"},"dts":{"sections":[{"pos":0,"end":56,"kind":"text"}],"mapHash":"-12950023432-{\"version\":3,\"file\":\"lib.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\"],\"names\":[],\"mappings\":\"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B\"}","hash":"-3233313694-declare namespace container {\n const myConst = 30;\n}\n//# sourceMappingURL=lib.d.ts.map"}},"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","../../lib/index.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","-14968179652-namespace container {\n export const myConst = 30;\n}\n"],"root":[2],"options":{"composite":true,"declarationMap":true,"outFile":"./lib.js"},"outSignature":"4250822250-declare namespace container {\n const myConst = 30;\n}\n","latestChangedDtsFile":"./lib.d.ts"},"version":"FakeTSVersion"} - -//// [/user/username/projects/container/built/local/lib.tsbuildinfo.readable.baseline.txt] -{ - "bundle": { - "commonSourceDirectory": "../../lib", - "sourceFiles": [ - "../../lib/index.ts" - ], - "js": { - "sections": [ - { - "pos": 0, - "end": 102, - "kind": "text" - } - ], - "hash": "-5780640416-var container;\n(function (container) {\n container.myConst = 30;\n})(container || (container = {}));\n" - }, - "dts": { - "sections": [ - { - "pos": 0, - "end": 56, - "kind": "text" - } - ], - "hash": "-3233313694-declare namespace container {\n const myConst = 30;\n}\n//# sourceMappingURL=lib.d.ts.map", - "mapHash": "-12950023432-{\"version\":3,\"file\":\"lib.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\"],\"names\":[],\"mappings\":\"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B\"}" - } - }, - "program": { - "fileNames": [ - "../../../../../../a/lib/lib.d.ts", - "../../lib/index.ts" - ], - "fileInfos": { - "../../../../../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "../../lib/index.ts": "-14968179652-namespace container {\n export const myConst = 30;\n}\n" - }, - "root": [ - [ - 2, - "../../lib/index.ts" - ] - ], - "options": { - "composite": true, - "declarationMap": true, - "outFile": "./lib.js" - }, - "outSignature": "4250822250-declare namespace container {\n const myConst = 30;\n}\n", - "latestChangedDtsFile": "./lib.d.ts" - }, - "version": "FakeTSVersion", - "size": 1401 -} - -//// [/user/username/projects/container/built/local/lib.tsbuildinfo.baseline.txt] -====================================================================== -File:: /user/username/projects/container/built/local/lib.js ----------------------------------------------------------------------- -text: (0-102) -var container; -(function (container) { - container.myConst = 30; -})(container || (container = {})); - -====================================================================== -====================================================================== -File:: /user/username/projects/container/built/local/lib.d.ts ----------------------------------------------------------------------- -text: (0-56) -declare namespace container { - const myConst = 30; -} - -====================================================================== - -//// [/user/username/projects/container/built/local/exec.js] -var container; -(function (container) { - container.myConst = 30; -})(container || (container = {})); -var container; -(function (container) { - function getMyConst() { - return container.myConst; - } - container.getMyConst = getMyConst; -})(container || (container = {})); - - -//// [/user/username/projects/container/built/local/compositeExec.js] -var container; -(function (container) { - container.myConst = 30; -})(container || (container = {})); -var container; -(function (container) { - function getMyConst() { - return container.myConst; - } - container.getMyConst = getMyConst; -})(container || (container = {})); - - -//// [/user/username/projects/container/built/local/compositeExec.d.ts.map] -{"version":3,"file":"compositeExec.d.ts","sourceRoot":"","sources":["../../lib/index.ts","../../compositeExec/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B;ACFD,kBAAU,SAAS,CAAC;IAChB,SAAgB,UAAU,WAEzB;CACJ"} - -//// [/user/username/projects/container/built/local/compositeExec.d.ts] -declare namespace container { - const myConst = 30; -} -declare namespace container { - function getMyConst(): number; -} -//# sourceMappingURL=compositeExec.d.ts.map - -//// [/user/username/projects/container/built/local/compositeExec.tsbuildinfo] -{"bundle":{"commonSourceDirectory":"../../compositeExec","sourceFiles":["../../compositeExec/index.ts"],"js":{"sections":[{"pos":0,"end":102,"kind":"prepend","data":"./lib.js","texts":[{"pos":0,"end":102,"kind":"text"}]},{"pos":102,"end":283,"kind":"text"}],"hash":"-2184050024-var container;\n(function (container) {\n container.myConst = 30;\n})(container || (container = {}));\nvar container;\n(function (container) {\n function getMyConst() {\n return container.myConst;\n }\n container.getMyConst = getMyConst;\n})(container || (container = {}));\n"},"dts":{"sections":[{"pos":0,"end":56,"kind":"prepend","data":"./lib.d.ts","texts":[{"pos":0,"end":56,"kind":"text"}]},{"pos":56,"end":123,"kind":"text"}],"mapHash":"25748245913-{\"version\":3,\"file\":\"compositeExec.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\",\"../../compositeExec/index.ts\"],\"names\":[],\"mappings\":\"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B;ACFD,kBAAU,SAAS,CAAC;IAChB,SAAgB,UAAU,WAEzB;CACJ\"}","hash":"862035579-declare namespace container {\n const myConst = 30;\n}\ndeclare namespace container {\n function getMyConst(): number;\n}\n//# sourceMappingURL=compositeExec.d.ts.map"}},"program":{"fileNames":["../../../../../../a/lib/lib.d.ts","./lib.d.ts","../../compositeexec/index.ts"],"fileInfos":["-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","4250822250-declare namespace container {\n const myConst = 30;\n}\n","-4062145979-namespace container {\n export function getMyConst() {\n return myConst;\n }\n}\n"],"root":[3],"options":{"composite":true,"declarationMap":true,"outFile":"./compositeExec.js"},"outSignature":"5987946274-declare namespace container {\n const myConst = 30;\n}\ndeclare namespace container {\n function getMyConst(): number;\n}\n","latestChangedDtsFile":"./compositeExec.d.ts"},"version":"FakeTSVersion"} - -//// [/user/username/projects/container/built/local/compositeExec.tsbuildinfo.readable.baseline.txt] -{ - "bundle": { - "commonSourceDirectory": "../../compositeExec", - "sourceFiles": [ - "../../compositeExec/index.ts" - ], - "js": { - "sections": [ - { - "pos": 0, - "end": 102, - "kind": "prepend", - "data": "./lib.js", - "texts": [ - { - "pos": 0, - "end": 102, - "kind": "text" - } - ] - }, - { - "pos": 102, - "end": 283, - "kind": "text" - } - ], - "hash": "-2184050024-var container;\n(function (container) {\n container.myConst = 30;\n})(container || (container = {}));\nvar container;\n(function (container) {\n function getMyConst() {\n return container.myConst;\n }\n container.getMyConst = getMyConst;\n})(container || (container = {}));\n" - }, - "dts": { - "sections": [ - { - "pos": 0, - "end": 56, - "kind": "prepend", - "data": "./lib.d.ts", - "texts": [ - { - "pos": 0, - "end": 56, - "kind": "text" - } - ] - }, - { - "pos": 56, - "end": 123, - "kind": "text" - } - ], - "hash": "862035579-declare namespace container {\n const myConst = 30;\n}\ndeclare namespace container {\n function getMyConst(): number;\n}\n//# sourceMappingURL=compositeExec.d.ts.map", - "mapHash": "25748245913-{\"version\":3,\"file\":\"compositeExec.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../../lib/index.ts\",\"../../compositeExec/index.ts\"],\"names\":[],\"mappings\":\"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B;ACFD,kBAAU,SAAS,CAAC;IAChB,SAAgB,UAAU,WAEzB;CACJ\"}" - } - }, - "program": { - "fileNames": [ - "../../../../../../a/lib/lib.d.ts", - "./lib.d.ts", - "../../compositeexec/index.ts" - ], - "fileInfos": { - "../../../../../../a/lib/lib.d.ts": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", - "./lib.d.ts": "4250822250-declare namespace container {\n const myConst = 30;\n}\n", - "../../compositeexec/index.ts": "-4062145979-namespace container {\n export function getMyConst() {\n return myConst;\n }\n}\n" - }, - "root": [ - [ - 3, - "../../compositeexec/index.ts" - ] - ], - "options": { - "composite": true, - "declarationMap": true, - "outFile": "./compositeExec.js" - }, - "outSignature": "5987946274-declare namespace container {\n const myConst = 30;\n}\ndeclare namespace container {\n function getMyConst(): number;\n}\n", - "latestChangedDtsFile": "./compositeExec.d.ts" - }, - "version": "FakeTSVersion", - "size": 2201 -} - -//// [/user/username/projects/container/built/local/compositeExec.tsbuildinfo.baseline.txt] -====================================================================== -File:: /user/username/projects/container/built/local/compositeExec.js ----------------------------------------------------------------------- -prepend: (0-102):: ./lib.js texts:: 1 ->>-------------------------------------------------------------------- -text: (0-102) -var container; -(function (container) { - container.myConst = 30; -})(container || (container = {})); - ----------------------------------------------------------------------- -text: (102-283) -var container; -(function (container) { - function getMyConst() { - return container.myConst; + "response": true, + "responseRequired": true } - container.getMyConst = getMyConst; -})(container || (container = {})); - -====================================================================== -====================================================================== -File:: /user/username/projects/container/built/local/compositeExec.d.ts ----------------------------------------------------------------------- -prepend: (0-56):: ./lib.d.ts texts:: 1 ->>-------------------------------------------------------------------- -text: (0-56) -declare namespace container { - const myConst = 30; -} - ----------------------------------------------------------------------- -text: (56-123) -declare namespace container { - function getMyConst(): number; -} - -====================================================================== - +After request PolledWatches:: /user/username/projects/container/compositeExec/node_modules/@types: *new* @@ -797,27 +844,11 @@ FsWatches:: /user/username/projects/container/tsconfig.json: *new* {} -Info seq [hh:mm:ss:mss] request: - { - "command": "syntacticDiagnosticsSync", - "arguments": { - "file": "/a/lib/lib.d.ts" - }, - "seq": 1, - "type": "request" - } -Info seq [hh:mm:ss:mss] response: - { - "response": [], - "responseRequired": true - } -After request - Before request Info seq [hh:mm:ss:mss] request: { - "command": "semanticDiagnosticsSync", + "command": "syntacticDiagnosticsSync", "arguments": { "file": "/a/lib/lib.d.ts" }, @@ -835,10 +866,9 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "syntacticDiagnosticsSync", + "command": "semanticDiagnosticsSync", "arguments": { - "file": "/user/username/projects/container/lib/tsconfig.json", - "projectFileName": "/user/username/projects/container/lib/tsconfig.json" + "file": "/a/lib/lib.d.ts" }, "seq": 3, "type": "request" @@ -854,7 +884,7 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "semanticDiagnosticsSync", + "command": "syntacticDiagnosticsSync", "arguments": { "file": "/user/username/projects/container/lib/tsconfig.json", "projectFileName": "/user/username/projects/container/lib/tsconfig.json" @@ -873,9 +903,10 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "syntacticDiagnosticsSync", + "command": "semanticDiagnosticsSync", "arguments": { - "file": "/user/username/projects/container/lib/index.ts" + "file": "/user/username/projects/container/lib/tsconfig.json", + "projectFileName": "/user/username/projects/container/lib/tsconfig.json" }, "seq": 5, "type": "request" @@ -891,7 +922,7 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "semanticDiagnosticsSync", + "command": "syntacticDiagnosticsSync", "arguments": { "file": "/user/username/projects/container/lib/index.ts" }, @@ -909,10 +940,9 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "syntacticDiagnosticsSync", + "command": "semanticDiagnosticsSync", "arguments": { - "file": "/user/username/projects/container/exec/tsconfig.json", - "projectFileName": "/user/username/projects/container/exec/tsconfig.json" + "file": "/user/username/projects/container/lib/index.ts" }, "seq": 7, "type": "request" @@ -928,7 +958,7 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "semanticDiagnosticsSync", + "command": "syntacticDiagnosticsSync", "arguments": { "file": "/user/username/projects/container/exec/tsconfig.json", "projectFileName": "/user/username/projects/container/exec/tsconfig.json" @@ -947,9 +977,10 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "syntacticDiagnosticsSync", + "command": "semanticDiagnosticsSync", "arguments": { - "file": "/user/username/projects/container/exec/index.ts" + "file": "/user/username/projects/container/exec/tsconfig.json", + "projectFileName": "/user/username/projects/container/exec/tsconfig.json" }, "seq": 9, "type": "request" @@ -965,7 +996,7 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "semanticDiagnosticsSync", + "command": "syntacticDiagnosticsSync", "arguments": { "file": "/user/username/projects/container/exec/index.ts" }, @@ -983,10 +1014,9 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "syntacticDiagnosticsSync", + "command": "semanticDiagnosticsSync", "arguments": { - "file": "/user/username/projects/container/compositeExec/tsconfig.json", - "projectFileName": "/user/username/projects/container/compositeExec/tsconfig.json" + "file": "/user/username/projects/container/exec/index.ts" }, "seq": 11, "type": "request" @@ -1002,7 +1032,7 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "semanticDiagnosticsSync", + "command": "syntacticDiagnosticsSync", "arguments": { "file": "/user/username/projects/container/compositeExec/tsconfig.json", "projectFileName": "/user/username/projects/container/compositeExec/tsconfig.json" @@ -1021,9 +1051,10 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "syntacticDiagnosticsSync", + "command": "semanticDiagnosticsSync", "arguments": { - "file": "/user/username/projects/container/compositeExec/index.ts" + "file": "/user/username/projects/container/compositeExec/tsconfig.json", + "projectFileName": "/user/username/projects/container/compositeExec/tsconfig.json" }, "seq": 13, "type": "request" @@ -1039,7 +1070,7 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "semanticDiagnosticsSync", + "command": "syntacticDiagnosticsSync", "arguments": { "file": "/user/username/projects/container/compositeExec/index.ts" }, @@ -1057,10 +1088,9 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "syntacticDiagnosticsSync", + "command": "semanticDiagnosticsSync", "arguments": { - "file": "/user/username/projects/container/tsconfig.json", - "projectFileName": "/user/username/projects/container/tsconfig.json" + "file": "/user/username/projects/container/compositeExec/index.ts" }, "seq": 15, "type": "request" @@ -1076,7 +1106,7 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "semanticDiagnosticsSync", + "command": "syntacticDiagnosticsSync", "arguments": { "file": "/user/username/projects/container/tsconfig.json", "projectFileName": "/user/username/projects/container/tsconfig.json" @@ -1095,8 +1125,9 @@ Before request Info seq [hh:mm:ss:mss] request: { - "command": "compilerOptionsDiagnostics-full", + "command": "semanticDiagnosticsSync", "arguments": { + "file": "/user/username/projects/container/tsconfig.json", "projectFileName": "/user/username/projects/container/tsconfig.json" }, "seq": 17, @@ -1108,3 +1139,21 @@ Info seq [hh:mm:ss:mss] response: "responseRequired": true } After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "compilerOptionsDiagnostics-full", + "arguments": { + "projectFileName": "/user/username/projects/container/tsconfig.json" + }, + "seq": 18, + "type": "request" + } +Info seq [hh:mm:ss:mss] response: + { + "response": [], + "responseRequired": true + } +After request diff --git a/tests/baselines/reference/tsserver/projectReferences/project-is-directly-referenced-by-solution.js b/tests/baselines/reference/tsserver/projectReferences/project-is-directly-referenced-by-solution.js index 394ec4ac60d..177023a759d 100644 --- a/tests/baselines/reference/tsserver/projectReferences/project-is-directly-referenced-by-solution.js +++ b/tests/baselines/reference/tsserver/projectReferences/project-is-directly-referenced-by-solution.js @@ -1,5 +1,106 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "references": [ + { + "path": "./tsconfig-src.json" + } + ], + "files": [] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -212,99 +313,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json -Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json -Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json -Before request -//// [/user/username/projects/myproject/tsconfig-src.json] -{ - "compilerOptions": { - "composite": true, - "outDir": "./target/", - "baseUrl": "./src/" - }, - "include": [ - "./src/**/*" - ] -} - -//// [/user/username/projects/myproject/tsconfig.json] -{ - "references": [ +Info seq [hh:mm:ss:mss] response: { - "path": "./tsconfig-src.json" - } - ], - "files": [] -} - -//// [/user/username/projects/myproject/src/main.ts] -import { foo } from 'helpers/functions'; -export { foo }; - -//// [/user/username/projects/myproject/src/helpers/functions.ts] -export const foo = 1; - -//// [/a/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } - -//// [/dummy/dummy.ts] -let a = 10; - -//// [/user/username/projects/myproject/target/src/main.d.ts] -import { foo } from 'helpers/functions'; -export { foo }; -//# sourceMappingURL=main.d.ts.map - -//// [/user/username/projects/myproject/target/src/main.d.ts.map] -{ - "version": 3, - "file": "main.d.ts", - "sourceRoot": "", - "sources": [ - "../../src/main.ts" - ], - "names": [], - "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" -} - -//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] -export declare const foo = 1; -//# sourceMappingURL=functions.d.ts.map - -//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] -{ - "version": 3, - "file": "functions.d.ts", - "sourceRoot": "", - "sources": [ - "../../../src/helpers/functions.ts" - ], - "names": [], - "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" -} - -//// [/user/username/projects/myproject/indirect3/tsconfig.json] -{ - "compilerOptions": { - "baseUrl": "../target/src/" - } -} - -//// [/user/username/projects/myproject/indirect3/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/myproject/node_modules/@types: *new* @@ -326,6 +339,10 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: *new* {} +Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Before request + Info seq [hh:mm:ss:mss] request: { "command": "geterr", @@ -335,7 +352,7 @@ Info seq [hh:mm:ss:mss] request: "/user/username/projects/myproject/src/main.ts" ] }, - "seq": 1, + "seq": 2, "type": "request" } Info seq [hh:mm:ss:mss] response: @@ -402,11 +419,22 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "requestCompleted", "body": { - "request_seq": 1 + "request_seq": 2 } } After running Immedidate callback:: count: 0 +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -440,6 +468,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -456,6 +501,45 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -470,6 +554,47 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -521,6 +646,49 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -652,6 +820,43 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 8, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -668,6 +873,45 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 9, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -691,6 +935,44 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 10, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig-src.json @@ -877,48 +1159,16 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* -Before request - -PolledWatches:: -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} *new* -/user/username/projects/node_modules/@types: - {"pollingInterval":500} *new* - -PolledWatches *deleted*:: -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/node_modules/@types: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/user/username/projects/myproject/src/helpers/functions.ts: - {} *new* -/user/username/projects/myproject/tsconfig-src.json: - {} *new* -/user/username/projects/myproject/tsconfig.json: - {} *new* - -FsWatches *deleted*:: -/user/username/projects/myproject/src/helpers/functions.ts: - {} -/user/username/projects/myproject/tsconfig-src.json: - {} -/user/username/projects/myproject/tsconfig.json: - {} - -FsWatchesRecursive:: -/user/username/projects/myproject/src: - {} *new* - -FsWatchesRecursive *deleted*:: -/user/username/projects/myproject/src: - {} +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request Timeout callback:: count: 0 +Before request + Info seq [hh:mm:ss:mss] request: { "command": "references", @@ -927,7 +1177,7 @@ Info seq [hh:mm:ss:mss] request: "line": 2, "offset": 10 }, - "seq": 2, + "seq": 11, "type": "request" } Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/src/main.ts position 50 in project /user/username/projects/myproject/tsconfig-src.json @@ -1036,6 +1286,17 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 12, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -1052,6 +1313,49 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts.map: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 13, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -1066,6 +1370,51 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts.map: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/indirect3/main.ts" + }, + "seq": 14, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/indirect3 Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/indirect3/main.ts :: Config file name: /user/username/projects/myproject/indirect3/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/indirect3/tsconfig.json @@ -1241,7 +1590,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/indirect3/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/indirect3/tsconfig.json -Before request +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/myproject/indirect3/node_modules/@types: *new* @@ -1266,6 +1619,10 @@ FsWatches:: {} FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} /user/username/projects/myproject/tsconfig-src.json: {} /user/username/projects/myproject/tsconfig.json: @@ -1281,6 +1638,8 @@ FsWatchesRecursive *deleted*:: /user/username/projects/myproject/src: {} +Before request + Info seq [hh:mm:ss:mss] request: { "command": "references", @@ -1289,7 +1648,7 @@ Info seq [hh:mm:ss:mss] request: "line": 1, "offset": 10 }, - "seq": 3, + "seq": 15, "type": "request" } Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/indirect3/main.ts position 9 in project /user/username/projects/myproject/indirect3/tsconfig.json diff --git a/tests/baselines/reference/tsserver/projectReferences/project-is-indirectly-referenced-by-solution.js b/tests/baselines/reference/tsserver/projectReferences/project-is-indirectly-referenced-by-solution.js index 403016e07d7..3737fe13480 100644 --- a/tests/baselines/reference/tsserver/projectReferences/project-is-indirectly-referenced-by-solution.js +++ b/tests/baselines/reference/tsserver/projectReferences/project-is-indirectly-referenced-by-solution.js @@ -1,5 +1,153 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "references": [ + { + "path": "./tsconfig-indirect1.json" + }, + { + "path": "./tsconfig-indirect2.json" + } + ], + "files": [] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect1.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "files": [ + "./indirect1/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect1/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect2.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "files": [ + "./indirect2/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect2/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -252,146 +400,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json -Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json -Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json -Before request -//// [/user/username/projects/myproject/tsconfig-src.json] -{ - "compilerOptions": { - "composite": true, - "outDir": "./target/", - "baseUrl": "./src/" - }, - "include": [ - "./src/**/*" - ] -} - -//// [/user/username/projects/myproject/tsconfig.json] -{ - "references": [ +Info seq [hh:mm:ss:mss] response: { - "path": "./tsconfig-indirect1.json" - }, - { - "path": "./tsconfig-indirect2.json" - } - ], - "files": [] -} - -//// [/user/username/projects/myproject/src/main.ts] -import { foo } from 'helpers/functions'; -export { foo }; - -//// [/user/username/projects/myproject/src/helpers/functions.ts] -export const foo = 1; - -//// [/a/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } - -//// [/dummy/dummy.ts] -let a = 10; - -//// [/user/username/projects/myproject/target/src/main.d.ts] -import { foo } from 'helpers/functions'; -export { foo }; -//# sourceMappingURL=main.d.ts.map - -//// [/user/username/projects/myproject/target/src/main.d.ts.map] -{ - "version": 3, - "file": "main.d.ts", - "sourceRoot": "", - "sources": [ - "../../src/main.ts" - ], - "names": [], - "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" -} - -//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] -export declare const foo = 1; -//# sourceMappingURL=functions.d.ts.map - -//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] -{ - "version": 3, - "file": "functions.d.ts", - "sourceRoot": "", - "sources": [ - "../../../src/helpers/functions.ts" - ], - "names": [], - "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" -} - -//// [/user/username/projects/myproject/indirect3/tsconfig.json] -{ - "compilerOptions": { - "baseUrl": "../target/src/" - } -} - -//// [/user/username/projects/myproject/indirect3/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - -//// [/user/username/projects/myproject/tsconfig-indirect1.json] -{ - "compilerOptions": { - "composite": true, - "outDir": "./target/", - "baseUrl": "./src/" - }, - "files": [ - "./indirect1/main.ts" - ], - "references": [ - { - "path": "./tsconfig-src.json" - } - ] -} - -//// [/user/username/projects/myproject/indirect1/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - -//// [/user/username/projects/myproject/tsconfig-indirect2.json] -{ - "compilerOptions": { - "composite": true, - "outDir": "./target/", - "baseUrl": "./src/" - }, - "files": [ - "./indirect2/main.ts" - ], - "references": [ - { - "path": "./tsconfig-src.json" - } - ] -} - -//// [/user/username/projects/myproject/indirect2/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/myproject/node_modules/@types: *new* @@ -417,6 +430,10 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: *new* {} +Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Before request + Info seq [hh:mm:ss:mss] request: { "command": "geterr", @@ -426,7 +443,7 @@ Info seq [hh:mm:ss:mss] request: "/user/username/projects/myproject/src/main.ts" ] }, - "seq": 1, + "seq": 2, "type": "request" } Info seq [hh:mm:ss:mss] response: @@ -493,11 +510,22 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "requestCompleted", "body": { - "request_seq": 1 + "request_seq": 2 } } After running Immedidate callback:: count: 0 +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -531,6 +559,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -547,6 +592,49 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -561,6 +649,51 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -614,6 +747,53 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -785,6 +965,47 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-indirect2.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 8, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -801,6 +1022,49 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 9, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -824,6 +1088,48 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 10, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig-src.json @@ -1048,56 +1354,16 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* -Before request - -PolledWatches:: -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} *new* -/user/username/projects/node_modules/@types: - {"pollingInterval":500} *new* - -PolledWatches *deleted*:: -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/node_modules/@types: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/user/username/projects/myproject/src/helpers/functions.ts: - {} *new* -/user/username/projects/myproject/tsconfig-indirect1.json: - {} *new* -/user/username/projects/myproject/tsconfig-indirect2.json: - {} *new* -/user/username/projects/myproject/tsconfig-src.json: - {} *new* -/user/username/projects/myproject/tsconfig.json: - {} *new* - -FsWatches *deleted*:: -/user/username/projects/myproject/src/helpers/functions.ts: - {} -/user/username/projects/myproject/tsconfig-indirect1.json: - {} -/user/username/projects/myproject/tsconfig-indirect2.json: - {} -/user/username/projects/myproject/tsconfig-src.json: - {} -/user/username/projects/myproject/tsconfig.json: - {} - -FsWatchesRecursive:: -/user/username/projects/myproject/src: - {} *new* - -FsWatchesRecursive *deleted*:: -/user/username/projects/myproject/src: - {} +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request Timeout callback:: count: 0 +Before request + Info seq [hh:mm:ss:mss] request: { "command": "references", @@ -1106,7 +1372,7 @@ Info seq [hh:mm:ss:mss] request: "line": 2, "offset": 10 }, - "seq": 2, + "seq": 11, "type": "request" } Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/src/main.ts position 50 in project /user/username/projects/myproject/tsconfig-src.json @@ -1497,6 +1763,17 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 12, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -1521,6 +1798,57 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/indirect2/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts.map: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 13, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -1543,6 +1871,59 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/indirect2/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts.map: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/indirect3/main.ts" + }, + "seq": 14, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/indirect3 Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/indirect3/main.ts :: Config file name: /user/username/projects/myproject/indirect3/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/indirect3/tsconfig.json @@ -1768,7 +2149,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/indirect3/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/indirect3/tsconfig.json -Before request +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/myproject/indirect3/node_modules/@types: *new* @@ -1793,10 +2178,14 @@ FsWatches:: {} FsWatches *deleted*:: +/dummy/dummy.ts: + {} /user/username/projects/myproject/indirect1/main.ts: {} /user/username/projects/myproject/indirect2/main.ts: {} +/user/username/projects/myproject/src/main.ts: + {} /user/username/projects/myproject/tsconfig-indirect1.json: {} /user/username/projects/myproject/tsconfig-indirect2.json: @@ -1816,6 +2205,8 @@ FsWatchesRecursive *deleted*:: /user/username/projects/myproject/src: {} +Before request + Info seq [hh:mm:ss:mss] request: { "command": "references", @@ -1824,7 +2215,7 @@ Info seq [hh:mm:ss:mss] request: "line": 1, "offset": 10 }, - "seq": 3, + "seq": 15, "type": "request" } Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/indirect3/main.ts position 9 in project /user/username/projects/myproject/indirect3/tsconfig.json diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-first-indirect-project-but-not-in-another-one.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-first-indirect-project-but-not-in-another-one.js index bafadaa0a80..f989f90098d 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-first-indirect-project-but-not-in-another-one.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-first-indirect-project-but-not-in-another-one.js @@ -1,5 +1,164 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./target/", + "baseUrl": "./indirect1/" + }, + "references": [ + { + "path": "./tsconfig-indirect1.json" + }, + { + "path": "./tsconfig-indirect2.json" + } + ], + "files": [ + "./own/main.ts" + ] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect1.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/", + "disableReferencedProjectLoad": true + }, + "files": [ + "./indirect1/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect1/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect2.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "files": [ + "./indirect2/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect2/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/own/main.ts] +import { bar } from 'main'; +bar; + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -279,8 +438,53 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-indirect2.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 2, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -314,6 +518,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -330,6 +551,53 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -344,6 +612,55 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -414,6 +731,57 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -609,6 +977,48 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-indirect2.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig.json @@ -860,4 +1270,11 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json,/user/username/projects/myproject/tsconfig.json \ No newline at end of file +Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json,/user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js index 64750c8534b..c16707276cc 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js @@ -1,5 +1,139 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./target/", + "baseUrl": "./indirect1/" + }, + "references": [ + { + "path": "./tsconfig-indirect1.json" + } + ], + "files": [ + "./own/main.ts" + ] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect1.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/", + "disableReferencedProjectLoad": true + }, + "files": [ + "./indirect1/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect1/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/own/main.ts] +import { bar } from 'main'; +bar; + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -260,8 +394,51 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-indirect1.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: undefined +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 2, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -295,6 +472,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-indirect1.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -311,6 +505,51 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -325,6 +564,53 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -396,6 +682,55 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -571,6 +906,46 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-indirect1.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig.json @@ -804,4 +1179,11 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-indirect1.json \ No newline at end of file +Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-indirect1.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js index 1f9acc289be..f511e36a2c0 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js @@ -1,5 +1,118 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./target/", + "baseUrl": "./src/", + "disableReferencedProjectLoad": true + }, + "references": [ + { + "path": "./tsconfig-src.json" + } + ], + "files": [ + "./own/main.ts" + ] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/own/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -145,8 +258,47 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: undefined +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 2, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -176,6 +328,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -188,6 +357,47 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -198,6 +408,49 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -241,6 +494,51 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -346,6 +644,42 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/own/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig.json @@ -487,4 +821,39 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json \ No newline at end of file +Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} *new* +/user/username/projects/node_modules/@types: + {"pollingInterval":500} *new* + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-found-is-not-solution-but-references-open-file-through-project-reference.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-found-is-not-solution-but-references-open-file-through-project-reference.js index 0336184e693..de8e6ea1959 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-found-is-not-solution-but-references-open-file-through-project-reference.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-found-is-not-solution-but-references-open-file-through-project-reference.js @@ -1,5 +1,117 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./target/", + "baseUrl": "./src/" + }, + "references": [ + { + "path": "./tsconfig-src.json" + } + ], + "files": [ + "./own/main.ts" + ] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/own/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -234,110 +346,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json -Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json -Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json -Before request -//// [/user/username/projects/myproject/tsconfig-src.json] -{ - "compilerOptions": { - "composite": true, - "outDir": "./target/", - "baseUrl": "./src/" - }, - "include": [ - "./src/**/*" - ] -} - -//// [/user/username/projects/myproject/tsconfig.json] -{ - "compilerOptions": { - "outDir": "./target/", - "baseUrl": "./src/" - }, - "references": [ +Info seq [hh:mm:ss:mss] response: { - "path": "./tsconfig-src.json" - } - ], - "files": [ - "./own/main.ts" - ] -} - -//// [/user/username/projects/myproject/src/main.ts] -import { foo } from 'helpers/functions'; -export { foo }; - -//// [/user/username/projects/myproject/src/helpers/functions.ts] -export const foo = 1; - -//// [/a/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } - -//// [/dummy/dummy.ts] -let a = 10; - -//// [/user/username/projects/myproject/target/src/main.d.ts] -import { foo } from 'helpers/functions'; -export { foo }; -//# sourceMappingURL=main.d.ts.map - -//// [/user/username/projects/myproject/target/src/main.d.ts.map] -{ - "version": 3, - "file": "main.d.ts", - "sourceRoot": "", - "sources": [ - "../../src/main.ts" - ], - "names": [], - "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" -} - -//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] -export declare const foo = 1; -//# sourceMappingURL=functions.d.ts.map - -//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] -{ - "version": 3, - "file": "functions.d.ts", - "sourceRoot": "", - "sources": [ - "../../../src/helpers/functions.ts" - ], - "names": [], - "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" -} - -//// [/user/username/projects/myproject/indirect3/tsconfig.json] -{ - "compilerOptions": { - "baseUrl": "../target/src/" - } -} - -//// [/user/username/projects/myproject/indirect3/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - -//// [/user/username/projects/myproject/own/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/myproject/node_modules/@types: *new* @@ -361,6 +374,10 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: *new* {} +Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Before request + Info seq [hh:mm:ss:mss] request: { "command": "geterr", @@ -370,7 +387,7 @@ Info seq [hh:mm:ss:mss] request: "/user/username/projects/myproject/src/main.ts" ] }, - "seq": 1, + "seq": 2, "type": "request" } Info seq [hh:mm:ss:mss] response: @@ -437,11 +454,22 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "requestCompleted", "body": { - "request_seq": 1 + "request_seq": 2 } } After running Immedidate callback:: count: 0 +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -475,6 +503,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -491,6 +536,47 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -505,6 +591,49 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -569,6 +698,51 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -719,6 +893,45 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/own/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 8, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -735,6 +948,47 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 9, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -758,6 +1012,46 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 10, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig.json @@ -966,52 +1260,16 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json,/user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* -Before request - -PolledWatches:: -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} *new* -/user/username/projects/node_modules/@types: - {"pollingInterval":500} *new* - -PolledWatches *deleted*:: -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/node_modules/@types: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/user/username/projects/myproject/own/main.ts: - {} *new* -/user/username/projects/myproject/src/helpers/functions.ts: - {} *new* -/user/username/projects/myproject/tsconfig-src.json: - {} *new* -/user/username/projects/myproject/tsconfig.json: - {} *new* - -FsWatches *deleted*:: -/user/username/projects/myproject/own/main.ts: - {} -/user/username/projects/myproject/src/helpers/functions.ts: - {} -/user/username/projects/myproject/tsconfig-src.json: - {} -/user/username/projects/myproject/tsconfig.json: - {} - -FsWatchesRecursive:: -/user/username/projects/myproject/src: - {} *new* - -FsWatchesRecursive *deleted*:: -/user/username/projects/myproject/src: - {} +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request Timeout callback:: count: 0 +Before request + Info seq [hh:mm:ss:mss] request: { "command": "references", @@ -1020,7 +1278,7 @@ Info seq [hh:mm:ss:mss] request: "line": 2, "offset": 10 }, - "seq": 2, + "seq": 11, "type": "request" } Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/src/main.ts position 50 in project /user/username/projects/myproject/tsconfig-src.json @@ -1178,6 +1436,17 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 12, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -1194,6 +1463,51 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts.map: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 13, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -1208,6 +1522,53 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts.map: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/indirect3/main.ts" + }, + "seq": 14, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/indirect3 Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/indirect3/main.ts :: Config file name: /user/username/projects/myproject/indirect3/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/indirect3/tsconfig.json @@ -1396,7 +1757,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/indirect3/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/indirect3/tsconfig.json -Before request +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/myproject/indirect3/node_modules/@types: *new* @@ -1421,8 +1786,12 @@ FsWatches:: {} FsWatches *deleted*:: +/dummy/dummy.ts: + {} /user/username/projects/myproject/own/main.ts: {} +/user/username/projects/myproject/src/main.ts: + {} /user/username/projects/myproject/tsconfig-src.json: {} /user/username/projects/myproject/tsconfig.json: @@ -1438,6 +1807,8 @@ FsWatchesRecursive *deleted*:: /user/username/projects/myproject/src: {} +Before request + Info seq [hh:mm:ss:mss] request: { "command": "references", @@ -1446,7 +1817,7 @@ Info seq [hh:mm:ss:mss] request: "line": 1, "offset": 10 }, - "seq": 3, + "seq": 15, "type": "request" } Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/indirect3/main.ts position 9 in project /user/username/projects/myproject/indirect3/tsconfig.json diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-is-indirectly-referenced-by-solution.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-is-indirectly-referenced-by-solution.js index 6a8a1a7be3b..231d405fa17 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-is-indirectly-referenced-by-solution.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-project-is-indirectly-referenced-by-solution.js @@ -1,5 +1,163 @@ currentDirectory:: / useCaseSensitiveFileNames: false Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/tsconfig-src.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "include": [ + "./src/**/*" + ] +} + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./target/", + "baseUrl": "./indirect1/" + }, + "references": [ + { + "path": "./tsconfig-indirect1.json" + }, + { + "path": "./tsconfig-indirect2.json" + } + ], + "files": [ + "./own/main.ts" + ] +} + +//// [/user/username/projects/myproject/src/main.ts] +import { foo } from 'helpers/functions'; +export { foo }; + +//// [/user/username/projects/myproject/src/helpers/functions.ts] +export const foo = 1; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/dummy/dummy.ts] +let a = 10; + +//// [/user/username/projects/myproject/target/src/main.d.ts] +import { foo } from 'helpers/functions'; +export { foo }; +//# sourceMappingURL=main.d.ts.map + +//// [/user/username/projects/myproject/target/src/main.d.ts.map] +{ + "version": 3, + "file": "main.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/main.ts" + ], + "names": [], + "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" +} + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] +export declare const foo = 1; +//# sourceMappingURL=functions.d.ts.map + +//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] +{ + "version": 3, + "file": "functions.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/helpers/functions.ts" + ], + "names": [], + "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" +} + +//// [/user/username/projects/myproject/indirect3/tsconfig.json] +{ + "compilerOptions": { + "baseUrl": "../target/src/" + } +} + +//// [/user/username/projects/myproject/indirect3/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect1.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "files": [ + "./indirect1/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect1/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/tsconfig-indirect2.json] +{ + "compilerOptions": { + "composite": true, + "outDir": "./target/", + "baseUrl": "./src/" + }, + "files": [ + "./indirect2/main.ts" + ], + "references": [ + { + "path": "./tsconfig-src.json" + } + ] +} + +//// [/user/username/projects/myproject/indirect2/main.ts] +import { foo } from 'main'; +foo; +export function bar() {} + +//// [/user/username/projects/myproject/own/main.ts] +import { bar } from 'main'; +bar; + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 1, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -278,156 +436,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json -Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json -Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json -Before request -//// [/user/username/projects/myproject/tsconfig-src.json] -{ - "compilerOptions": { - "composite": true, - "outDir": "./target/", - "baseUrl": "./src/" - }, - "include": [ - "./src/**/*" - ] -} - -//// [/user/username/projects/myproject/tsconfig.json] -{ - "compilerOptions": { - "outDir": "./target/", - "baseUrl": "./indirect1/" - }, - "references": [ +Info seq [hh:mm:ss:mss] response: { - "path": "./tsconfig-indirect1.json" - }, - { - "path": "./tsconfig-indirect2.json" - } - ], - "files": [ - "./own/main.ts" - ] -} - -//// [/user/username/projects/myproject/src/main.ts] -import { foo } from 'helpers/functions'; -export { foo }; - -//// [/user/username/projects/myproject/src/helpers/functions.ts] -export const foo = 1; - -//// [/a/lib/lib.d.ts] -/// -interface Boolean {} -interface Function {} -interface CallableFunction {} -interface NewableFunction {} -interface IArguments {} -interface Number { toExponential: any; } -interface Object {} -interface RegExp {} -interface String { charAt: any; } -interface Array { length: number; [n: number]: T; } - -//// [/dummy/dummy.ts] -let a = 10; - -//// [/user/username/projects/myproject/target/src/main.d.ts] -import { foo } from 'helpers/functions'; -export { foo }; -//# sourceMappingURL=main.d.ts.map - -//// [/user/username/projects/myproject/target/src/main.d.ts.map] -{ - "version": 3, - "file": "main.d.ts", - "sourceRoot": "", - "sources": [ - "../../src/main.ts" - ], - "names": [], - "mappings": "AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,GAAG,EAAC,CAAC" -} - -//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts] -export declare const foo = 1; -//# sourceMappingURL=functions.d.ts.map - -//// [/user/username/projects/myproject/target/src/helpers/functions.d.ts.map] -{ - "version": 3, - "file": "functions.d.ts", - "sourceRoot": "", - "sources": [ - "../../../src/helpers/functions.ts" - ], - "names": [], - "mappings": "AAAA,eAAO,MAAM,GAAG,IAAI,CAAC" -} - -//// [/user/username/projects/myproject/indirect3/tsconfig.json] -{ - "compilerOptions": { - "baseUrl": "../target/src/" - } -} - -//// [/user/username/projects/myproject/indirect3/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - -//// [/user/username/projects/myproject/tsconfig-indirect1.json] -{ - "compilerOptions": { - "composite": true, - "outDir": "./target/", - "baseUrl": "./src/" - }, - "files": [ - "./indirect1/main.ts" - ], - "references": [ - { - "path": "./tsconfig-src.json" - } - ] -} - -//// [/user/username/projects/myproject/indirect1/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - -//// [/user/username/projects/myproject/tsconfig-indirect2.json] -{ - "compilerOptions": { - "composite": true, - "outDir": "./target/", - "baseUrl": "./src/" - }, - "files": [ - "./indirect2/main.ts" - ], - "references": [ - { - "path": "./tsconfig-src.json" - } - ] -} - -//// [/user/username/projects/myproject/indirect2/main.ts] -import { foo } from 'main'; -foo; -export function bar() {} - -//// [/user/username/projects/myproject/own/main.ts] -import { bar } from 'main'; -bar; - + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/myproject/node_modules/@types: *new* @@ -457,6 +470,10 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: *new* {} +Info seq [hh:mm:ss:mss] getDefaultProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] findDefaultConfiguredProject for /user/username/projects/myproject/src/main.ts: /user/username/projects/myproject/tsconfig-src.json +Before request + Info seq [hh:mm:ss:mss] request: { "command": "geterr", @@ -466,7 +483,7 @@ Info seq [hh:mm:ss:mss] request: "/user/username/projects/myproject/src/main.ts" ] }, - "seq": 1, + "seq": 2, "type": "request" } Info seq [hh:mm:ss:mss] response: @@ -533,11 +550,22 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "requestCompleted", "body": { - "request_seq": 1 + "request_seq": 2 } } After running Immedidate callback:: count: 0 +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 3, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* @@ -571,6 +599,23 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 4, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -587,6 +632,53 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 5, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -601,6 +693,55 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 6, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -671,6 +812,57 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 7, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/src Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/src/main.ts :: Config file name: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json @@ -865,6 +1057,51 @@ Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: *new* + {} +/user/username/projects/myproject/own/main.ts: *new* + {} +/user/username/projects/myproject/src/helpers/functions.ts: *new* + {} +/user/username/projects/myproject/tsconfig-indirect1.json: *new* + {} +/user/username/projects/myproject/tsconfig-indirect2.json: *new* + {} +/user/username/projects/myproject/tsconfig-src.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 8, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -881,6 +1118,53 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 9, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /dummy Info seq [hh:mm:ss:mss] For info: /dummy/dummy.ts :: No config files found. @@ -904,6 +1188,52 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json,/user/username/projects/myproject/tsconfig-src.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatches *deleted*:: +/dummy/dummy.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "reloadProjects", + "seq": 10, + "type": "request" + } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig.json @@ -1155,64 +1485,16 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/src/main.t Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig-src.json,/user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* -Before request - -PolledWatches:: -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} *new* -/user/username/projects/node_modules/@types: - {"pollingInterval":500} *new* - -PolledWatches *deleted*:: -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/node_modules/@types: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/user/username/projects/myproject/indirect1/main.ts: - {} *new* -/user/username/projects/myproject/own/main.ts: - {} *new* -/user/username/projects/myproject/src/helpers/functions.ts: - {} *new* -/user/username/projects/myproject/tsconfig-indirect1.json: - {} *new* -/user/username/projects/myproject/tsconfig-indirect2.json: - {} *new* -/user/username/projects/myproject/tsconfig-src.json: - {} *new* -/user/username/projects/myproject/tsconfig.json: - {} *new* - -FsWatches *deleted*:: -/user/username/projects/myproject/indirect1/main.ts: - {} -/user/username/projects/myproject/own/main.ts: - {} -/user/username/projects/myproject/src/helpers/functions.ts: - {} -/user/username/projects/myproject/tsconfig-indirect1.json: - {} -/user/username/projects/myproject/tsconfig-indirect2.json: - {} -/user/username/projects/myproject/tsconfig-src.json: - {} -/user/username/projects/myproject/tsconfig.json: - {} - -FsWatchesRecursive:: -/user/username/projects/myproject/src: - {} *new* - -FsWatchesRecursive *deleted*:: -/user/username/projects/myproject/src: - {} +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request Timeout callback:: count: 0 +Before request + Info seq [hh:mm:ss:mss] request: { "command": "references", @@ -1221,7 +1503,7 @@ Info seq [hh:mm:ss:mss] request: "line": 2, "offset": 10 }, - "seq": 2, + "seq": 11, "type": "request" } Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/src/main.ts position 50 in project /user/username/projects/myproject/tsconfig-src.json @@ -1630,6 +1912,17 @@ FsWatchesRecursive:: /user/username/projects/myproject/src: {} +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/src/main.ts" + }, + "seq": 12, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/main.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -1654,6 +1947,59 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /dummy/dummy.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/indirect2/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: *new* + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts.map: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/dummy/dummy.ts" + }, + "seq": 13, + "type": "request" + } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dummy/dummy.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -1676,6 +2022,61 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/dummy/dummy.ts: *new* + {} +/user/username/projects/myproject/indirect1/main.ts: + {} +/user/username/projects/myproject/indirect2/main.ts: + {} +/user/username/projects/myproject/own/main.ts: + {} +/user/username/projects/myproject/src/helpers/functions.ts: + {} +/user/username/projects/myproject/src/main.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts: + {} +/user/username/projects/myproject/target/src/helpers/functions.d.ts.map: + {} +/user/username/projects/myproject/tsconfig-indirect1.json: + {} +/user/username/projects/myproject/tsconfig-indirect2.json: + {} +/user/username/projects/myproject/tsconfig-src.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/src: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/indirect3/main.ts" + }, + "seq": 14, + "type": "request" + } Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject/indirect3 Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/indirect3/main.ts :: Config file name: /user/username/projects/myproject/indirect3/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/indirect3/tsconfig.json @@ -1917,7 +2318,11 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/indirect3/main.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/indirect3/tsconfig.json -Before request +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request PolledWatches:: /user/username/projects/myproject/indirect3/node_modules/@types: *new* @@ -1942,12 +2347,16 @@ FsWatches:: {} FsWatches *deleted*:: +/dummy/dummy.ts: + {} /user/username/projects/myproject/indirect1/main.ts: {} /user/username/projects/myproject/indirect2/main.ts: {} /user/username/projects/myproject/own/main.ts: {} +/user/username/projects/myproject/src/main.ts: + {} /user/username/projects/myproject/tsconfig-indirect1.json: {} /user/username/projects/myproject/tsconfig-indirect2.json: @@ -1967,6 +2376,8 @@ FsWatchesRecursive *deleted*:: /user/username/projects/myproject/src: {} +Before request + Info seq [hh:mm:ss:mss] request: { "command": "references", @@ -1975,7 +2386,7 @@ Info seq [hh:mm:ss:mss] request: "line": 1, "offset": 10 }, - "seq": 3, + "seq": 15, "type": "request" } Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/indirect3/main.ts position 9 in project /user/username/projects/myproject/indirect3/tsconfig.json