This PR adds the necessary changes to support users with multiple
GOPATH workspaces. Previously the gopath() function would truncate
the system GOPATH list to only operate on the first value, as a result
of this packages installed in other GOPATH workspaces were not
recognized. An attempt was made to try go get .. again, this of course
would not function as glock expected given the go tool chain already
recognizes the packages being present in the other workspaces.
Additionally if a project managed by glock is not placed under the
primary workspace the GLOCKFILE is not found (given it's looking only
within the primary workspace).
Concisely the changes here address both these issues, we look for the
GLOCKFILE in every workspace and look for existing dependencies in the
other workspaces as well.
We also retain the default go tool chain behavior downloading new packages
into the primary workspace (see occurrences of gopaths()[0]) all the
while preserving backwards compatibility, single workspace environments
should be completely unaffected by these changes.
This PR adds the necessary changes to support users with multiple
GOPATH
workspaces. Previously thegopath()
function would truncate the systemGOPATH
list to only operate on the first value, as a result of this packages installed in otherGOPATH
workspaces were not recognized. An attempt was made to trygo get ..
again, this of course would not function as glock expected given the go tool chain already recognizes the packages being present in the other workspaces. Additionally if a project managed by glock is not placed under the primary workspace theGLOCKFILE
is not found (given it's looking only within the primary workspace).Concisely the changes here address both these issues, we look for the
GLOCKFILE
in every workspace and look for existing dependencies in the other workspaces as well. We also retain the default go tool chain behavior downloading new packages into the primary workspace (see occurrences ofgopaths()[0]
) all the while preserving backwards compatibility, single workspace environments should be completely unaffected by these changes.@robfig.