Go version
go version go1.24.5 darwin/arm64
Output of go env
in your module/workspace:
GO111MODULE=''
What did you do?
$ date
Mar 29 jul 2025 08:10:11 CEST
$ go version
go version go1.24.5 darwin/arm64
$ cat go.mod
module x
go 1.23.0
$ go get toolchain@latest
go: added toolchain go1.25rc2
$ cat go.mod
module x
go 1.23.0
toolchain go1.25rc2
$ go list
go1.25rc2: not downloaded. Run 'go1.25rc2 download' to install to $HOME/sdk/go1.25rc2
$ go version
go1.25rc2: not downloaded. Run 'go1.25rc2 download' to install to $HOME/sdk/go1.25rc2
$ go get toolchain@1.23.0
go1.25rc2: not downloaded. Run 'go1.25rc2 download' to install to $HOME/sdk/go1.25rc2
$ # Let's fix
$ sed -i '' '/^toolchain/d' go.mod && go mod tidy
$ cat go.mod
module x
go 1.23.0
$ go version
go version go1.24.5 darwin/arm64
What did you see happen?
go1.25rc2
is the toolchain added in go.mod. But that toolchain is not fully functional like a stable release. As a result my project is broken. I don't even have a functional go
command to revert the issue.
What did you expect to see?
go get toolchain@latest
should get the latest stable release of the go toolchain, and ignore release candidates. Today (2025-07-29) it should have installed go1.24.5
instead of go1.25rc2
.
Comment From: dolmen
Cc: @golang/command-line
Comment From: gabyhelp
Related Issues
- cmd/go: go toolchain version switch doesn't work when only language version is set in go.mod #65580 (closed)
- cmd/go: go1.22 toolchain not available #65631 (closed)
- cmd/go: reject to download toolchain when gotoolchain \< go directive #72003 (closed)
- cmd/go: toolchain selection interacts unexpectedly with non-standard toolchains #63357 (closed)
- cmd/go: "get -tool" should fail if toolchain is below 1.24 in go.mod #74739
- cmd/go: `go env GOMOD` tries to download newer toolchain #61455 (closed)
- go run not adhering to toolchain of go.mod when specifying package version #69817 (closed)
- go mod edit: changing go versions in modules to invalid versions updates go.mod and causes weird problems #66491 (closed)
- cmd/go: download go1.22 for darwin/arm64: toolchain not available #65568 (closed)
- Go toolchain should not force upgrade #63522 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: mrkfrmn
CC @golang/command-line from owners.
Comment From: mrkfrmn
(Sorry for the double CC)
Comment From: gopherbot
Change https://go.dev/cl/691655 mentions this issue: cmd/go/internal/gover: fix ModIsPrerelease for toolchain versions