petejkim / goop

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

Incorrect dependency updates when fetching multiple dependencies from same GitHub repo #37

Open matthieugrieger opened 9 years ago

matthieugrieger commented 9 years ago

Hi there,

I think I may have found a bug with how Goopfile works. It seems that if you have multiple dependencies located in the same GitHub repo, the individual dependencies must be listed in the order oldest to newest or else they do not get updated properly.

For example, for my project called MumbleDJ, I need to fetch five dependencies: gumble, gumble_ffmpeg, gumbleutil, gcfg, and jsonq. If I put the dependencies in my Goopfile in this order, it does not completely update all of the dependencies (the commit specified for gumble is newer than the commit for gumble_ffmpeg, and gumble_ffmpeg is newer than gumbleutil):

github.com/layeh/gumble/gumble #80248757d681a7563d7257ff645ea27250f9d42d
github.com/layeh/gumble/gumble_ffmpeg #7ca5605a1e735c95442683ef47be117b0b9cb042
github.com/layeh/gumble/gumbleutil #29411f8e62add7e8f0856b35dc925cf879be3aab
code.google.com/p/gcfg #c2d3050044d0
github.com/jmoiron/jsonq #7c27c8eb9f6831555a4209f6a7d579159e766a3c

However, if I put them in this order, the updates are fetched correctly:

github.com/layeh/gumble/gumbleutil #29411f8e62add7e8f0856b35dc925cf879be3aab
github.com/layeh/gumble/gumble_ffmpeg #7ca5605a1e735c95442683ef47be117b0b9cb042
github.com/layeh/gumble/gumble #80248757d681a7563d7257ff645ea27250f9d42d
code.google.com/p/gcfg #c2d3050044d0
github.com/jmoiron/jsonq #7c27c8eb9f6831555a4209f6a7d579159e766a3c

The same dependencies and SHA hashes produce different results when put in different orders. Maybe I've missed something about how goop works, but it doesn't seem to make sense to me that the order of the dependencies in Goopfile should matter.

Thanks!