calm-librarian-70577
10/09/2024, 12:05 PM$ pants go-generate ::
13:56:18.02 [INFO] Completed: Process `go generate` directives in file: pkg/something.go
13:56:18.02 [ERROR] 1 Exception encountered:
Engine traceback:
in `go-generate` goal
ProcessExecutionFailure: Process 'Process `go generate` directives in file: pkg/something.go' failed with exit code 1.
stdout:
stderr:
2024/10/09 13:56:18 Loading input failed: GOPATH is not set
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
This happens on multiple machines; linux and macs.
I've put a reproduction repo here: https://github.com/rdeknijf/pants-repro-gogen
GOPATH
is actually set. I've tried setting it "harder" several different ways, but it looks like envvars are completely ignored.
How I would debug this? Thanks!brave-garage-48416
10/09/2024, 12:07 PM[golang]
part in your pants.toml filebrave-garage-48416
10/09/2024, 12:07 PM[golang]
cgo_enabled = false
cgo_tool_search_paths = ["<PATH>"]
go_search_paths = ["<PATH>"]
minimum_expected_version = "1.21"
calm-librarian-70577
10/09/2024, 1:11 PM<PATH>
should already be fine btw.brave-garage-48416
10/09/2024, 1:12 PM