Go version
go1.25.x linux/amd64 (but 1.26.0 in go.mod)
Output of go env in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/cold/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/cold/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build264210646=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/cold/projects/hello/go.mod'
GOMODCACHE='/home/cold/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/cold/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/cold/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.linux-amd64'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/cold/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/cold/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.0.linux-amd64/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.26.0'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
- Have a host system with an older Go version installed (e.g.,
go1.25.5).
- Have a project where
go.mod specifies a newer version like go 1.26.0 (which triggers the GOTOOLCHAIN auto-switch mechanism).
- Run a test command that invokes the
covdata tool, for example:
go test -covermode=count -coverpkg=./... ./...
What did you see happen?
The build fails with a toolchain version mismatch error, looking something like this:
compile: version "go1.26.0" does not match go tool version "go1.25.5 (xxx)"
What did you expect to see?
The tests should run successfully, using the automatically downloaded 1.26.0 toolchain to handle the coverage data.
Go version
go1.25.x linux/amd64 (but 1.26.0 in go.mod)
Output of
go envin your module/workspace:What did you do?
go1.25.5).go.modspecifies a newer version likego 1.26.0(which triggers theGOTOOLCHAINauto-switch mechanism).covdatatool, for example:go test -covermode=count -coverpkg=./... ./...What did you see happen?
The build fails with a toolchain version mismatch error, looking something like this:
compile: version "go1.26.0" does not match go tool version "go1.25.5 (xxx)"What did you expect to see?
The tests should run successfully, using the automatically downloaded
1.26.0toolchain to handle the coverage data.