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/server: simplify DiagnoseFiles to avoid a race
Simplify the DiagnoseFiles command handler to just diagnose all
snapshots for requested files, rather than implement ad-hoc diagnostic
logic. This may be somewhat slower, but this is only used for command
line commands and is therefore performance is not critical.
Also adjust updateDiagnostics to not overwrite final diagnostics with
non-final diagnostics.
These two changes together avoid the race encountered in
golang/go#64765: DiagnoseFiles does not return until diagnostics are
finalized, and these final diagnostics are not overwritten.
Fixesgolang/go#64765
Change-Id: I54ef7309487a9803a8bbd45ab2a8de4dbf30c460
Reviewed-on: https://go-review.googlesource.com/c/tools/+/556475
Reviewed-by: Alan Donovan <[email protected]>
Run-TryBot: Robert Findley <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
0 commit comments