1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:34:40 -07:00
go/internal/lsp/cache
Rebecca Stambler 6dcdf1db2c internal/lsp/cache: refactor functions that return PackageHandles
Now that we build PackageHandles in load, we can simplify a lot of our
logic for rebuilding them and reloading metadata.

The only possibly-significant change is the missing imports logic. Now
that we always create package handles in load, we don't have to do the
extra "sameSet" logic. If the package handle hasn't been invalidated
since we last built it, we will keep the benefits of caching it. Otherwise,
it will be rebuilt in load.

Updates golang/go#36918

Change-Id: Ieb45898d248501e3cebdb95c8b518149ba7498e5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/217157
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-02-07 22:39:43 +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/debug: serve cache entry counts 2020-02-03 22:21:18 +00:00
check.go internal/lsp/cache: hardcode parse modes instead of guessing them 2020-02-07 20:00:15 +00:00
debug.go internal/lsp/cache: add Env to debugView 2020-01-31 20:48:24 +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/lsp/source: export FindFileInpackage 2020-02-07 21:55:11 +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/cache: hardcode parse modes instead of guessing them 2020-02-07 20:00:15 +00:00
mod_tidy.go internal/lsp: build overlays through the snapshot 2020-02-07 18:37:49 +00:00
parse.go internal/lsp/source: improve completion after accidental keywords 2020-02-06 05:08:22 +00:00
pkg.go internal/lsp: determine parse mode based on workspace packages 2020-02-04 23:03:16 +00:00
session.go internal/lsp/cache: refactor functions that return PackageHandles 2020-02-07 22:39:43 +00:00
snapshot.go internal/lsp/cache: refactor functions that return PackageHandles 2020-02-07 22:39:43 +00:00
view.go internal/lsp: don't use overlays from the session in the snapshot 2020-02-07 19:21:16 +00:00