From 458bdb151b74102c3b596915fb15d07ff0279c61 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 09:20:25 +0000 Subject: [PATCH] docs(go): note that GOFLAGS from the host has no effect heph/heph#448 removed GOFLAGS from the go_golist driver's host passthrough (it changed go list's output without keying the cache, so a cached listing could be served to a build with a different GOFLAGS). Document that build tags belong on a variant's `tags` field, not in the environment. Ref: hephbuild/heph@74d10bc7c14f2ad97fe1d5f554619e61537e7fdd --- plugins/heph-go/skills/heph-go/references/go-plugin.md | 2 ++ website/docs/plugins/go.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/plugins/heph-go/skills/heph-go/references/go-plugin.md b/plugins/heph-go/skills/heph-go/references/go-plugin.md index 8bda8c3..ee600a2 100644 --- a/plugins/heph-go/skills/heph-go/references/go-plugin.md +++ b/plugins/heph-go/skills/heph-go/references/go-plugin.md @@ -272,6 +272,8 @@ provider_state(provider = "go", variants = { | `inherit` | `string` | no | Another variant name in the same map to start from. | No `cgo` field — every heph-built Go target has `CGO_ENABLED=0` unconditionally. +A host's `GOFLAGS` has no effect on `go list` or the build — heph does not read +it; set build tags via a variant's `tags` field instead of `GOFLAGS=-tags=...`. `inherit` overlays declared fields onto the resolved base; list fields (`tags`/`goexperiment`/`gcflags`/`ldflags`) are **replaced wholesale, not merged**; `goos`/`goarch` may be omitted when the base sets them; inheritance diff --git a/website/docs/plugins/go.md b/website/docs/plugins/go.md index 5034552..478872d 100644 --- a/website/docs/plugins/go.md +++ b/website/docs/plugins/go.md @@ -462,6 +462,10 @@ provider_state(provider = "go", variants = { `cgo` is not a variant field — every heph-built Go target compiles with `CGO_ENABLED=0`, unconditionally. +A host's `GOFLAGS` environment variable has no effect on `go list` or on the +build — heph does not read it. Set build tags with a variant's `tags` field +instead of `GOFLAGS=-tags=...`. + `inherit` resolves the named variant first, then overlays the fields you set on top of it. List fields (`tags`, `goexperiment`, `gcflags`, `ldflags`) are **replaced**, not merged — in the example above, `release` ends with