1
0
mirror of https://github.com/golang/go synced 2024-11-19 01:14:39 -07:00
go/internal/lsp/fake
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
..
client.go x/tools/gopls: add support for $/progress functionality 2020-03-16 21:25:24 +00:00
doc.go internal/lsp/fake: add fakes for testing editor interaction 2020-02-10 17:44:19 +00:00
edit_test.go internal/lsp/regtest: implement formatting and organizeImports 2020-03-02 19:16:53 +00:00
edit.go internal/lsp/fake: add regexp search and replace 2020-03-24 20:17:55 +00:00
editor_test.go internal/lsp/fake: add regexp search and replace 2020-03-24 20:17:55 +00:00
editor.go internal/lsp: fix view rebuilding when go mod init runs 2020-03-30 17:42:33 +00:00
workspace_test.go internal/lsp/fake: add fakes for testing editor interaction 2020-02-10 17:44:19 +00:00
workspace.go internal/lsp/fake: add regexp search and replace 2020-03-24 20:17:55 +00:00