x/tools/gopls: does not download transitive dependencies of newly-required packages #44307
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Reported by @leitzler on #44247.
go get
adds module requirements as// indirect
. That's not what we want in gopls -- we're runninggo get
because of an unsatisfied direct dependency. To avoid that, we resolve the desired package to its containing module, then rungo mod edit -require $module
to add the dependency, thengo get $module
to populatego.sum
and download the module.However, if the package the user wants to use has its own dependencies, simply downloading the newly-required module is insufficient. We should
go get
the exact package, not the module, so that thego
command downloads its dependencies.The text was updated successfully, but these errors were encountered: