-
Notifications
You must be signed in to change notification settings - Fork 1k
panic on gopkg.in .v0 imports #933
Comments
The problems stem from this:
|
Yeah we don't handle gopkg.in perfectly yet. Originally reported in #776 (comment) |
hi! thanks for the issue report. so the quote from labix is related, but the real issue here is that the guarantees gopkg.in tries to create don't translate terribly well to a dep world. as a result, we had to implement a layer for mapping the semantics gopkg.in creates into dep's model. dep actually never talks to gopkg.in servers at all - it more or less reimplements the server protocol locally. this issue is one we've seen a few times (as @carolynvs noted) - i actually thought we'd fixed it, but apparently not. basically, the problem is that the handling we wrote sometimes allows a zero-length list of versions to come back, and the solver expects an invariant that, if a source exists, there is at least one version for it. |
Argh, I tried searching for a similar issue, feel a bit silly for missing the one @carolynvs surfaced. Considering what Could either of you give me an indication of where in the code I can start looking? For now I've just changed my import paths to avoid the |
don't worry about it 😄
i do think what gopkg.in offers will likely be subsumed by dep eventually, but our job is 💯 to make this process as smooth as possible. so, we do things like this!
Sure! the bug's somewhere in here. |
Do you have any suggestion as to how to trigger it? I was hoping to just pop into Gogland/IntelliJ and fire it up but that doesn't work, as I need to run that code from a different directory entirely. CLI dlv is pretty much voodoo to me 😞. |
Never mind, figured it out, I can set a working directory in the run configurations to a location that'll cause |
Alright, so stepping through this, a few tidbits that might be informative. It manages to determine the commit alright,
The
Eventually we step in and hit the
So far this seems to make sense to me and What I'm a bit surprised at now though is that As a consequence I'm not quite sure if this helps? I think the trick here is probably that if you end up with a |
💯 - returning zero-length list is definitely the cause of the panic
it's fine to have semver versions with leading zeroes, and if such tags do exist, we should be letting them through. so, it's not quite as simple as just "fall back to master" - but that is the action of last resort. |
I agree that if semver tags of How do you suppose we could fix this? Knowing how to treat this seems to require knowing if any |
IIRC from when i last looked (maybe six months ago?), gopkg.in treats
oh, that part's easy 😄 the full, unfiltered list from github is what's returned from the first line: ovlist, err := s.gitSource.listVersions(ctx) we never actually talk to a gopkg.in server, at all - we jump straight to github, so we can do the remapping cleanly. |
i'd swear we got this fixed? |
Doesn't look like it:
|
yep, confirm it isn't fixed. just happened to me with the |
I think the original bug (can't find it right now) was marked as fixed with the missing HEAD PR? Looking into this today. UPDATE: Found the original #776 (comment), I did verify the fix so I'm going to check for a regression or other edge case. |
What version of Go (
go version
) anddep
(git describe --tags
) are you using?What
dep
command did you run?dep init -v
What did you expect to see?
An error informing me that
.v0
URLs aren't really useful and just use https://github.com/go-ldap/ldif directly or it working as expected.What did you see instead?
A panic.
Reproduce:
The text was updated successfully, but these errors were encountered: