/ go Public
proposal: cmd/go: allow
go get to choose versions based on the go version constraints
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
With extended forwards compatibility feature (#57001), the
goline in go.mod will prescribe the minimum go version required to compile the go module. If the work module says
go 1.27but a dependency says
go 1.28, the work module should update its
go.modto require at least
For library module maintainers who want to have better control of their minimum go version requirements, dependency update can be rather challenging. They have to pick the dependency version carefully to avoid bumping up their own modules' go version because one of their dependencies chose to bump their go version in their latest release.
We can think of various ways of helping users choose the right version such as
go list -m --versionsto present the minimum required go version for each version.
However, querying the requirement individually doesn't scale well when there are many dependencies.
It would be nice if the
go gethas an option to compute and choose the latest versions compatible with the given go version requirement.
The text was updated successfully, but these errors were encountered: