-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vgo: confused by shortened version tags (v1, v1.1) during find of latest #24476
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
Comments
Bonus PointsDo not require dependencies to be semantically versioned. |
Now I found a similiar issue #23954 which proposes to use this workaround:
Usually one has no control over the versioning scheme that is used in the dependencies so it would really limit the usability of |
This also appears to effect things that don't have 3 version numbers, i.e. github.com/go-sql-driver/mysql tags "v1.3", then vgo will search for "v1.3.0" and get a 404 from github.
|
This should be fixed. I think vgo should just completely ignore non-canonical semver tags (v1 or v1.0 instead of v1.0.0) in repos. |
Change https://golang.org/cl/104676 mentions this issue: |
Change https://golang.org/cl/104855 mentions this issue: |
Change https://golang.org/cl/107659 mentions this issue: |
This appears to not be fixed. Reopen until https://golang.org/cl/107659 is submitted? |
We insist that semver tags in repos be fully spelled out, as required by semver: v1.2.0, not v1.2. In other places, like go.mod, we do allow saying v1.2 as shorthand for v1.2.0. Don't confuse the issue by reporting a "v1.2" tag in the version list, since it's unaddressable. (If you type v1.2 vgo will look for v1.2.0.) Similarly, don't report tags that don't match the module path, and don't report tags that look like pseudo-versions. Additional fix for golang/go#23954, golang/go#24476. Change-Id: Iaac0fb36362b25e5faef5271c110d432ec04bc8b Reviewed-on: https://go-review.googlesource.com/107659 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10 linux/amd64 vgo:2018-02-20.1
Does this issue reproduce with the latest release?
Latest
vgo
release is installed.What operating system and processor architecture are you using (
go env
)?What did you do?
Here is a minimal example application that triggers the error:
First, create an empty
go.mod
file to get it populated byvgo
on the first run:touch go.mod
.Second, build the application:
$ vgo build vgo-non-semantic-version-issue.go vgo: resolving import "github.com/coreos/go-systemd/activation" vgo: finding github.com/coreos/go-systemd (latest) vgo: adding github.com/coreos/go-systemd v1
Everything is fine, application was build successfully but the generated
mod.go
refers to a non-existing git tag:A second build will now fail with a non-descriptive error message:
What did you expect to see?
An error message like
or something alike.
What did you see instead?
See above.
PS: I looked for a similar issue but couldn't find one so I opened this issue.
The text was updated successfully, but these errors were encountered: