petejkim / goop

A simple dependency manager for Go (golang), inspired by Bundler.
MIT License
779 stars 45 forks source link

Getting dependencies with "..." adds unnecessary packages #24

Open pkieltyka opened 10 years ago

pkieltyka commented 10 years ago

Using ... at the end of a go get, will fetch all of the packages under that path. But in some projects this will import unnecessary packages.. for example like, https://github.com/garyburd/go-oauth. Adding that to your Goopfile will try to fetch the "examples" package and add the appengine as a dependency, which clear is not a good thing :|

pkieltyka commented 10 years ago

fixed with: https://github.com/pkieltyka/goop/commit/c60be07086405b61d77738a1d4eeb1db2fca025a

.. this does change Goop a bit, since it won't just magically grab every dependency under the sun.. but thats a bad thing to do anyways in my opinion..

pkieltyka commented 10 years ago

I'd love to get another opinion on this, but I think its best to be explicit about go geting

is instead for the developer to specify the "..." at the end of a repo definition in the Goopfile themselves instead of this being implied for every entry.

ie. in a Goopfile

github.com/garyburd/go-oauth/oauth #sometag

vs.

github.com/garyburd/go-oauth/oauth... #sometag
zeeyang commented 9 years ago

+1 for explicit dependency path. I'm having a problem with circular dependency and came across this patch. This doesn't solve dependency conflicts, but the default "grab everything" behavior mades things much worse.

pkieltyka commented 9 years ago

Yea goop sucks. Lots of issues and short comings.

On Friday, December 19, 2014 at 2:51 AM, Zee Yang wrote:

+1 for explicit dependency path. I'm having a problem with circular dependency and came across this patch. This doesn't solve dependency conflicts, but the default "grab everything" behavior mades things much worse.

— Reply to this email directly or view it on GitHub (https://github.com/nitrous-io/goop/issues/24#issuecomment-67607955).

zeeyang commented 9 years ago

I don't think the ... notation is necessary. I would prefer to have a goop introspect command that go through import headers and build the Goopfile. It should give you the precise dependencies and stay close to Go's import conventions.