Skip to content

build: pin toolchain and neutralize stale host GOROOT#23

Open
syscod3 wants to merge 1 commit into
mainfrom
build/toolchain-goroot-fix
Open

build: pin toolchain and neutralize stale host GOROOT#23
syscod3 wants to merge 1 commit into
mainfrom
build/toolchain-goroot-fix

Conversation

@syscod3

@syscod3 syscod3 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Fixes 'compile: version go1.X.0 does not match go tool version go1.Y.Z' build failures caused by a stale GOROOT exported by the host shell (pointing at a different Go than the mise-managed toolchain on PATH).

Changes

  • Makefile: unexport GOROOT — every recipe uses the go binary's own GOROOT, independent of the host's Go install.
  • .mise.toml: [env] GOROOT = false — under mise activation, the pinned go = "1.25.8" toolchain is used regardless of any host GOROOT.

Verification

make build and GOOS=linux mise exec -- go build ./... both pass with a stale GOROOT=/usr/local/Cellar/go/1.26.0/libexec still exported.

Independent of any feature work; landing on main so all agents/devs get a reproducible build.

A GOROOT exported by the host shell (pointing at a different Go than the
mise-managed toolchain) caused 'compile: version mismatch' on every build.
Makefile now unexports GOROOT for all recipes, and .mise.toml unsets it under
mise activation, so builds use the pinned toolchain independent of the host.
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

Successfully merging this pull request may close these issues.

1 participant