Hey Pants Team, looking for some help debugging an...
# general
Hey Pants Team, looking for some help debugging an issue with a go project with pants
. I recently upgraded my go version
and when running Pants I'm seeing this error:
Copy code
BinaryNotFoundError: Cannot find a `go` binary with the expected version of 1.18 (set by `[golang].expected_version`).

Found these `go` binaries, but they had different versions:

  * /usr/local/bin/go: 1.17

To fix, please install the expected version (<https://golang.org/doc/install>) and ensure that it is discoverable via the option `[golang].go_search_paths`, or change `[golang].expected_version`.
When inspecting the go version it seems to be correct
Copy code
$/usr/local/bin/go version
go version go1.18.2 darwin/amd64
Not sure if it's pants related at all but any help is appreciated
simply not good UX 😕 I fixed, but it's not in 2.11 https://github.com/pantsbuild/pants/pull/15306
looks like it's not until Pants 2.13, which hasn't had any release candidates yet
in the meantime, I recommend using a
file to override this locally: https://www.pantsbuild.org/docs/options#pantsrc-file
👀 1
but I'm not sure what I would change
to as it seems to be correct (1.18 which is installed) curious about this log line for the binary
* /usr/local/bin/go: 1.17
Pants is reporting
when the binary is
. Maybe I'm missing something else?
ohhhhh I see. Try
rm -rf .pids
👀 1
We memoize with Pantsd the discovery of binaries. It's not correct, we technically should rescan your machine every single run to see if binaries have changed But that is slow, so we make a tradeoff to only find binaries the first time the daemon runs
that fixed it! Thank you @hundreds-father-404 that solution is totally okay if we see this again we'll start by nuking that directory first
❤️ 1