x/tools/gopls: change to go.mod file does not trigger recalculation of diagnostics #35820
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
This is probably related to #35548 but raising as a separate issue because it's specifically about changing
go.mod
as opposed to configuration.We have a
govim
test that verifies the setting of the"env"
valueGOFLAG=-mod=readonly
. It is based on the following setup:(
example.com/blah
is a valid module and is accessible FWIW, see later).We initially verify that the
go.mod
file is not changed bygopls
. This is fine. We also verify thatmain.go
has the following diagnostic:Also fine.
Then we update
go.mod
from outside the editor using:This change gets notified to
gopls
viadidChange
but the diagnostics formain.go
are not updated.What did you expect to see?
The diagnostics for
main.go
to be updated such that there are no errors.What did you see instead?
The diagnostics for
main.go
unchanged.See the interactions via the
gopls
log file: fail.logcc @stamblerre @matloob
The text was updated successfully, but these errors were encountered: