-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: incorrect pseudo-versions for merge commits #29798
Comments
The package main
import "github.com/SermoDigital/jose/jwt"
func main() {
var _ jwt.JWT
} and I do not see the behavior here:
Other than "the other go.mod file has many more deps and is more complicated" I can't figure out why I would see different behavior given the same set of commands and revisions for the same dep. |
+1 Having exactly the same issue. This can be really painful in my case since CIs are dependent on the fact that dependencies are located in versioned directories, so extracting them to another format break things. |
You are running into two separate issues here. One is #27171: for some reason, your module cache maps commit The other issue is that you have a dependency on Once the dependency on
|
Are you able to reproduce this issue using a clean module cache ( If so, could you post the output of |
I'll give it a try with a wiped module cache. However, one problem with your analysis:
The issue here is that go mod is assuming that 0.9.1 is in fact newer than |
I can confirm that with a cleaned modcache this works. I have no idea how it got unclean, but...there you go. I'll close the bug -- thanks for the response! |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. Tested on 1.11.4 and tried with 1.12-beta2.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
When trying to convert a large program from govendor to go modules, I'm seeing behavior where many of the dependencies are being overwritten after I set them; a version using a git commit will be overwritten by the latest tag, even if that latest tag is extremely old.
Invoking any
go
command causes this overwriting.This only seems to affect specified revisions that are merge commits (as in, the product of a PR merge). When the merge commit is used the version is
v0.0.0-<timestamp>-<revision>
. When I use the non-merge commit, it shows up withv0.9.2-<timestamp>-<revision>
.What did you expect to see?
Once I set a version, it is left alone.
What did you see instead?
(You can follow along in the
gomodtry2
branch ingithub.aaakk.us.kg/hashicorp/vault
if you like)The text was updated successfully, but these errors were encountered: