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: go1.22 toolchain not available #65631

Closed
FiloSottile opened this issue Feb 9, 2024 · 2 comments
Closed

cmd/go: go1.22 toolchain not available #65631

FiloSottile opened this issue Feb 9, 2024 · 2 comments

Comments

@FiloSottile
Copy link
Contributor

Go version

go version go1.21.5 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/filippo/Library/Caches/go-build'
GOENV='/Users/filippo/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/filippo/pkg/mod'
GONOPROXY='github.com/FiloSottile/*,filippo.io/*'
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/filippo'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org'
GOROOT='/opt/homebrew/Cellar/go/1.21.5/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.21.5/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
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/_j/hq4ytn1n4b94fhrpvvb9tktr0000gn/T/go-build2730947195=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Updated my go.mod go line to go1.22 and ran go test.

What did you see happen?

go: downloading go1.22 (darwin/arm64)
go: download go1.22 for darwin/arm64: toolchain not available

What did you expect to see?

Go 1.22.0 being downloaded.

I know go1.22 is not a toolchain now that we renamed that to go1.22.0, but when I set the go line I am not thinking primarily of toolchain versions, but of the Go 1.22 semantics, and I am happy for the latest version of Go 1.22 to be downloaded.

Looks like there's been a lot of confusion around this in the past dependabot/dependabot-core#7895 and some projects disabled auto toolchains to support go.mod files with "short" go versions.

If the behavior shouldn't be changed, at least the error can be more useful, suggesting changing the go line to include a patch version.

@FiloSottile FiloSottile changed the title import/path: issue title cmd/go: go1.22 toolchain not available Feb 9, 2024
@seankhliao
Copy link
Member

Duplicate of #62278

see in particular #62278 (comment)

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
@alessandroargentieri
Copy link

the provided solutions haven't worked for me. Besides that, I'm in my terminal, outside a go project and outside VSCode

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

3 participants