go/gopls/internal/lsp/cache
Robert Findley 0c71b564b9 gopls/internal/lsp: fix diagnostic suppression when folders change
Diagnostic suppression used the view-relative snapshot ID to avoid
publishing stale diagnostics. When the layout of views changes due to a
didChangeWorkspaceFolders notification, this suppression is broken as
snapshot IDs reset to 0. Fix this (hopefully temporarily) by introducing
a globally monotonic snapshot ID.

Fixes golang/go#56731

Change-Id: Ib108b1436e800cf5a45fbba298c9975a2cf1d735
Reviewed-on: https://go-review.googlesource.com/c/tools/+/450275
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
2022-11-15 00:02:48 +00:00
..
analysis.go gopls/internal/lsp/cache: use Package.FileSet where possible 2022-11-11 15:24:32 +00:00
cache.go gopls/internal/span: move internal/span into gopls 2022-10-07 14:50:44 +00:00
check.go gopls/internal/lsp: fix diagnostic suppression when folders change 2022-11-15 00:02:48 +00:00
debug.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
error_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
errors.go gopls/internal/lsp/cache: use Package.FileSet where possible 2022-11-11 15:24:32 +00:00
graph.go gopls/internal/lsp/cache: use typed strings (PackagePath et al) throughout 2022-11-11 03:59:42 +00:00
imports.go internal/lsp/cache: simplify importsState modfile hashing logic 2022-11-04 18:06:00 +00:00
keys.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
load.go gopls/internal/lsp: fix diagnostic suppression when folders change 2022-11-15 00:02:48 +00:00
maps.go gopls/internal/span: move internal/span into gopls 2022-10-07 14:50:44 +00:00
metadata.go gopls/internal/lsp/cache: use typed strings (PackagePath et al) throughout 2022-11-11 03:59:42 +00:00
mod.go gopls/internal/span: some cleanups 2022-10-13 13:15:27 +00:00
mod_tidy.go gopls/internal/lsp/cache: better import path hygiene 2022-10-19 21:54:36 +00:00
os_darwin.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
os_windows.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
parse.go gopls/internal/lsp/cache: use Package.FileSet where possible 2022-11-11 15:24:32 +00:00
parse_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
parsemode_go116.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
parsemode_go117.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
pkg.go gopls/internal/lsp/cache: use Package.FileSet where possible 2022-11-11 15:24:32 +00:00
session.go gopls/internal/lsp: fix diagnostic suppression when folders change 2022-11-15 00:02:48 +00:00
snapshot.go gopls/internal/lsp: fix diagnostic suppression when folders change 2022-11-15 00:02:48 +00:00
standalone_go115.go gopls/internal/lsp/cache: add support for loading standalone main files 2022-10-13 15:07:40 +00:00
standalone_go116.go gopls/internal/lsp/cache: remove stray print statement 2022-10-13 17:41:26 +00:00
standalone_go116_test.go gopls: minor cleanup of standalone package support 2022-10-19 19:08:58 +00:00
symbols.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
view.go gopls: sync golang.org/x/vuln@3af8368ee4fe 2022-11-10 23:14:17 +00:00
view_test.go gopls/internal/span: move internal/span into gopls 2022-10-07 14:50:44 +00:00
workspace.go internal/lsp/cache: simplify importsState modfile hashing logic 2022-11-04 18:06:00 +00:00
workspace_test.go internal/lsp/cache: simplify importsState modfile hashing logic 2022-11-04 18:06:00 +00:00