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
In the course of CL 503195 I noticed that minor changes to source files (such as the insertion of a comment) cause re-typechecking (from syntax) of far more packages than one might expect based on the change. This appeared to be the case both before and after the change in that CL.
and run go run ./gopls check ./gopls/main.go, I observe:
first run: typechecks everything.
second run: typechecks nothing.
edit gopls/internal/lsp/cmd/cmd.go: add a comment after the import block. run again: type checks a lot of packages, far more than the upward dependencies of the edit. To pick one at random, honnef.co/go/tools/analysis/facts/purity. Yet go list -deps honnef.co/go/tools/analysis/facts/purity | grep gopls is empty, i.e. we re-typechecked a package that does not transitively depend on the changed package.
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Jun 21, 2023
D'oh. go run ./gopls after a change to cmd.go produces a new executable with a new hash and a new cache subtree, so of course it does all the work again. Time to find the coffee machine in our new digs...
In the course of CL 503195 I noticed that minor changes to source files (such as the insertion of a comment) cause re-typechecking (from syntax) of far more packages than one might expect based on the change. This appeared to be the case both before and after the change in that CL.
For example, if I enable this log line:
and run
go run ./gopls check ./gopls/main.go
, I observe:go list -deps honnef.co/go/tools/analysis/facts/purity | grep gopls
is empty, i.e. we re-typechecked a package that does not transitively depend on the changed package.The text was updated successfully, but these errors were encountered: