1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:38:33 -06:00
go/internal/lsp/cache
Rob Findley bc073721ad internal/lsp/cache: include session IDs in some cache keys
When caching file data specific to a session (anything with a Version or
tied to a view), we now need to be more careful about the existence of
multiple sessions.

This change fixes a few places where we appear to cache session data
without explicitly referring to the session. In principal this could
cause data corruption in multi-session gopls instances, but I have not
been able to force this to occur in either manual or automated testing.

Also fix a data race to the unsaved overlays:
https://storage.googleapis.com/go-build-log/588ee798/linux-amd64-race_d0762522.log

Updates golang/go#34111

Change-Id: I47117da1aba1afc2e211785544ad3f8b3416d15d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/222059
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rohan Challa <rohan@golang.org>
2020-03-05 20:50:14 +00:00
..
analysis.go internal/lsp/cache: hardcode parse modes instead of guessing them 2020-02-07 20:00:15 +00:00
cache.go internal/lsp: move the debug.Instance onto the Context 2020-03-03 22:54:53 +00:00
check.go internal/lsp: add a test for internal imports handling 2020-02-25 18:38:19 +00:00
debug.go internal/lsp/lsprpc: add a handshake between forwarder and remote 2020-02-24 22:51:04 +00:00
error_test.go internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
errors.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
external.go internal/lsp: check that a file handle is unmodified before read 2020-01-23 20:52:07 +00:00
load.go internal/lsp: add module versions from "go list" to pkg.go.dev links 2020-02-19 19:55:21 +00:00
mod.go internal/lsp/cache: include session IDs in some cache keys 2020-03-05 20:50:14 +00:00
parse.go internal/lsp/cache: return concrete types where possible 2020-02-19 18:42:16 +00:00
pkg.go internal/lsp: add module versions from "go list" to pkg.go.dev links 2020-02-19 19:55:21 +00:00
session.go internal/lsp/cache: include session IDs in some cache keys 2020-03-05 20:50:14 +00:00
snapshot.go internal/lsp/cache: fix NPE in fileWasSaved 2020-03-05 18:53:22 +00:00
view.go internal/lsp: move the debug.Instance onto the Context 2020-03-03 22:54:53 +00:00