Skip to content

go-generate fails on GOPATH is not set #21527

Open
@rdeknijf

Description

@rdeknijf

go-generate doesn't work

$ 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.

Pants version
Tested 2.22, 2.21 and 2.23

OS
Both Linux and Mac

Small reproduction repo
https://github.com/rdeknijf/pants-repro-gogen

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions