-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: major version without preceding tag must be v0, not v1 - breaks build of github.com/go-check #33546
Comments
Are you suggesting that we should remove that check, or are you suggesting that github.com/go-check should fix their versioning? |
I am suggesting that Go should remove that check or make that a warning. I am sure there are more libraries that are out there which don't follow this rule. |
Here is another but seems related build break: https://travis-ci.org/kmodules/monitoring-agent-api/jobs/569397065#L231
|
Sorry, this change is intentional. In Go 1.13, the Go command enforces pseudo-version validity more strictly. Among other reasons, this is necessary to prevent people from bypassing minimal version selection by using pseudo-versions like If an invalid version appears in a go.mod file you control, you can replace it with a commit or branch name. For example, change
to
then run If an invalid version appears in one of your dependencies (as is the case here), you can work around it with a
then run |
Note that these issues have already been fixed in their respective upstream repositories: It may require a bit of work to upgrade past the references to the invalid versions, but it should be possible — and you can patch them with |
What do you mean by invalid version? I am using Go 1.12.7 on my development machine. This is how I got that version number. I add the following line:
Then run Also, the original issue |
See https://tip.golang.org/doc/go1.13#version-validation.
If you already had an invalid version in your module cache with Go 1.12, then it would erroneously use that version to satisfy new dependencies in other modules too. See #27171 and #27173.
That is one of the many sub-cases of #27173. The |
@tamalsaha in the particular case of the Go code found in https://github.com/go-check/check, the canonical package import is
|
golang/go#33546 go: contrib.go.opencensus.io/exporter/[email protected] requires github.com/census-instrumentation/[email protected]: invalid pseudo-version: version before v0.1.0 would have negative patch number
I've got a repo with lots of modules and dependencies between those modules. I've also got a commit in the remote repo where versions in the I guess a If this is unexpected behavior I can provide more details. If this is expected behavior then maybe a clarification helps me and future GitHub issue readers to understand it better.
|
golang/go#33546 (comment) Also update tonistiigi/fsutil and golang.org/x/crypto Signed-off-by: Akihiro Suda <[email protected]>
… checked and report an error as discovered. See ticket golang/go#33546 for more info
See golang/go#33546 for more info.
just remove dependency module from go.mod ,and next update dependency it's ok 😄 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am running my tests against go:tip in Travis. This is breaking build for external library.
https://travis-ci.org/gomodules/cert/jobs/569425585
What did you expect to see?
I expect the build to not break. This can be a warning not an error.
What did you see instead?
$ go build ./...
go: github.com/appscode/[email protected] requires
github.com/flosch/[email protected] requires
github.com/go-check/[email protected]: invalid pseudo-version: major version without preceding tag must be v0, not v1
The text was updated successfully, but these errors were encountered: