Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: triggers packages.Load on ctrl-hover #35716

Closed
heschik opened this issue Nov 20, 2019 · 1 comment
Closed

x/tools/gopls: triggers packages.Load on ctrl-hover #35716

heschik opened this issue Nov 20, 2019 · 1 comment
Labels
Milestone

Comments

@heschik
Copy link
Contributor

@heschik heschik commented Nov 20, 2019

Build info

golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@(devel)
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20191017151554-a3bc800455d5 => ../
    golang.org/x/xerrors@v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
    honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=

Go info

go version go1.13.4 linux/amd64

What did you do?

Hovered over an indentifier with the ctrl key held down in VSCode.

What did you expect to see?

A hover more or less instantly.

What did you see instead?

Delay due to a packages.Load call. The hover triggers a didOpen for the file that declares the identifier I'm hovering over, and that didOpen seems to trigger a packages.Load call on it.

@gopherbot gopherbot added this to the Unreleased milestone Nov 20, 2019
@heschik heschik changed the title x/tools/gopls: triggers packages.Load on vctrl-hover x/tools/gopls: triggers packages.Load on ctrl-hover Nov 20, 2019
@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Nov 30, 2019

As of CL 208265, we no longer call go/packages.Load on file opens, so this should be fixed now.

@stamblerre stamblerre closed this Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.