Skip to content
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

x/tools/gopls: set experimentalDiagnosticsDelay to 250ms by default #42693

Closed
stamblerre opened this issue Nov 18, 2020 · 5 comments
Closed

x/tools/gopls: set experimentalDiagnosticsDelay to 250ms by default #42693

stamblerre opened this issue Nov 18, 2020 · 5 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Nov 18, 2020

We are still ironing out the details of this setting (https://golang.org/cl/269677 will address some of them), but eventually, it should be enabled by default.

@gopherbot gopherbot added this to the Unreleased milestone Nov 18, 2020
@stamblerre stamblerre added this to Needs Triage in vscode-go: gopls by default via automation Nov 18, 2020
@stamblerre stamblerre moved this from Needs Triage to Critical in vscode-go: gopls by default Nov 18, 2020
@myitcv
Copy link
Member

@myitcv myitcv commented Nov 18, 2020

Can you explain what this setting will actually do, or point me towards a CL/similar?

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Nov 18, 2020

Here are the docs for it: https://github.com/golang/tools/blob/master/gopls/doc/settings.md#experimentaldiagnosticsdelay-timeduration. Basically it's debouncing for the full workspace diagnostics--we compute the diagnostics for the changed files right away, and then wait this duration to compute diagnostics for the full workspace (reverse dependencies).

@myitcv
Copy link
Member

@myitcv myitcv commented Nov 18, 2020

Thank you very much - for some reason I didn't even think to search the option documentation (which in hindsight was silly of me).

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Nov 18, 2020

Historically, we haven't kept the docs very up-to-date, so no worries 😄

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 3, 2020

Change https://golang.org/cl/274445 mentions this issue: internal/lsp/source: default experimentalDiagnosticsDelay to 250ms

vscode-go: gopls by default automation moved this from Critical to Done Dec 4, 2020
marwan-at-work added a commit to marwan-at-work/tools that referenced this issue Dec 23, 2020
We've been aiming to enable diagnostic debouncing by default, and now
that CL 269197 is merged, I think it's time to do that.

I know that the experimental setting had it at 200ms, but the 250ms was
specified in golang/go#42693, so I'm not sure which is preferable.

Also, fix a bug I introduced in CL 269197, which set alwaysAnalyze to
true for diagnoseChangedFiles. This should only be used for testing.

Add a requirement for 1.13 to one test that relies on good overlay
support (loading the file directly produced a different response from
the full workspace load).

Fixes golang/go#42693

Change-Id: I49b764a8d473a66a01ef0f2c6f4cbe2d512fd64e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/274445
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants