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

Inconsistent git hashes for sub-pkgs of a single repo cause trouble with no warning #223

Open
thockin opened this issue Jun 6, 2015 · 8 comments
Assignees

Comments

@thockin
Copy link

thockin commented Jun 6, 2015

We accidentally had one sub-pkg of an upstream repo where the githash was different than the rest. Godep checked out this (older) hash and obliterated files that we needed by other sub-pkgs. I feel like there should be a warning, something like "different revs for sub-packages of the same repo - this is not expected and probably bad things will happen"

@kr
Copy link
Member

kr commented Nov 29, 2015

The save and update commands check for this case and prevent it from happening. Godeps.json should never contain two different commit hashes from the same repo. If it happens anyway, that's a bug.

@thockin
Copy link
Author

thockin commented Nov 30, 2015

I'm not sure how it happened, but it did - hence my suggestion that maybe it should yell at me.

@freeformz
Copy link

@thockin Can you re-produce on a public repo that I can test with / base a test on?

@thockin
Copy link
Author

thockin commented Dec 2, 2015

I don't know HOW it happened, so I can't reproduce it. Obviously I can
manually recreate it by having a Godeps file with two pkgs of teh same git
repo at different hashes - you don't need me to set that up (but I will if
you want :)

On Wed, Dec 2, 2015 at 1:59 PM, Edward Muller notifications@github.com
wrote:

@thockin https://github.com/thockin Can you re-produce on a public repo
that I can test with / base a test on?


Reply to this email directly or view it on GitHub
#223 (comment).

@freeformz
Copy link

I assume this happened on a godep restore?

TBH: I'm more interested in how you got into that situation in the first case, which is what I'd like a reproducer for.

@thockin
Copy link
Author

thockin commented Dec 3, 2015

yeah, I have no idea how it happened - it may well have been a hand edit.
The issue was that it took FOREVER to figure out what was going wrong
because the tool knew but didn't offer any clues.

On Wed, Dec 2, 2015 at 2:44 PM, Edward Muller notifications@github.com
wrote:

I assume this happened on a godep restore?

TBH: I'm more interested in how you got into that situation in the first
case, which is what I'd like a reproducer for.


Reply to this email directly or view it on GitHub
#223 (comment).

@kr
Copy link
Member

kr commented Dec 4, 2015

@thockin is right tho, even though godep tries to avoid this situation, it's reasonable to also check for it later, because who knows what happened to the file in between.

@freeformz
Copy link

@thockin @kr agreed.

@freeformz freeformz self-assigned this Dec 4, 2015
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

3 participants