- VSCode Version: 1.38.0
- OS Version: 10.14.6
- TypeScript version: tested with both 3.5.2 and 3.6.2
Steps to Reproduce:
./tsconfig.json:
{
"references": [
{ "path": "./src/tsconfig.json" },
{ "path": "./shared/tsconfig.json" }
],
"files": []
}
./shared/tsconfig.json:
{
"compilerOptions": {
"composite": true,
"declarationMap": true,
"outDir": "../target-shared/"
}
}
./shared/main.ts:
./src/tsconfig.json:
{
"compilerOptions": {
"composite": true,
"declarationMap": true,
"outDir": "../target-src/"
},
"references": [
{ "path": "../shared/tsconfig.json" }
]
}
./src/main.ts:
import { foo } from "../shared/main";
foo;
- Run
tsc --build (observe no errors)
- Open VS Code
- Navigate immediately to
./shared/main.ts
- Find references for
foo
Repo including the above test case: https://github.com/OliverJAsh/unsplash-ts-project-references/tree/orthogonal-folders
Expected: reference in ./src/main.ts appears
Actual: reference in ./src/main.ts does not appear
Also, renaming foo in ./shared/main.ts does not propagate the change into ./src/main.ts.
If I'm careful enough to navigate to ./src/main.ts first, and then open ./shared/main.ts afterwards, VS Code is aware that foo is used in both files. However, I don't believe this should be necessary.
When I open ./shared/main.ts, I assume VS Code is stopping at ./shared/tsconfig.json and looking no further. If it looked one level higher, it would find ./tsconfig.json, which references ./src/tsconfig.json, which in turn references ./shared/tsconfig.json.
Does this issue occur when all extensions are disabled?: Yes
Potentially related:
Steps to Reproduce:
./tsconfig.json:{ "references": [ { "path": "./src/tsconfig.json" }, { "path": "./shared/tsconfig.json" } ], "files": [] }./shared/tsconfig.json:{ "compilerOptions": { "composite": true, "declarationMap": true, "outDir": "../target-shared/" } }./shared/main.ts:./src/tsconfig.json:{ "compilerOptions": { "composite": true, "declarationMap": true, "outDir": "../target-src/" }, "references": [ { "path": "../shared/tsconfig.json" } ] }./src/main.ts:tsc --build(observe no errors)./shared/main.tsfooRepo including the above test case: https://github.com/OliverJAsh/unsplash-ts-project-references/tree/orthogonal-folders
Expected: reference in
./src/main.tsappearsActual: reference in
./src/main.tsdoes not appearAlso, renaming
fooin./shared/main.tsdoes not propagate the change into./src/main.ts.If I'm careful enough to navigate to
./src/main.tsfirst, and then open./shared/main.tsafterwards, VS Code is aware thatfoois used in both files. However, I don't believe this should be necessary.When I open
./shared/main.ts, I assume VS Code is stopping at./shared/tsconfig.jsonand looking no further. If it looked one level higher, it would find./tsconfig.json, which references./src/tsconfig.json, which in turn references./shared/tsconfig.json.Does this issue occur when all extensions are disabled?: Yes
Potentially related: