Open msakrejda opened 11 years ago
Ok, I see that linkthis
does almost what I want, but it's per-... well, not even per-package. Per root directory of a package path, which is a little odd. I'd love if linkthis
was a little smarter--e.g., I created several bogus links (first to my original $GOPATH/src, then to original $GOPATH/src/github.com/lib/pq, neither of which worked). Would it make sense for this to, e.g., be able to figure out where it is and link accordingly, instead of just blindly linking wherever it is, regardless of whether or not it's creating a valid $GOPATH path for the package?
For what it's worth, this is what I ended up doing:
for gover in go1.0.2 go1.0.3 go1.1 tip
do
gvm use $gover
for dir in bitbucket.org code.google.com gary.beagledreams.com github.com
do
pushd $dir
gvm linkthis
popd
done
done
I ran this in my original $GOPATH/src directory for all the package roots I was interested in.
Sorry for the delay in response, the maintainer of this project is off in parental leave at the moment. I'm glad you could find a workaround for what you needed to do though!
No problem. And yeah, not a rush, but I'd love to see better support for this use case eventually.
Several years have passed since the last comment on this issue. Is this something that anyone is still interested in?
I've been trying to use gvm to support building a single package (lib/pq) on four go versions: 1.0.2, 1.0.3, 1.1, and tip. I'd like to share a source directory for these builds, since the source is exactly the same (where different code is necessary for different versions, we use build constraints to maintain a single source tree).
A colleague has been doing this with gvm since before pkgsets by just symlinking the single GOPATH into the various version-specific GOPATH directories in
~/.gvm
. I'm trying to set up something similar now, and by looking at the README, I thought pkgsets might help, but I see that they are tied to a specific go version. Does gvm support the same source tree (ideally, just the same src component of GOPATH) across multiple go versions? Would that make sense? Does it present problems?