You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gopls/internal/lsp/cmd: append, don't overwrite, in PublishDiagnostics
This change causes the CLI tool's PublishDiagnostics operation
to accumulate, rather than overwrite, the slice of file diagnostics,
under the hypothesis that it is receiving multiple events and
the later ones are clobbering the earlier ones, causing golang/go#59475.
We perform a crude de-duplication in case this should result
in duplicate diagnostics. A more robust approach using
textDocument/diagnostic will be added in a follow-up.
Also, clarify the mutex's responsibility, copy (don't alias)
the diagnostics slice in the critical section, and tidy up the
surrounding code.
Updates golang/go#59475
Change-Id: Ifbb4974ef00ab7bd6547de28f052cec86462230b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/494275
Run-TryBot: Alan Donovan <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
0 commit comments