e0b94741

By: Michael Lynch <git@mtlynch.io>

Isolate Go toolchain settings in Nix workflows

Ignore user Go settings in the dev shell so the pinned Nix Go toolchain remains authoritative. This prevents persisted user settings such as GOROOT from making the Go 1.25.5 binary invoke mismatched Go 1.26.1 tools and fail with:

compile: version "go1.26.1" does not match go tool version "go1.25.5"

Keep GOPATH isolated in the dev shell for project-specific installed tools and modules, but let Go use its default build cache. Simplify Nix build steps by relying on their temporary HOME and Go defaults instead of manually exporting GOPATH, GOCACHE, and GOMODCACHE. The go-tests setup now creates analyzer symlinks in the GOPATH reported by `go env`.

Testing:
- nix develop --command ./dev-scripts/serve
- nix build .#go-tests
- dev-scripts/git-hooks/pre-commit
- nix flake check

Suite timing

Time to Start Worker time Duration Time to finish
Config 2s 6s 6s 8s
Eval 8s 41s 41s 50s
Build 12s 4m02s 1m58s 2m10s
Test - - - -
Deploy - - - -
Suite 2s 4m50s 2m08s 2m10s

Timeline

0s10s20s30s40s50s1m1m10s1m20s1m30s1m40s1m50s2m2m10s