-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: save old metadata before invalidating #42266
Labels
FrozenDueToAge
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
Oct 29, 2020
Change https://golang.org/cl/271477 mentions this issue: |
This was referenced Dec 23, 2020
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
May 19, 2021
This CL moves to a model where we don't automatically delete invalidated metadata, but rather preserve it and mark it invalid. This way, we can continue to use invalid metadata for all features even if there is an issue with the user's workspace. To keep track of the metadata's validity, we add an invalid flag to track the status of the metadata. We still reload at the same rate--the next CL changes the way we reload data. We also add a configuration to opt-in (currently, this is off by default). In some cases, like switches between GOPATH and module modes, and when a file is deleted, the metadata *must* be deleted outright. Updates golang/go#42266 Change-Id: Iff5e10b641fdb4be270af0cd887a10ee97ac1a19 Reviewed-on: https://go-review.googlesource.com/c/tools/+/271477 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: Heschi Kreinick <heschi@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Change https://golang.org/cl/322972 mentions this issue: |
Change https://golang.org/cl/324394 mentions this issue: |
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
Jun 16, 2021
Retrying CL 271477, this time with parts of CL 322650 incorporated. This CL moves to a model where we don't automatically delete invalidated metadata, but rather preserve it and mark it invalid. This way, we can continue to use invalid metadata for all features even if there is an issue with the user's workspace. To keep track of the metadata's validity, we add an invalid flag to track the status of the metadata. We still reload at the same rate--the next CL changes the way we reload data. We also add a configuration to opt-in (currently, this is off by default). In some cases, like switches between GOPATH and module modes, and when a file is deleted, the metadata *must* be deleted outright. Also, handle an empty GOMODCACHE in the directory filters (from a previous CL). Updates golang/go#42266 Change-Id: Idc778dc92cfcf1e4d14116c79754bcca0229e63d Reviewed-on: https://go-review.googlesource.com/c/tools/+/324394 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
We currently invalidate metadata before reloading, so we may lose metadata if something has changed an a given package is now unloadable. We should instead follow the approach taken in https://golang.org/cl/261237, and invalidate metadata only after we've successfully reloaded it.
The text was updated successfully, but these errors were encountered: