-
Notifications
You must be signed in to change notification settings - Fork 14
Problem markers not updated across multiple tsconfig.json #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks @lorenzodallavecchia let me time to study your testcases and I will you give you feedback. The first thing that I can tell you is that I cannot display this error kind when user is typing. |
@lorenzodallavecchia I cannot find attached ZIP file? |
Woops, sorry. Here it is. |
@lorenzodallavecchia typescript.java cannot multiple Eclipse projects today. I would like to wait for TypeScript work about this multi project with tsserver command like OpenExternalProjects. We must understand how to consume those commands to implement this issue. |
Thanks again Angelo. Actually, I was looking into that problem today and I saw that typescript.java's builder assumes that all input files of a TS project are located in the same folder (or subfolders) relative to the tsconfig.json file. I agree that this is something that TS should support. In the meanwhile I will probably go with implementing an ad-hoc incremental builder that can meet my use case. |
I would like to support "compile on save" with tsserver which will improve a lot performance. But today i'm very busy with tslint integration (with quick fix, etc). |
@lorenzodallavecchia I have tried your project with new compile on save done with tsserver and the good news is that it works, but you must adjust your tsconfig.json with include to help tsserver.
To fix the problem, update your {
"compilerOptions": {
"target": "es5",
"noEmit": false
},
"compileOnSave": true,
"include": ["**/*", "../multi-project-b/src/**/*"]
}
To fix the problem, update your {
"compilerOptions": {
"target": "es5",
"noEmit": false
},
"compileOnSave": true,
"include": ["../**/*"]
} In other words TypeScritpt seems searching referencing ts files from the parent folder where tsconfig.json is hosted. You must to use include to help the search. You can see that by using |
Hi @angelozerr, I have just tested the project with the new builder at it looks very promising indeed. The performance is also noticeably better, even with such a small set of files. Adding Is it possible that this limitation is caused by the way projects are configured on tsserver? Last week I started studying its behavior and saw that it supports "external projects" as well as an "implicit project". I have not looked into your code in typescript.java, so it is well possible that you are already aware of all this! I also experienced another issue that is probably not related to this bug at all. When compiling with |
Yes I have seen that, it's tsserver error. I don't know how we could improve that? If you think we can close this issue, please close it. Thanks! |
I was not closing it because of the A -> B dependency which is still a showstopper for me. Thanks! |
Opened #140 for tracking the cross-project include problem. |
Don't study a lot that, perhaps it is managed with https://github.com/Microsoft/vscode/blob/master/extensions/typescript/src/typescriptServiceClient.ts#L438 (--useSingleInferredProject) ? Any contrubution are welcome! |
I investigated both external projects and inferred projects and now the picture is a lot clearer. |
Uh oh!
There was an error while loading. Please reload this page.
The TypeScript IDE builder seems not capable of reporting problems on files that are part of the source a tsconfig.json project but influenced by the changes in the sources of a different tsconfig.json.
My original scenario is one with multiple Eclipse projects, each containing a tsconfig.json and depending on each other, e.g. because one exposes a method that the other one uses.
Suspecting a problem with building across multiple Eclipse project, I have tested the scenario with multiple tsconfig.json files in the same Eclipse project. The problem remains.
For both scenarios I have enabled both Compile on Save and Build on Save.
Steps to Reproduce
private
modifier to thesum
method. Save.private
modifier to thesum
method. Save.private
modifier to thesum
method. Save.Rationale
When working on large projects with long dependencies, one should be able to rely on the IDE to notify on the cascading effects of any change. Even if the TS build is done again at integration time, that would still mean making a bad commit just because the IDE did not warn about the problems.
Comparison with VSCode
Interestringly, VSCode behave even worse than TypeScript IDE. In fact, all files must be open to have their errors listed in VSCode own Problems view. There is an open issue for that on VSCode: microsoft/vscode#8201.
The text was updated successfully, but these errors were encountered: