Skip to content

feat: workspace diagnostics poc #361

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

Conversation

entropitor
Copy link
Contributor

@entropitor entropitor commented Jan 5, 2022

Proof of concept of the workspace diagnostics feature

Proof of concept of #361

@rchl
Copy link
Member

rchl commented Jan 5, 2022

Nice.

Likely this would need to run in a separate tsserver process as we can't allow a complication that could take minutes block all other functionality.

In vscode this feature is controlled through the typescript.tsserver.experimental.enableProjectDiagnostics setting, I believe. Though not sure how they've implemented it exactly. Would have to investigate it when I have some time.

@rchl
Copy link
Member

rchl commented Jan 5, 2022

Quick check of typescript-language-features logs in VSCode shows that on every change it sends diagnostics for all files. Even files within node_modules. A bit inefficient if you ask me but might not be an issue in practice.

Still, it's dubbed as an "experimental" feature there so likely not fully optimized yet.

@entropitor
Copy link
Contributor Author

Yeah, if you have some pointers, I might have some time to implement this as it would benefit me greatly. Not sure how to best go from here 😄 I've already increased the delay to 1000 and then I didn't notice any performance problems myself. But I haven't used it a lot yet, if I clear the build cache, it might become unresponsive in the beginning. Potentially some debouncing (does the delay do this?) + separate process could help

Do you suggest using a seperate tsClient? Because I think it might use some of the configuration, ... so that might not fully work

@rchl
Copy link
Member

rchl commented Jan 6, 2022

Without looking too deep into it, I think it should be implement with an additional tsClient. It would still receive the same initial configuration.

@dimas-cyriaco
Copy link

dimas-cyriaco commented Apr 12, 2022

Any chance this can be merged? This feature would be greatly appreciated.

@rchl
Copy link
Member

rchl commented Sep 11, 2022

#585 will get us a step closer to this feature but there will still be a bunch more code that will have to be ported and adapted from VSCode.

I'll close this PR as it's not the right way to do it.

@weilbith
Copy link

I'll close this PR as it's not the right way to do it.

@rchl as your linked PR has been merged, is there any follow up issue or PR for this I could follow?

@rchl
Copy link
Member

rchl commented Jun 18, 2023

There is a bunch of work to be done to make that work and I can't justify working on that at the moment.

Some in-progress, non-working changes are on the https://github.com/typescript-language-server/typescript-language-server/tree/feat/project-diagnostics branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants