Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHandle when default project for file is solution with file actually referenced by one of the project references #37239
Conversation
|
A solution project is a composite project with references to other projects, but no files of its own? |
|
@amcasey That appears to be the case, but I would appreciate confirmation as well. Also, how common is that as a pattern? |
|
A solution project is project with project referenes but no files on its own.. (Eg https://github.com/microsoft/TypeScript/blob/master/src/tsconfig.json) |
|
Note that we already handle solutions for scenarios like our own repo.. Wherein the tsconfig for compiler is in its own folder and named |
|
@typescript-bot pack this |
|
Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 914f358. You can monitor the build here. |
|
Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build. |
|
How did you identify the code paths that needed to be updated (i.e. how do you know you didn't miss one)? |
Well i looked at all the calls to |
It sounds like anyone who calls |
|
I'm mildly concerned about missing a case now or in the future, but this looks correct to the extent of my ability to verify it. |
kripod
commented
Apr 5, 2020
|
Can a solution // tsconfig.json
{
"files": [],
"references": [
{ "path": "./packages/client/tsconfig.json" },
{ "path": "./packages/server/tsconfig.json" },
],
"compilerOptions": {
"noEmit": true,
"allowJs": true,
"checkJs": true,
"strict": true,
"target": "ES2019",
"module": "ESNext",
"moduleResolution": "Node",
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react"
}
} |
|
@kripod I think you're asking whether your client and server projects will automatically pick up those compiler options - no, they won't. If you want to inherit the configuration, you need to use |
sheetalkamat commentedMar 6, 2020
•
edited
Fixes #36708, #27372
Now when we find that the project is a solution project, we try to open referenced projects to see if we can find project that contains the opened file.