x/tools/gopls: forgets/complains about unchanged types/code #38924
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Notably, I update
gopls
manually very regularly. I am running from ago install
from current master:a1532b81
. This issue affects (possibly many) previous commits as well (it was not introduced ina1532b81
).What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
This reproduces frequently, but not reliably enough to come up with a process.
In general, I have a large-ish codebase. While changing code (unrelated code to what breaks), I frequently will see various other directories highlight red in VSCode.
Some things that I am not doing might be relevant here:
What did you expect to see?
I expect only actual compilation/code errors to be displayed as errors.
What did you see instead?
Looking at the errors, I see stuff like:
and
Neither error is valid. Neither error is related to changed code. The second error in particular is clearly not valid, as the error itself is tautologically inconsistent (type
a
cannot be used as typea
).Using VSCode's
Go: Restart Language Server
resolves the issue for some period of time, but it tends to come back in minutes-to-hours. One thing I noticed is there does tend to be some consistency to the code it becomes unhappy about - given the same general work, it will start complaining about the same exact (but still unrelated and unchanged) type, in the same file, at the same location.Happy to gather more information here as appropriate.
The text was updated successfully, but these errors were encountered: