-
Notifications
You must be signed in to change notification settings - Fork 17.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
x/tools/gopls: file watchers should be reevaluated after load #60340
Labels
gopls/metadata
Issues related to metadata loading in gopls
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Comments
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
May 22, 2023
Change https://go.dev/cl/496879 mentions this issue: |
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
May 22, 2023
We don't actually watch replace targets anymore. The way to specify if a module is being used is by including it in a go.work file. Looking back on the flakiness, I am pretty sure it was due simply to type-checking on slow builders, back when we limited each regtest to 20s. This module imports some standard library packages that used to be slow to type check. I am pretty sure this test would no longer be flaky, if we still supported the functionality. While porting over the assertions from this test to TestUseGoWork, I discovered golang/go#60340, a bug in the order of our file watcher evaluation. Fixes golang/go#50748 Change-Id: I26c10ac659d0f195da18b6181b54d7c373cc984b Reviewed-on: https://go-review.googlesource.com/c/tools/ /496879 Run-TryBot: Robert Findley <[email protected]> Reviewed-by: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
This can wait until gopls/v0.16.0, since we've been living with it for a while. But I do think this is a source of potential inconsistency. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
gopls/metadata
Issues related to metadata loading in gopls
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Normally I would just fix this bug, but given our proximity to the v0.12.0 release I'm filing it for later:
When state changes in gopls, we re-evaluate file watchers. Currently, this is done synchronously to the state change processing, via
Server.didModifyFiles->updateWatchedDirectories
.Problems with this:
awaitLoaded
before re-evaluating file watches, asgo list
might surface new directories to watch after e.g. a go.mod change. We can'tawaitLoaded
during change processing.The text was updated successfully, but these errors were encountered: