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
After a little time using the zero-config algorithm (#57979), it has become apparent to me that we should consider replace directives within the workspace.
Specifically, I noticed while navigating around Kubernetes that gopls creates too many unnecessary views for modules in the staging directory.
If a module replaces a directory contained in the workspace, the selectViews algorithm should merge those views.
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
Dec 28, 2023
To prepare for the follow up change, where we honor local replaces in
the view selection algorithm, treat go.mod files more like go.work files
in a couple places:
- Re-run the view selection algorithm whenever a go.mod file changes on
disk.
- Use the workspaceModFiles field in the bestView algorithm, rather than
checking the gomod field directly.
Apart from perhaps running the view selection algorithm more frequently,
this change should have no observable impact.
For golang/go#64888
Change-Id: I9d9a74b876791a77e284a1a1d5fcc7a691199901
Reviewed-on: https://go-review.googlesource.com/c/tools/+/562679
Reviewed-by: Alan Donovan <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
After a little time using the zero-config algorithm (#57979), it has become apparent to me that we should consider replace directives within the workspace.
Specifically, I noticed while navigating around Kubernetes that gopls creates too many unnecessary views for modules in the staging directory.
If a module replaces a directory contained in the workspace, the
selectViews
algorithm should merge those views.CC @adonovan @hyangah
The text was updated successfully, but these errors were encountered: