#18 Golist should work without $GOPATH from any directory
Opened 5 years ago by eclipseo. Modified 5 years ago

$GOPATH is deprecated, we shouldn't use it anymore.


Might be possible with tools/go/packages, but I've read that it's much much slower since it tries to do a full module download. This might be mitigated by setting up a GOPROXY.

The download is a no-go since it will be blocked by CI/CD systems like mock.

It should be possible to avoid setting a build-specific GOPATH in golist, by importing directly the directories golist operates on, and taking other code from a static system GOPATH.

Setting the build-specific GOPATH is where most of the problems lie: you have to create a specific directory structure, before golist will even parse your files. That's 90% of why I had to write a very complex %goprep macro.

The system GOPATH OTOH is harmless and fine.

Login to comment on this ticket.

Metadata