Closed
Description
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 in gopls
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?