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

golang.org/x/*: go directive of 1.23.0 is forcing toolchain directives in anything not using exactly go1.23.0 #71864

Closed
shiqi-synctera opened this issue Feb 20, 2025 · 5 comments

Comments

@shiqi-synctera
Copy link

Go version

go version go 1.23.2

Output of go env in your module/workspace:

~ go env
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/shiqi/Library/Caches/go-build'
GOENV='/Users/shiqi/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/shiqi/go/pkg/mod'
GONOPROXY='gitlab.com/synctera,gitlab.com/shiqi2'
GONOSUMDB='gitlab.com/synctera,gitlab.com/shiqi2'
GOOS='darwin'
GOPATH='/Users/shiqi/go'
GOPRIVATE='gitlab.com/synctera,gitlab.com/shiqi2'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/shiqi/.go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/shiqi/.go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.2'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/shiqi/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/g7/9g27yf_j73lfqv48nn5k10r40000gn/T/go-build1309627990=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Tried to update dependencies for anything in golang.org/x/*

What did you see happen?

due to the 1.23.0 go directive in the x packages, the compiler is forcing a toolchain directive into my go.mod file unless I'm on exactly 1.23.0

What did you expect to see?

expected the x packages to have a go directive of 1.23 without the patch in it.

@seankhliao
Copy link
Member

see https://go-review.googlesource.com/c/mod/+/642200

we consider this working as intended, 1.23.0 is the minimum version we support.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2025
@shiqi-synctera
Copy link
Author

I'm not familiar with the review process. What does that mean? I thought go 1.23 already expresses that 1.23.0 is the minimum version the module supports?

@seankhliao
Copy link
Member

no, go1.23 means every development version after the go1.22.0

@shiqi-synctera
Copy link
Author

so... if I'm understanding this correctly, because of that, putting go 1.23.0 & forcing a toolchain into every go mod that uses the x packages is acceptable & intended?

@seankhliao
Copy link
Member

see #65847
it should update your go.mod go directive
if it triggered a toolchain upgrade, it should record a toolchain directive so it doesn't need to lookup which toolchain to use again next time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants