I've got bare bones Ubuntu running inside VirtualB...
# general
a
I've got bare bones Ubuntu running inside VirtualBox and I'm having trouble running pants. The error is related to evaluating go dependecies (I believe) The command is
./pants --print-stacktrace -ldebug list ::
Using version 2.16.0.dev3
Copy code
Traceback (most recent call last):
  File "/home/vagrant/.cache/pants/setup/bootstrap-Linux-x86_64/2.16.0.dev3_py38/lib/python3.8/site-packages/pants/backend/go/util_rules/build_pkg.py", line 774, in required_built_go_package
    raise Exception(
Exception: Failed to compile main:
./main.go:18:2: could not import encoding/json (open : no such file or directory)
./main.go:19:2: could not import fmt (open : no such file or directory)
...
./main.go:27:2: too many errors
it looks to me like pants is not picking up the default $GOPATH (I'm not a GoLang expert however...) I show default GOPATH
Copy code
vagrant@linux:~$ go env GOPATH
/home/vagrant/go
Same command using pants version 2.16.0.dev5
Copy code
File "/home/vagrant/.cache/pants/setup/bootstrap-Linux-x86_64/2.16.0.dev5_py38/lib/python3.8/site-packages/pants/util/frozendict.py", line 51, in __getitem__
    return self._data[k]
KeyError: 'unicode/utf8'
Full debug log with stacktrace for both pants versions attached
f
The Pants Go backend does not use the GOPATH. Pants manages a separate GOPATH itself within each execution sandbox.
The Pants Go backend was undergoing a significant amount of development during 2.16, dev3 and dev5 (dev3 most certainly) are unusable for Go.