cmd/go: get doesn't select dependencies limited to go@version #67574
Labels
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Go version
go version go1.21.8 darwin/amd64
Output of
go env
in your module/workspace:What did you do?
we would like to stay on golang version 1.21 and still be able to update our dependencies using
go get -u ./...
the problem is that
go get
doesn’t respect the local toolchain version and attempts to pull in module versions that are newer than the local toolchainwe found this solution #59886 (comment) but it doesn’t seem to work as seen in the example below:
I also attempted with
go get k8s.io/client-go go@1.21
andgo get k8s.io/client-go go@1.20
What did you see happen?
not download compatible module version
What did you expect to see?
download compatible module version
The text was updated successfully, but these errors were encountered: