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: kubernetes' vendored modules are opened as new views #65830

Closed
findleyr opened this issue Feb 20, 2024 · 2 comments
Closed

x/tools/gopls: kubernetes' vendored modules are opened as new views #65830

findleyr opened this issue Feb 20, 2024 · 2 comments
Assignees
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

While testing zero-config gopls (#57979), I noticed that jumping to definition on a vendored Kubernetes module creates a new View for that module. This could result in increased memory usage, and partial references results.

We should not create Views for vendored modules. The fix seems very straightforward, so we should fix this for v0.15.0.

@findleyr findleyr added this to the gopls/v0.15.0 milestone Feb 20, 2024
@findleyr findleyr self-assigned this Feb 20, 2024
@gopherbot 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 Feb 20, 2024
@gopherbot
Copy link

Change https://go.dev/cl/565458 mentions this issue: gopls/internal/cache: don't create Views for vendored modules

@gopherbot
Copy link

Change https://go.dev/cl/565695 mentions this issue: [gopls-release-branch.0.15] gopls/internal/cache: don't create Views for vendored modules

gopherbot pushed a commit to golang/tools that referenced this issue Feb 21, 2024
…for vendored modules

We should not create Views for vendored modules, just as we don't create
Views for modules in the module cache. With this change, gopls behaves
similarly to gopls@v0.14.2 when navigating around the Kubernetes repo.

Also add some test coverage that vendored packages are not workspace
packages.

Fixes golang/go#65830

Change-Id: If9883dc9616774952bd49c395e1c0d37ad3c2a6a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/565458
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit a821e61)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/565695
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants