-
Notifications
You must be signed in to change notification settings - Fork 37
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
lsp: Update LSP linting to run incrementally after file change #1146
Conversation
3ac2d56
to
16ec12c
Compare
01c6d60
to
4f74263
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me! Only complaint would be all the changes not directly related to solving the issue, but they are also good changes, so why not! Might have been better off in separate PRs though :)
I'm excited to try this out!
Reason string | ||
// OverwriteAggregates for a workspace is only run once at start up. All | ||
// later updates to aggregate state is made as files are changed. | ||
OverwriteAggregates bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
d965c5e
to
dfd0b39
Compare
I've tried this now and it's a huge improvement 👏 No more lag or even freezes, but most things just show up right away, and the aggregate violations a little later. This is great! |
Yeah, I actually think that we are in a position to correct that, but I'd need to do some more testing. This is because for a per-file run, only the non agg rules are run to improve performance. Since we know that a full workspace agg rule run will take place immediately after with the updated aggregate state. I think the solution is to provide all aggregate data but for the current file, and then run all rules in the per file lint run. It should be simple enough, but something I think might approached in another PR.... |
b4574ea
to
bffba1f
Compare
55e8244
to
25311d7
Compare
25311d7
to
3335043
Compare
This makes a change to how workspace lint runs are run. Now, when a file with aggregate violations is changed, a full workspace lint will still run but only for the aggregate rules the file has. This will also be done using cached intermediate aggregate data.
ee60cf2
to
fb35e45
Compare
Fixes to #1133
This PR is a large refactoring of the language server diagnostics loops. Changes: