Masterminds / glide

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

Glide update does not update packages to the latest version unless git cache is cleared #592

Open a13xb opened 8 years ago

a13xb commented 8 years ago

Your usage example states:

$ glide up                                # Update to newest versions of the package

However, it doesn't seem to do that at all. If I start with a clean repository with glide.yaml, where none of the packages are constrained, and a matching glide.lock, none of the dependencies are updated, even though upstream has new commits. Repository remains clean.

When (pre-0.12) Glide was still not stripping VCS files, I used to be able to go into venvor tree, checkout a specific version of a single dependency and run glide update, it would update the lock file to pin the dependency at the version I checked out. So I've been left with the impression that all glide update does is transfer the state of your vendor tree into glide.lock, that's it.

Obviously now vendor tree doesn't retain VCS information, I'm not sure what exactly glide update is supposed to do, and how to actually properly update dependencies to the latest version of the upstream.

wellsjo commented 6 years ago

@G-Harmon I'll see if I can find time in the next couple days to reproduce this in a digestible way.

I'm baffled though, this is a glaringly obvious issue that many people are facing, and it breaks one of the most important features of a dependency management system. Many projects' dependencies rely on the master branch...and they don't update. This has been an open issue since August 2016, which makes me inclined to drop glide. It's somewhat reassuring that GCP is using it, but this is clearly buggy/unfinished software.

JelteF commented 6 years ago

If possible I would definitely try switching to dep: https://github.com/golang/dep/

It's the "official" dependency tool and has much less of these bug bugs in my opinion. The glide README also recommends it actually.

On Thu, Feb 1, 2018, 03:24 Wells Johnston notifications@github.com wrote:

@G-Harmon https://github.com/g-harmon I'll see if I can find time in the next couple days to reproduce this in a digestible way.

I'm baffled though, this is a glaringly obvious issue that many people are facing (and easily reproduced), and it breaks one of the most important features of a dependency management system. Many projects dependencies rely on the master branch...and they don't update. This has been an open issue since August 2016, which makes me inclined to drop glide. It's somewhat reassuring that GCP is using it, but this is clearly buggy/unfinished software.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Masterminds/glide/issues/592#issuecomment-362137821, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG8JkXUD0dXGVT0Y2t06UQb2dvq7DD-ks5tQSBogaJpZM4JxUEK .

wellsjo commented 6 years ago

@JelteF dep didn't work for me right out of the box because of this. It just hangs without any output on dep init...

ashubalike commented 4 years ago

I was facing the same issue that 'glide up' wasn't updating my vendor folder,and project was referring to an older version of the dependency which was already present. I see from this thread that clearing glide cache also did not help some people, same for me too. Figured out a workaround till this issue is fixed:

This refreshed my vendor folder with required commit or created a dependency if it dint exist.

ghost commented 4 years ago

@ashubalike that worked for me!