Skip to content

cmd/go: "get toolchain@latest" should ignore release candidates #74786

@dolmen

Description

@dolmen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.GoCommandcmd/go

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions