GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — Handle when default project for file is solution with file actually referenced by one of the project references by sheetalkamat · Pull Request #37239 · microsoft/TypeScript Conversation
|
|
A solution project is a composite project with references to other projects, but no files of its own? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Andrew Casey (@amcasey) That appears to be the case, but I would appreciate confirmation as well. Also, how common is that as a pattern? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
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) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note that we already handle solutions for scenarios like our own repo.. Wherein the tsconfig for compiler is in its own folder and named |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
TypeScript Bot (@typescript-bot) pack this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hey Daniel Rosenwasser (@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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
How did you identify the code paths that needed to be updated (i.e. how do you know you didn't miss one)?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Well i looked at all the calls to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
It sounds like anyone who calls |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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" } } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Kristóf Poduszló (@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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Is this patch available in If so, then the use case described in: kulshekhar/ts-jest#1698 isn't resolved by this PR. This is relevant because |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sebastian Nemeth (@martaver) I am not sure what you are asking here. i cloned the repo, checkout branch and opened vscode and that seems to work without reporting errors. The build steps do not use tsc so it would be hard to tell whats going on. you would need to seek help from the package that is building it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi, I want to implement the same behavior programmatically with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
How are "solution projects" useful in that example? Doesn't the language server look for the nearest PS: We would appreciate a response to #33407. I'd prefer to use an { "include": ["src"], "compilerOptions": { // These options are inherited by override globs. "moduleResolution": "node", "strict": true }, "overrides": [ { "include": ["**/__tests__"], "compilerOptions": { "types": ["jest", "node"] } } ] } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've tried this approach without success. See anything wrong in this gist? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Note that without extending the top-level tsconfig.json from tsconfig.base.json, the right compiler options weren't being applied for the tests, even though they are inherited by the individual project tsconfig.jsons (react and esModuleInterop). Extending the top level one from the base solves the issue, but feels wrong... I would've thought that because each project gets the right config, the tests should've worked right. Also building works fine, but it is Jest or ts-jest causing the issue. Pretty sure this is related to - kulshekhar/ts-jest#1648 - microsoft/TypeScript#37239
Note that without extending the top-level tsconfig.json from tsconfig.base.json, the right compiler options weren't being applied for the tests, even though they are inherited by the individual project tsconfig.jsons (react and esModuleInterop). Extending the top level one from the base solves the issue, but feels wrong... I would've thought that because each project gets the right config, the tests should've worked right. Also building works fine, but it is Jest or ts-jest causing the issue. Pretty sure this is related to - kulshekhar/ts-jest#1648 - microsoft/TypeScript#37239
Note that without extending the top-level tsconfig.json from tsconfig.base.json, the right compiler options weren't being applied for the tests, even though they are inherited by the individual project tsconfig.jsons (react and esModuleInterop). Extending the top level one from the base solves the issue, but feels wrong... I would've thought that because each project gets the right config, the tests should've worked right. Also building works fine, but it is Jest or ts-jest causing the issue. Pretty sure this is related to - kulshekhar/ts-jest#1648 - microsoft/TypeScript#37239
|
I also could not get this to work, with roughly this setup: // tsconfig.base.json { "compilerOptions": {"strictNullChecks": true} } // tsconfig.js.json { "extends": "./tsconfig.base.json", "include": ["**/*.jsx?"], "compilerOptions": {"checkJs": true, "allowJs": true, "noImplicitAny": false} } // tsconfig.ts.json { "extends": "./tsconfig.base.json", "include": ["**/*.tsx?"], } // tsconfig.json { "files": [], "references": [ { "path": "./tsconfig.js.json" }, { "path": "./tsconfig.ts.json" } ] } VS Code behaved as if not tsconfig were detected. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
"Cannot find module" when using project references
There was an error while loading. Please reload this page.