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

cmd/go: go list -u -m all fails loading module retractions: module requires go >= 1.N+1 (running go 1.N) #66403

Open
cardil opened this issue Mar 19, 2024 · 0 comments
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@cardil
Copy link

cardil commented Mar 19, 2024

Go version

go version go1.21.4 linux/amd64

Output of go env in your module/workspace:

go env output:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/ksuszyns/.cache/go-build'
GOENV='/home/ksuszyns/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/ksuszyns/.gvm/pkgsets/go1.21.4/global/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/ksuszyns/.gvm/pkgsets/go1.21.4/global'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/ksuszyns/.gvm/gos/go1.21.4'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/ksuszyns/.gvm/gos/go1.21.4/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/ksuszyns/git/ghet/go.mod'
GOWORK='/home/ksuszyns/git/ghet/go.work'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build221871812=/tmp/go-build -gno-record-gcc-switches'

What did you do?

When a module with retractions is a dependency, and that module has a newer version, which requires a newer version of Go than it's currently running, the command: go list -u -m all fails.

Other similar issues: #45305, #41350 (although with different reasons)

Reproducer:

  1. Checkout the example https://github.com/cardil/repro-golang-66403
  2. Switch to Go < 1.22
  3. Execute go list -u -m all

What did you see happen?

The command go list -u -m all fails with:

go: loading module retractions for github.com/buildkite/agent/v3@v3.62.0: module github.com/buildkite/agent/v3@v3.66.0 requires go >= 1.22 (running go 1.21.4)

What did you expect to see?

I expected to see the list of modules.

@cardil cardil changed the title cmd/go: go list -u -m all fails with: loading module retractions for X@v0.1.0: module X@v0.6.0 requires go >= 1.22 (running go 1.21.4) cmd/go: go list -u -m all fails with: loading module retractions for X@x: module X@y requires go >= 1.FF (running go 1.FE) Mar 19, 2024
@seankhliao seankhliao changed the title cmd/go: go list -u -m all fails with: loading module retractions for X@x: module X@y requires go >= 1.FF (running go 1.FE) cmd/go: go list -u -m all fails loading module retractions: module requires go >= 1.N+1 (running go 1.N) Mar 19, 2024
@seankhliao seankhliao added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants
@cardil @seankhliao and others