x/tools/gopls: add a second analysis diagnostics pass for changed files #42499
After the fix to avoid flashing diagnostics (https://golang.org/cl/267817), I now feel a noticeable lag when getting diagnostic results for files with no errors or with analysis errors. I think we should add a second pass that runs diagnostics with analyses on only the changed files, so that those results can come back before the diagnostics for the whole workspace.
The text was updated successfully, but these errors were encountered:
Without this, analysis diagnostics have to wait until the entire workspace is analyzed, which has a noticeable latency. Refactored diagnosePkg out of diagnose to reuse code, and cleaned up the showMsg and seen file logic a little bit. Fixes golang/go#42499 Change-Id: I51314dab156dce87dc19eba997c53d2aea428b6c Reviewed-on: https://go-review.googlesource.com/c/tools/+/269197 Trust: Rebecca Stambler <firstname.lastname@example.org> Run-TryBot: Rebecca Stambler <email@example.com> gopls-CI: kokoro <firstname.lastname@example.org> TryBot-Result: Go Bot <email@example.com> Reviewed-by: Robert Findley <firstname.lastname@example.org>