Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors from git commands when a pkg and its sub-pkg is in Godeps #73

Open
jpfuentes2 opened this issue May 7, 2015 · 0 comments
Open

Comments

@jpfuentes2
Copy link

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 checkout whereby the vcs will not attempt to checkout the sub-pkg.
  • Punt and instruct users to move the sub-pkg to a Makefile or other build script using go get after a gpm run.

I don't know if any of these ideas are good but maybe something sparks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant