-
Notifications
You must be signed in to change notification settings - Fork 1k
Why is there a difference between sources by go get
and dep ensure
.
#1400
Comments
Sorry, it's issue of the go-git. |
It's strange after all. My Gopkg.toml:
When I run
Why is the versions are traced in the sequence of rc9, rc8, rc7...? |
@kyoh86 hi, thanks for opening an issue. I'm trying to reproduce it but it seems to work as expected. Can you verify you have I can answer your other question about the sequence. Since I'm not sure if there's a way to handle this because depending on the projects, their pre-release tag name formats would be different. |
When I view http://gopkg.in/src-d/go-git.v4 in a browser I see that the |
Also, I ran into this when I did a |
this occurs because of a fundamental and irreconcilable mismatch between how gopkg.in and dep model the problem space: gopkg.in considers either branches or tags as candidates, and mostly sticks to semver. dep considers every possible branch and tag, but visits them in a particular order, and only tags can qualify as semver and therefore come up first; branches, even if named as strictly valid semver, are still just visited alphabetically. so, concretely: dep chooses to visit the |
I tried to reproduce it in https://github.com/kyoh86/dep-tryout, and I can do it.
If you want to do it, please clone the repository, and do
In semver.org, a following rule is described.
First, gopkg.in/src-d/go-git.v4 is mistaken a rule of the semver. wrong: Did I get that right? Second, I know that dep cannot prefer rc9 to rc10. But can the dep prefer rc.9 to rc.10...?
Branches are not for managing versions. dep SHOULD prefer tags to branches, I think so. |
I'm able to reproduce the issue with the provided repo. Idk what I did the last time that I couldn't reproduce it. Until the pre-release tag format is fixed, you can use
dep prefers rc.10 to rc.9 (rc.9 < rc.10), which is the expected order (newer greater). We have a test for it in version_test.go. To validate this behavior, I added 3 versions in that test (v3.0.1-alpha.1, v3.0.1-alpha.2, v3.0.1-alpha.3), not in correct order. Running |
What version of
dep
are you using (dep version
)?What
dep
command did you run?What did you expect to see?
What did you see instead?
What's difference???
The text was updated successfully, but these errors were encountered: