x/tools/gopls: determine how frequently to reload packages with missing dependencies #36918
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Thinking
Tools
This label describes issues relating to any tools in the x/tools repository.
Currently, when a user's package has a dependency that we can't resolve, we try to reload the package on every key stroke. We take care not to re-check it unless the metadata has changed, but it's still expensive to call
packages.Load
on every keystroke.I wonder if we might be able to somehow make use of the
goimports
scanning logic ingopls
to do this in a better way. It's possible that we can't do better in GOPATH mode (or in another build system), but I'd think we might be able to do something better in module mode.@heschik: Is this a reasonable idea, or should we just stick with the current approach?
The text was updated successfully, but these errors were encountered: