go/gopls/internal/regtest
Robert Findley 0d04f65da9 internal/lsp: re-send diagnostics on file events
Fix golang/go#50267 by ensuring that diagnostics are re-sent following
didOpen or didClose events. Additionally, introduce a new hidden
'chattyDiagnostics' option that causes diagnostics to be resent on
*every* file change event. This latter option is for LSP clients that
get confused when diagnostics are not re-sent for later file versions.
For now, be conservative and only force diagnostic publication on
didOpen and didClose.

Update tests whose 'NoDiagnostics' assertions were broken by the new
behavior.

Fixes golang/go#50267

Change-Id: I6332d66a1851e0d8261599d37020a03b4c598f7d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/420539
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-08-02 18:52:36 +00:00
..
bench gopls/internal/regtest/bench: put feature benchmarks in their own file 2022-08-01 21:40:07 +00:00
codelens internal/lsp/source: don't crash requesting gc_details for an empty file 2022-08-02 18:19:01 +00:00
completion internal/lsp/regtest: only run /default tests with -short 2022-07-26 21:20:53 +00:00
debug internal/lsp/regtest: allow sharing memoized results across regtests 2022-07-26 21:20:42 +00:00
diagnostics internal/lsp: re-send diagnostics on file events 2022-08-02 18:52:36 +00:00
inlayhints internal/lsp/regtest: simplify, consolidate, and document settings 2022-07-12 16:56:46 +00:00
misc internal/lsp: re-send diagnostics on file events 2022-08-02 18:52:36 +00:00
modfile internal/lsp/cache: allow network whenever reloading the workspace 2022-07-27 19:28:51 +00:00
template internal/lsp: re-send diagnostics on file events 2022-08-02 18:52:36 +00:00
watch internal/lsp: re-send diagnostics on file events 2022-08-02 18:52:36 +00:00
workspace gopls/internal/regtest: add a test that ignoring a file resolves errors 2022-08-02 14:13:40 +00:00