Skip to content

build: pass -trimpath to all go commands in make targets - #467

Merged
wstein merged 2 commits into
mainfrom
chore/466-trimpath
Oct 8, 2026
Merged

wstein merged 2 commits into
mainfrom
chore/466-trimpath

Conversation

@wstein

@wstein wstein commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Makefile keeps an existing GOFLAGS (environment, else go env GOFLAGS) and adds -trimpath once, so worktrees share the Go build cache (measured: second path adds 44 MB without it, 0 MB with it). scripts/install_test.go fake go hands env to the real go. One line in .agents/code.md on the shared cache and a private GOCACHE for heavy runs. Full go test ./... evidence: 54 packages ok in two invocations on a private cache; no test depends on absolute source paths. ci.yml and release.yml unchanged (goreleaser already sets -trimpath). Opus CLEAR on 409b1e0. Branch base is behind main; GitHub rebases on merge.

Closes #466

🤖 Generated with Claude Code

wstein and others added 2 commits October 8, 2026 19:52
Keeps any GOFLAGS from the environment or go env and adds -trimpath once.
The source-install test fixtures' fake go now delegates go env to the real go.

Refs: #466

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@wstein

wstein commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

Review evidence: Opus CLEAR on 409b1e0, no blocking findings. Opus tested GOFLAGS cases (existing -mod=mod, -trimpath already present, recursive make, unset/empty). First full go test hung because the fake go in scripts/install_test.go looped on go env; fixed, assertions unchanged. 54 packages ok (two invocations, private cache); go test ./scripts not rerun on the final tip; make check-local passes. Lows in #399: leading space in GOFLAGS when both empty; make GOFLAGS=... overrides; branch base behind main (GitHub rebases on merge).

@wstein
wstein marked this pull request as ready for review October 8, 2026 18:15
@wstein
wstein merged commit 7349a26 into main Oct 8, 2026
20 checks passed
@wstein
wstein deleted the chore/466-trimpath branch October 8, 2026 18:16
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.

Build: -trimpath for all go commands so worktrees share the build cache

1 participant