Masterminds / glide

Package Management for Golang
https://glide.sh
Other
8.15k stars 540 forks source link

Option to update a single dependency #669

Open tamalsaha opened 8 years ago

tamalsaha commented 8 years ago

We would like an option to update a single dependency without checking its recursive dependencies. This is different from using dependency from local $GOPATH, since my dependency is already checked in. Here is my scenario:

I have a example.com/server repo which depends on a example.com/lib. I make some changes to lib and commit that to origin master. Now, I would like my teammate to pull that updated repo in his local machine and use that. Here some problem we face today:

  1. When my teammate uses glide up -v example.com/lib, glide still checks for all the dependencies for updates. This is a major problem for us, since our server repo has a dependency on Kubernetes which has too many dependencies. I have tried adding --quick, but that exits with status 1. (#668)

  2. We can't just use _vendor and have everything locally. Again because of our Kubernetes dependency, this is not practical.

I don't mean to be negative towards Kubernetes. I assume this will happen to anyone dependent on large complex repos.

Does use-cases like this fall in the parlance of glide? If so, can we have a way for fast vendoring? Even if that results in "unsafe" option, ultimately go compiler will tell me if something is wrong.

sdboyer commented 7 years ago

Sorry, but not checking transitive dependencies really isn't something we plan to allow. The problem of dependency management is already quite hard. It becomes even harder if it's valid for the tool to produce demonstrably incorrect outputs.

Is there a specific part of the "dependency checking" process that you've involved as being so costly? How long is the process taking for you as-is, and do you have a threshold below which you'd find the length of time acceptable? It's possible (though we don't really know yet) that the move to gps slated for the next major version of glide could result in some dramatic speed increases.

sdboyer commented 7 years ago

Though, actually, I should clarify one thing: in your example of glide up -v example.com/lib, passing the argument has no effect on the behavior of glide up. It still tries to update everything. That itself is probably a significant part of the cost you're facing...and that will definitely be changed in a gps-based glide (it already is). On that, see #252