From a068d1d19f615699dc2bc0944028251c5d96fb39 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Wed, 30 Jun 2021 14:36:35 -0700 Subject: [PATCH 1/4] Apply disableReferencedProjectLoad to getOriginalLocationEnsuringConfiguredProject --- src/server/editorServices.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index c4d5619a526cc..3781b6bd3e29f 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -3236,8 +3236,20 @@ namespace ts.server { const configFileName = this.getConfigFileNameForFile(originalFileInfo); if (!configFileName) return undefined; - let configuredProject: ConfiguredProject | undefined = this.findConfiguredProjectByProjectName(configFileName) || - this.createAndLoadConfiguredProject(configFileName, `Creating project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}`); + let configuredProject: ConfiguredProject | undefined = this.findConfiguredProjectByProjectName(configFileName); + if (!configuredProject) { + if (project.getCompilerOptions().disableReferencedProjectLoad) { + // If location was a project reference redirect, then location and originalLocation are the same. + // Otherwise, if we found originalLocation via a source map instead, then it might be from a project + // that isn't open. Since the user has specified that they don't want to load projects, fall back to + // the original location (i.e. the .d.ts file). + return this.getScriptInfo(originalLocation.fileName)?.containingProjects.length + ? originalLocation + : location; + } + + configuredProject = this.createAndLoadConfiguredProject(configFileName, `Creating project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}`); + } updateProjectIfDirty(configuredProject); const projectContainsOriginalInfo = (project: ConfiguredProject) => { From d00003e34f064e3f96523d3af6660193d9c7526a Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Wed, 30 Jun 2021 14:45:19 -0700 Subject: [PATCH 2/4] Reuse previously computed values and refine comments --- src/server/editorServices.ts | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 3781b6bd3e29f..de3ae566a6727 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -3224,13 +3224,15 @@ namespace ts.server { /*@internal*/ getOriginalLocationEnsuringConfiguredProject(project: Project, location: DocumentPosition): DocumentPosition | undefined { - const originalLocation = project.isSourceOfProjectReferenceRedirect(location.fileName) ? + const isSourceOfProjectReferenceRedirect = project.isSourceOfProjectReferenceRedirect(location.fileName); + const originalLocation = isSourceOfProjectReferenceRedirect ? location : project.getSourceMapper().tryGetSourcePosition(location); if (!originalLocation) return undefined; const { fileName } = originalLocation; - if (!this.getScriptInfo(fileName) && !this.host.fileExists(fileName)) return undefined; + const scriptInfo = this.getScriptInfo(fileName); + if (!scriptInfo && !this.host.fileExists(fileName)) return undefined; const originalFileInfo: OriginalFileInfo = { fileName: toNormalizedPath(fileName), path: this.toPath(fileName) }; const configFileName = this.getConfigFileNameForFile(originalFileInfo); @@ -3239,11 +3241,16 @@ namespace ts.server { let configuredProject: ConfiguredProject | undefined = this.findConfiguredProjectByProjectName(configFileName); if (!configuredProject) { if (project.getCompilerOptions().disableReferencedProjectLoad) { - // If location was a project reference redirect, then location and originalLocation are the same. - // Otherwise, if we found originalLocation via a source map instead, then it might be from a project - // that isn't open. Since the user has specified that they don't want to load projects, fall back to - // the original location (i.e. the .d.ts file). - return this.getScriptInfo(originalLocation.fileName)?.containingProjects.length + // If location was a project reference redirect, then `location` and `originalLocation` are the same. + if (isSourceOfProjectReferenceRedirect) { + return location; + } + + // Otherwise, if we found `originalLocation` via a source map instead, then we check whether it's in + // an open project. If it is, we should search the containing project(s), even though the "default" + // configured project isn't open. However, if it's not in an open project, we need to stick with + // `location` (i.e. the .d.ts file) because otherwise we'll miss the references in that file. + return scriptInfo?.containingProjects.length ? originalLocation : location; } From df989d441be0e51dbedd4ece59d1489cefeee8bb Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Wed, 30 Jun 2021 16:18:34 -0700 Subject: [PATCH 3/4] Add baselines for test matrix --- .../unittests/tsserver/projectReferences.ts | 115 ++++++++++++++++ ...-are-disabled-and-a-decl-map-is-missing.js | 122 +++++++++++++++++ ...-are-disabled-and-a-decl-map-is-present.js | 126 ++++++++++++++++++ ...s-are-enabled-and-a-decl-map-is-missing.js | 124 +++++++++++++++++ ...s-are-enabled-and-a-decl-map-is-present.js | 124 +++++++++++++++++ ...-are-disabled-and-a-decl-map-is-missing.js | 122 +++++++++++++++++ ...-are-disabled-and-a-decl-map-is-present.js | 126 ++++++++++++++++++ ...s-are-enabled-and-a-decl-map-is-missing.js | 124 +++++++++++++++++ ...s-are-enabled-and-a-decl-map-is-present.js | 124 +++++++++++++++++ ...-are-disabled-and-a-decl-map-is-missing.js | 76 +++++++++++ ...-are-disabled-and-a-decl-map-is-present.js | 81 +++++++++++ ...s-are-enabled-and-a-decl-map-is-missing.js | 79 +++++++++++ ...s-are-enabled-and-a-decl-map-is-present.js | 79 +++++++++++ ...-are-disabled-and-a-decl-map-is-missing.js | 76 +++++++++++ ...-are-disabled-and-a-decl-map-is-present.js | 108 +++++++++++++++ ...s-are-enabled-and-a-decl-map-is-missing.js | 106 +++++++++++++++ ...s-are-enabled-and-a-decl-map-is-present.js | 106 +++++++++++++++ 17 files changed, 1818 insertions(+) create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js create mode 100644 tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index fccad6ac94939..841b85f08b1f7 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -1353,5 +1353,120 @@ bar;` }); baselineTsserverLogs("projectReferences", `when files from two projects are open and one project references`, session); }); + + describe("find refs to symbol from other project", () => { + const indexA: File = { + path: `${tscWatch.projectRoot}/a/index.ts`, + content: `import { B } from "../b/lib"; + +const b: B = new B();` + }; + + const configB: File = { + path: `${tscWatch.projectRoot}/b/tsconfig.json`, + content: `{ +"compilerOptions": { + "declarationMap": true, + "outDir": "lib", + "composite": true +} +}` + }; + + const indexB: File = { + path: `${tscWatch.projectRoot}/b/index.ts`, + content: `export class B { + M() {} +}` + }; + + const helperB: File = { + path: `${tscWatch.projectRoot}/b/helper.ts`, + content: `import { B } from "."; + +const b: B = new B();` + }; + + const dtsB: File = { + path: `${tscWatch.projectRoot}/b/lib/index.d.ts`, + content: `export declare class B { + M(): void; +} +//# sourceMappingURL=index.d.ts.map` + }; + + const dtsMapB: File = { + path: `${tscWatch.projectRoot}/b/lib/index.d.ts.map`, + content: `{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IACV,CAAC;CACJ"}` + }; + + function baselineDisableReferencedProjectLoad( + projectAlreadyLoaded: boolean, + disableReferencedProjectLoad: boolean, + disableSourceOfProjectReferenceRedirect: boolean, + dtsMapPresent: boolean) { + + // Mangled to stay under windows path length limit + const subScenario = + `when proj ${projectAlreadyLoaded ? "is" : "is not"} loaded ` + + ` and refd proj loading is ${disableReferencedProjectLoad ? "disabled" : "enabled"}` + + ` and proj ref redirects are ${disableSourceOfProjectReferenceRedirect ? "disabled" : "enabled"}` + + ` and a decl map is ${dtsMapPresent ? "present" : "missing"}`; + const compilerOptions: CompilerOptions = { + disableReferencedProjectLoad, + disableSourceOfProjectReferenceRedirect, + composite: true + }; + + it(subScenario, () => { + const configA: File = { + path: `${tscWatch.projectRoot}/a/tsconfig.json`, + content: `{ + "compilerOptions": ${JSON.stringify(compilerOptions)}, + "references": [{ "path": "../b" }] + }` + }; + + const host = createServerHost([configA, indexA, configB, indexB, helperB, dtsB, ...(dtsMapPresent ? [dtsMapB] : [])]); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs() }); + openFilesForSession([indexA, ...(projectAlreadyLoaded ? [helperB] : [])], session); + + session.executeCommandSeq({ + command: protocol.CommandTypes.References, + arguments: protocolFileLocationFromSubstring(indexA, `B`, { index: 1 }) + }); + baselineTsserverLogs("projectReferences", `find all references to a symbol declared in another project ${subScenario}`, session); + }); + } + + /* eslint-disable boolean-trivia */ + + // Pre-loaded = A file from project B is already open when FAR is invoked + // dRPL = Project A has disableReferencedProjectLoad + // dSOPRR = Project A has disableSourceOfProjectReferenceRedirect + // Map = The declaration map file b/lib/index.d.ts.map exists + // B refs = files under directory b in which references are found (all scenarios find all references in a/index.ts) + + // Pre-loaded | dRPL | dSOPRR | Map | B state | Notes | B refs | Notes + // -----------+--------+--------+----------+------------+--------------+---------------------+--------------------------------------------------- + baselineDisableReferencedProjectLoad(true, true, true, true); // Pre-loaded | | index.ts, helper.ts | Via map and pre-loaded project + baselineDisableReferencedProjectLoad(true, true, true, false); // Pre-loaded | | lib/index.d.ts | Even though project is loaded + baselineDisableReferencedProjectLoad(true, true, false, true); // Pre-loaded | | index.ts, helper.ts | + baselineDisableReferencedProjectLoad(true, true, false, false); // Pre-loaded | | index.ts, helper.ts | + baselineDisableReferencedProjectLoad(true, false, true, true); // Pre-loaded | | index.ts, helper.ts | Via map and pre-loaded project + baselineDisableReferencedProjectLoad(true, false, true, false); // Pre-loaded | | lib/index.d.ts | Even though project is loaded + baselineDisableReferencedProjectLoad(true, false, false, true); // Pre-loaded | | index.ts, helper.ts | + baselineDisableReferencedProjectLoad(true, false, false, false); // Pre-loaded | | index.ts, helper.ts | + baselineDisableReferencedProjectLoad(false, true, true, true); // Not loaded | | lib/index.d.ts | Even though map is present -- used to load and find all + baselineDisableReferencedProjectLoad(false, true, true, false); // Not loaded | | lib/index.d.ts | + baselineDisableReferencedProjectLoad(false, true, false, true); // Not loaded | | index.ts | But not helper.ts, which is not referenced from a -- used to load and find all + baselineDisableReferencedProjectLoad(false, true, false, false); // Not loaded | | index.ts | But not helper.ts, which is not referenced from a -- used to load and find all + baselineDisableReferencedProjectLoad(false, false, true, true); // Loaded | Via map | index.ts, helper.ts | Via map and newly loaded project + baselineDisableReferencedProjectLoad(false, false, true, false); // Not loaded | | lib/index.d.ts | + baselineDisableReferencedProjectLoad(false, false, false, true); // Loaded | Via redirect | index.ts, helper.ts | + baselineDisableReferencedProjectLoad(false, false, false, false); // Loaded | Via redirect | index.ts, helper.ts | + + /* eslint-enable boolean-trivia */ + }); }); } diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js new file mode 100644 index 0000000000000..5901780c9dffa --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js @@ -0,0 +1,122 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": true, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/lib/index.d.ts + /user/username/projects/myproject/a/index.ts + + + ../b/lib/index.d.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/b/helper.ts"}} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json + FileName: /user/username/projects/myproject/b/helper.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/b/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 2000 undefined WatchType: Missing source map file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js new file mode 100644 index 0000000000000..258b6b79e8859 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js @@ -0,0 +1,126 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": true, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/lib/index.d.ts + /user/username/projects/myproject/a/index.ts + + + ../b/lib/index.d.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/b/helper.ts"}} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json + FileName: /user/username/projects/myproject/b/helper.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/b/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 500 undefined WatchType: Closed Script info +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js new file mode 100644 index 0000000000000..a6859ae240db6 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js @@ -0,0 +1,124 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": false, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/a/index.ts + + + ../b/index.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/b/helper.ts"}} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json + FileName: /user/username/projects/myproject/b/helper.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/b/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js new file mode 100644 index 0000000000000..a6859ae240db6 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js @@ -0,0 +1,124 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": false, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/a/index.ts + + + ../b/index.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/b/helper.ts"}} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json + FileName: /user/username/projects/myproject/b/helper.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/b/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js new file mode 100644 index 0000000000000..37cc377662500 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js @@ -0,0 +1,122 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": false, + "disableSourceOfProjectReferenceRedirect": true, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/lib/index.d.ts + /user/username/projects/myproject/a/index.ts + + + ../b/lib/index.d.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/b/helper.ts"}} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json + FileName: /user/username/projects/myproject/b/helper.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/b/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 2000 undefined WatchType: Missing source map file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js new file mode 100644 index 0000000000000..4d90499268b05 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js @@ -0,0 +1,126 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": false, + "disableSourceOfProjectReferenceRedirect": true, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/lib/index.d.ts + /user/username/projects/myproject/a/index.ts + + + ../b/lib/index.d.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/b/helper.ts"}} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json + FileName: /user/username/projects/myproject/b/helper.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/b/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 500 undefined WatchType: Closed Script info +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js new file mode 100644 index 0000000000000..3ed70fa177f0a --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js @@ -0,0 +1,124 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": false, + "disableSourceOfProjectReferenceRedirect": false, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/a/index.ts + + + ../b/index.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/b/helper.ts"}} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json + FileName: /user/username/projects/myproject/b/helper.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/b/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js new file mode 100644 index 0000000000000..3ed70fa177f0a --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js @@ -0,0 +1,124 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": false, + "disableSourceOfProjectReferenceRedirect": false, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/a/index.ts + + + ../b/index.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/b/helper.ts"}} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json + FileName: /user/username/projects/myproject/b/helper.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/b/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js new file mode 100644 index 0000000000000..370807fd8fa88 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js @@ -0,0 +1,76 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": true, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/lib/index.d.ts + /user/username/projects/myproject/a/index.ts + + + ../b/lib/index.d.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 2000 undefined WatchType: Missing source map file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js new file mode 100644 index 0000000000000..1aa92560056ef --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js @@ -0,0 +1,81 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": true, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/lib/index.d.ts + /user/username/projects/myproject/a/index.ts + + + ../b/lib/index.d.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js new file mode 100644 index 0000000000000..12f42d1d33f8d --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js @@ -0,0 +1,79 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": false, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/a/index.ts + + + ../b/index.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js new file mode 100644 index 0000000000000..12f42d1d33f8d --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-disabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js @@ -0,0 +1,79 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": true, + "disableSourceOfProjectReferenceRedirect": false, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/a/index.ts + + + ../b/index.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js new file mode 100644 index 0000000000000..288f1a102d7d8 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-missing.js @@ -0,0 +1,76 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": false, + "disableSourceOfProjectReferenceRedirect": true, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/lib/index.d.ts + /user/username/projects/myproject/a/index.ts + + + ../b/lib/index.d.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 2000 undefined WatchType: Missing source map file +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/lib/index.d.ts","start":{"line":1,"offset":22},"end":{"line":1,"offset":23},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export declare class B {","isWriteAccess":true,"isDefinition":true}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js new file mode 100644 index 0000000000000..408f8b2a90783 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-disabled-and-a-decl-map-is-present.js @@ -0,0 +1,108 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": false, + "disableSourceOfProjectReferenceRedirect": true, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/lib/index.d.ts + /user/username/projects/myproject/a/index.ts + + + ../b/lib/index.d.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/lib/index.d.ts.map 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/helper.ts 500 undefined WatchType: Closed Script info +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js new file mode 100644 index 0000000000000..c35c1351dd813 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-missing.js @@ -0,0 +1,106 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": false, + "disableSourceOfProjectReferenceRedirect": false, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/a/index.ts + + + ../b/index.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/helper.ts 500 undefined WatchType: Closed Script info +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js new file mode 100644 index 0000000000000..c35c1351dd813 --- /dev/null +++ b/tests/baselines/reference/tsserver/projectReferences/find-all-references-to-a-symbol-declared-in-another-project-when-proj-is-not-loaded--and-refd-proj-loading-is-enabled-and-proj-ref-redirects-are-enabled-and-a-decl-map-is-present.js @@ -0,0 +1,106 @@ +Provided types map file "/a/lib/typesMap.json" doesn't exist +request:{"seq":0,"type":"request","command":"open","arguments":{"file":"/user/username/projects/myproject/a/index.ts"}} +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/index.ts :: Config file name: /user/username/projects/myproject/a/tsconfig.json +Creating configuration project /user/username/projects/myproject/a/tsconfig.json +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +Config: /user/username/projects/myproject/a/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/a/index.ts" + ], + "options": { + "disableReferencedProjectLoad": false, + "disableSourceOfProjectReferenceRedirect": false, + "composite": true, + "configFilePath": "/user/username/projects/myproject/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/user/username/projects/myproject/b", + "originalPath": "../b" + } + ] +} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a 1 undefined Config: /user/username/projects/myproject/a/tsconfig.json WatchType: Wild card directory +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +Starting updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json +Config: /user/username/projects/myproject/b/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/b/helper.ts", + "/user/username/projects/myproject/b/index.ts" + ], + "options": { + "declarationMap": true, + "outDir": "/user/username/projects/myproject/b/lib", + "composite": true, + "configFilePath": "/user/username/projects/myproject/b/tsconfig.json" + } +} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Config file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Config: /user/username/projects/myproject/b/tsconfig.json WatchType: Wild card directory +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/a/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/a/index.ts + + + ../b/index.ts + Imported via "../b/lib" from file 'index.ts' + index.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/a +For info: /user/username/projects/myproject/a/tsconfig.json :: No config files found. +Project '/user/username/projects/myproject/a/tsconfig.json' (Configured) + Files (2) + +----------------------------------------------- +Open files: + FileName: /user/username/projects/myproject/a/index.ts ProjectRootPath: undefined + Projects: /user/username/projects/myproject/a/tsconfig.json +response:{"responseRequired":false} +request:{"command":"references","arguments":{"file":"/user/username/projects/myproject/a/index.ts","line":3,"offset":10},"seq":1,"type":"request"} +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +Creating configuration project /user/username/projects/myproject/b/tsconfig.json +Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/helper.ts 500 undefined WatchType: Closed Script info +Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Type roots +Finishing updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Project '/user/username/projects/myproject/b/tsconfig.json' (Configured) + Files (2) + /user/username/projects/myproject/b/index.ts + /user/username/projects/myproject/b/helper.ts + + + index.ts + Imported via "." from file 'helper.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + helper.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +----------------------------------------------- +Search path: /user/username/projects/myproject/b +For info: /user/username/projects/myproject/b/index.ts :: Config file name: /user/username/projects/myproject/b/tsconfig.json +response:{"response":{"refs":[{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":30},"lineText":"import { B } from \"../b/lib\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/a/index.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/index.ts","start":{"line":1,"offset":14},"end":{"line":1,"offset":15},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":3,"offset":2},"lineText":"export class B {","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":1,"offset":10},"end":{"line":1,"offset":11},"contextStart":{"line":1,"offset":1},"contextEnd":{"line":1,"offset":23},"lineText":"import { B } from \".\";","isWriteAccess":true,"isDefinition":true},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":10},"end":{"line":3,"offset":11},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false},{"file":"/user/username/projects/myproject/b/helper.ts","start":{"line":3,"offset":18},"end":{"line":3,"offset":19},"lineText":"const b: B = new B();","isWriteAccess":false,"isDefinition":false}],"symbolName":"B","symbolStartOffset":10,"symbolDisplayString":"(alias) class B\nimport B"},"responseRequired":true} \ No newline at end of file From 6b06a4a9d386f9cab1fdb66f2434a7445e15c40f Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Thu, 1 Jul 2021 11:39:25 -0700 Subject: [PATCH 4/4] Delete point-in-time comments --- src/testRunner/unittests/tsserver/projectReferences.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index 841b85f08b1f7..e56e0f85eced3 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -1457,10 +1457,10 @@ const b: B = new B();` baselineDisableReferencedProjectLoad(true, false, true, false); // Pre-loaded | | lib/index.d.ts | Even though project is loaded baselineDisableReferencedProjectLoad(true, false, false, true); // Pre-loaded | | index.ts, helper.ts | baselineDisableReferencedProjectLoad(true, false, false, false); // Pre-loaded | | index.ts, helper.ts | - baselineDisableReferencedProjectLoad(false, true, true, true); // Not loaded | | lib/index.d.ts | Even though map is present -- used to load and find all + baselineDisableReferencedProjectLoad(false, true, true, true); // Not loaded | | lib/index.d.ts | Even though map is present baselineDisableReferencedProjectLoad(false, true, true, false); // Not loaded | | lib/index.d.ts | - baselineDisableReferencedProjectLoad(false, true, false, true); // Not loaded | | index.ts | But not helper.ts, which is not referenced from a -- used to load and find all - baselineDisableReferencedProjectLoad(false, true, false, false); // Not loaded | | index.ts | But not helper.ts, which is not referenced from a -- used to load and find all + baselineDisableReferencedProjectLoad(false, true, false, true); // Not loaded | | index.ts | But not helper.ts, which is not referenced from a + baselineDisableReferencedProjectLoad(false, true, false, false); // Not loaded | | index.ts | But not helper.ts, which is not referenced from a baselineDisableReferencedProjectLoad(false, false, true, true); // Loaded | Via map | index.ts, helper.ts | Via map and newly loaded project baselineDisableReferencedProjectLoad(false, false, true, false); // Not loaded | | lib/index.d.ts | baselineDisableReferencedProjectLoad(false, false, false, true); // Loaded | Via redirect | index.ts, helper.ts |