<#18424 Failed to locate go cache> Issue created b...
# github-notifications
q
#18424 Failed to locate go cache Issue created by b4nst Describe the bug When running pants on a go project:
Copy code
14:56:24.26 [INFO] Initialization options changed: reinitializing scheduler...
14:56:25.10 [INFO] Scheduler initialized.
14:56:25.76 [INFO] Preserving local process execution dir /private/var/folders/vl/j712bqm55gd754rr5tdm8bxm0000gn/T/pants-sandbox-v4yWM2 for Determine Go SDK metadata for /opt/local/bin/go
14:56:25.77 [ERROR] 1 Exception encountered:

Engine traceback:
  in `tailor` goal
  in Find all sources from input specs
  in Generate `go_third_party_package` targets from `go_mod` target
  in Find Go binary

ProcessExecutionFailure: Process 'Determine Go SDK metadata for /opt/local/bin/go' failed with exit code 1.
stdout:

stderr:
build cache is required, but could not be located: GOCACHE is not defined and $HOME is not defined
When running the saved sandbox script:
Copy code
{
  "AR": "ar",
  "CC": "/usr/bin/clang",
  "CGO_CFLAGS": "-O2 -g",
  "CGO_CPPFLAGS": "",
  "CGO_CXXFLAGS": "-O2 -g",
  "CGO_ENABLED": "1",
  "CGO_FFLAGS": "-O2 -g",
  "CGO_LDFLAGS": "-O2 -g",
  "CXX": "clang++",
  "GCCGO": "gccgo",
  "GO111MODULE": "",
  "GOARCH": "arm64",
  "GOBIN": "",
  "GOCACHE": "/Users/<redacted>/Library/Caches/go-build",
  "GOENV": "/Users/<redacted>/Library/Application Support/go/env",
  "GOEXE": "",
  "GOEXPERIMENT": "",
  "GOFLAGS": "",
  "GOGCCFLAGS": "-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/vl/j712bqm55gd754rr5tdm8bxm0000gn/T/go-build1933498172=/tmp/go-build -gno-record-gcc-switches -fno-common",
  "GOHOSTARCH": "arm64",
  "GOHOSTOS": "darwin",
  "GOINSECURE": "",
  "GOMOD": "/dev/null",
  "GOMODCACHE": "/does/not/matter/pkg/mod",
  "GONOPROXY": "<redacted>",
  "GONOSUMDB": "<redacted>",
  "GOOS": "darwin",
  "GOPATH": "/does/not/matter",
  "GOPRIVATE": "<redacted>",
  "GOPROXY": "<https://proxy.golang.org>,direct",
  "GOROOT": "/opt/local/lib/go",
  "GOSUMDB": "<http://sum.golang.org|sum.golang.org>",
  "GOTMPDIR": "",
  "GOTOOLDIR": "/opt/local/lib/go/pkg/tool/darwin_arm64",
  "GOVCS": "",
  "GOVERSION": "go1.20.1",
  "GOWORK": "",
  "PKG_CONFIG": "pkg-config"
}
Pants version Which version of Pants are you using? 2.15.0 OS Are you encountering the bug on MacOS, Linux, or both? MacOS Additional info Add any other information about the problem here, such as attachments or links to gists, if relevant. pantsbuild/pants
u