-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Support closed-file diagnostics in VS Code #36664
Comments
Related question: before calling |
@sheetalkamat thoughts? |
FWIW - @mjbvz and I met about this and I"m working on prototyping project-wide diagnostics more broadly than this particular ask |
#15168 might be a relevant discussion point for this issue too. |
Yes, the first thing you want to see is errors from the current file ("what"s affected in this file?") and then that file"s dependents ("what did this file affect?"); however, when would you query for errors for the dependencies of the open files? (i.e. "what"s wrong with whatever this file depends on?") |
I just turned on But it does seem slow, and in general the error checking is just a bit sluggish. I might fix a syntax error but have to wait a second or two before it registers. It does show the Seems like this issue has been open for a while, and it also seems like it would be fairly trivial to fix. So...can we get a fix for this? |
Small fix, the right string on the settings.json is |
Is there an expected time to completion on this issue? It would be nice to see what breaks in my codebase when changing lint rules, or just refactoring types... |
For microsoft/vscode#13953
Background
Project wide diagnostics are the most requested VS Code JS/TS feature. However, we"ve been blocked on implementing them by the fact that TS server is single threaded. This means that computing these diagnostics could interrupt normal user operations like completions.
We currently recommend that people use tasks to get around this limitation (since tasks always run as separate process) however few people actually use tasks.
With microsoft/vscode@f094278, I"ve added a new setting that spins up a new TS Server just for diagnostics. This accomplishes much the same thing as using a task.
Problem
In the prototype, I"m using the
geterrForProject
command. This works ok for smaller projects but triggers a huge number of events for larger projects like the VS Code source. Instead, we need an API that: given a file, returns a list of inverse dependencies (i.e. the files that need to be rechecked after the file changes)I believe that this API more or less already exists with
compileOnSaveAffectedFileList
? But that command only works ifcompileOnSave
is enabled. We"d like to enable project wide error reporting even when users have not enabled compileOnSave./cc @sheetalkamat For background on
compileOnSaveAffectedFileList
/cc @amcasey As you suggested using a separate diagnostics only server
The text was updated successfully, but these errors were encountered: