-
Notifications
You must be signed in to change notification settings - Fork 51
Description
We have a case where we need the top-level pkg of a given Go pkg for use in our application and also one of its sub-pkgs b/c it's a CLI. It seems gpm produces errors in output because it tries to git checkout the sub-pkg even though it's not a submodule but just a sub-directory in the parent pkg.
Fortunately, gpm seems to still work as the binary gets installed in $GOPATH/bin; however, it'd be nice if we could avoid or suppress errors in output from gpm to avoid confusion.
You can see a basic Godeps file here along with the errors from running gpm: https://gist.github.com/jpfuentes2/ad63ff939a87fdb3d92c
Also, I set $GOPATH and $GOBIN to a temporary directory for the test above and, again, the binary was installed along w/ the pkg.
Potential workarounds:
- Do not issue vcs checkout commands if it's a sub-pkg and it's not a submodule (or equivalent).
- Add a comment in the version placeholder to designate
no checkoutwhereby the vcs will not attempt to checkout the sub-pkg. - Punt and instruct users to move the sub-pkg to a
Makefileor other build script usinggo getafter agpmrun.
I don't know if any of these ideas are good but maybe something sparks.