Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Allow vendoring of main packages #457

Open
sethgrid opened this issue Apr 14, 2016 · 2 comments
Open

Allow vendoring of main packages #457

sethgrid opened this issue Apr 14, 2016 · 2 comments

Comments

@sethgrid
Copy link

We have build tools and scripts. Because godep does not allow for main packages to be vendored, we are faced with a crappy situation: don't vendor or vendor the binary. Checking in a binary is no bueno. To add color here: we run ./bin/whatever.sh. In there, we want to do things like run ffjson or other build helpers. Some (many?) of these build helpers are main packages. I want to vendor them with Godep so I can ensure my build process stays constant. As it stands, I currently have to have go get blah.blah.blah in the ./bin/whatever instead of having it in Godep. An option like go save ./... -allow-main would be super handy.

@freeformz
Copy link

It does, although it's a little janky and doesn't work well with the vendor experiment. We use it internally @ Heroku.

godep save ./... github.com/mattes/migrate saves both local deps and the main that is github.com/mattes/migrate.

Janky parts:

  1. You need to always save both of those.
  2. It doesn't work well with vendor/ in that you can't then go install github.com/mattes/migrate. You have to prefix your local project's package name to it + vendor like so go install github.com/heroku/project/vendor/github.com/mattes/migrate. This is a limitation of how the vendor/ experiment works. If you are using old style godep workspaces then it's simply godep go install github.com/mattes/migrate.

Does that help?

@sethgrid
Copy link
Author

I'll take a look at that; thanks

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

No branches or pull requests

2 participants