Skip to content
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

x/vgo: failure to download when tag does not contain patch version #24024

Closed
zeebo opened this issue Feb 22, 2018 · 5 comments

Comments

@zeebo
Copy link
Contributor

commented Feb 22, 2018

What version of Go are you using (go version)?

go version go1.10 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

darwin, amd64

What did you do?

ran vgo test all in a module that depends on github.com/stretchr/objx

What did you expect to see?

Tests running.

What did you see instead?

vgo: finding github.com/stretchr/objx v0.1.0
vgo: github.com/stretchr/objx v0.1.0: unexpected status (https://api.github.com/repos/stretchr/objx/git/refs/tags/v0.1.0): 404 Not Found
vgo: finding github.com/stretchr/objx v0.1.0
vgo: github.com/stretchr/objx v0.1.0: unexpected status (https://api.github.com/repos/stretchr/objx/git/refs/tags/v0.1.0): 404 Not Found
vgo: unexpected status (https://api.github.com/repos/stretchr/objx/git/refs/tags/v0.1.0): 404 Not Found

I believe this is caused by the repo having a v0.1 tag, which ends up parsed as v0.1.0 internally, and it doesn't keep the original tag string, or something.

@henderjon

This comment has been minimized.

Copy link

commented Feb 22, 2018

Same here. Same details.

[edit]
If I delete the entire line for the dependency that is improperly tagged from the go.mod file, vgo vendor will rebuild the go.mod file with the shortened tag (e.g. v1.2). However, running vgo build or vgo vendor a second time will re-rebuild the go.mod but add the .PATCH digit thereby triggering the error mentioned above.

@henderjon

This comment has been minimized.

Copy link

commented Feb 22, 2018

This has me stuck in dependency purgatory.

How do I tell vgo to use a commit hash instead of a tag? Do I need to suss out the timestamp of the commit and just shoehorn v0.0.0-$TIMESTAMP-$COMMITHASH into the go.mod file?

@zeebo

This comment has been minimized.

Copy link
Contributor Author

commented Feb 22, 2018

That was my workaround. It seemed to be fine. I don't believe the timestamp has to match the commit hash, either. But getting it close is probably a good idea to make updates work better.

@henderjon

This comment has been minimized.

Copy link

commented Feb 22, 2018

For those coming after us.

vgo seems to ignore the timestamp(?) as any 14 digit number between the v0.0.0- and the -$COMMITHASH seems to appease vgo.

@zeebo

This comment has been minimized.

Copy link
Contributor Author

commented Feb 22, 2018

Actually this looks like a dupe of #23954, so I'll close this in favor of that.

@zeebo zeebo closed this Feb 22, 2018

@golang golang locked and limited conversation to collaborators Feb 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.