Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/heph-go/skills/heph-go/references/go-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions website/docs/plugins/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading