1
0
mirror of https://github.com/golang/go synced 2024-10-01 10:28:31 -06:00
go/internal/lsp/cache
Rebecca Stambler 9c79f685b7 internal/lsp: fix view rebuilding when go mod init runs
https://github.com/microsoft/vscode-go/issues/3076#issuecomment-605062933
inspired me to write a regression test for this case. Turns out we
weren't handling it correctly after all...

This change makes sure that we only rebuild the view once a new go.mod
file is saved, not just created. It also preserves the snapshot ID
number when the view is recreated so that diagnostic caching continues
to work as expected.

Change-Id: I63bd559c3bd33b91828171cd7ddb3d099c31cddb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/226017
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-03-30 17:42:33 +00:00
..
analysis.go internal/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +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 support for type error analyzers 2020-03-27 17:27:16 +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/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
external.go internal/lsp: move the telemetry package 2020-03-18 13:22:49 +00:00
load.go internal/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
mod.go internal/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
os_darwin.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
os_windows.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
parse.go internal/lsp/source: remove unused parameters from functions 2020-03-27 18:57:18 +00:00
pkg.go internal/lsp: add support for type error analyzers 2020-03-27 17:27:16 +00:00
session.go internal/lsp: fix view rebuilding when go mod init runs 2020-03-30 17:42:33 +00:00
snapshot.go internal/lsp: remove command-line-arguments as a workspace package 2020-03-25 20:31:30 +00:00
view_test.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
view.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00