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

cmd/go: invalid module: gopkg.in/inf.v0 should be .v0, not v1 (v1.9.1-gopkgin-v0.9.1) #31253

Closed
krasi-georgiev opened this issue Apr 4, 2019 · 4 comments

Comments

Projects
None yet
4 participants
@krasi-georgiev
Copy link

commented Apr 4, 2019

go1.12.1 linux/amd64

go test github.com/jaegertracing/jaeger/plugin/storage/badger/dependencystore -run ^(TestDependencyReader)$ 

go: github.com/gocql/gocql@v0.0.0-20180506184654-181004e14a3f: parsing go.mod: go.mod:6: invalid module: gopkg.in/inf.v0 should be .v0, not v1 (v1.9.1-gopkgin-v0.9.1)
go: error loading module requirements

@gopherbot gopherbot added this to the vgo milestone Apr 4, 2019

@andybons andybons changed the title x/vgo: invalid module: gopkg.in/inf.v0 should be .v0, not v1 (v1.9.1-gopkgin-v0.9.1) cmd/go: invalid module: gopkg.in/inf.v0 should be .v0, not v1 (v1.9.1-gopkgin-v0.9.1) Apr 4, 2019

@andybons andybons modified the milestones: vgo, Unplanned Apr 4, 2019

@andybons

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

I can reproduce the error; still investigating why it occurs. (I need to rebuild to pick up @jayconrod's new module-loader diagnostics!)

@bcmills

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

The error comes directly from an old version of github.com/gocql/gocql that does indeed specify an invalid version:
https://github.com/gocql/gocql/blob/611715ed8a5e3a3165dd2609e4e3c8ff7d0c774e/go.mod#L6

So the diagnostic message as reported is correct, and probably as precise as we can make it.

That version of github.com/gocql/gocql comes in by conversion of the existing jaeger/Gopkg.lock:
https://github.com/jaegertracing/jaeger/blob/7da22606eccbb4246f7cd2f3871ec6b491257b68/Gopkg.lock#L303

To fix jaegertracing/jaeger, it suffices to remove and re-resolve the gocql dependency:

jaeger$ go1.12.1 mod init github.com/jaegertracing/jaeger
go: creating new go.mod: module github.com/jaegertracing/jaeger
go: copying requirements from Gopkg.lock

jaeger$ go1.12.1 mod edit -droprequire=github.com/gocql/gocql

jaeger$ go1.12.1 mod tidy
go: finding github.com/onsi/ginkgo/extensions/table latest
go: finding github.com/prashantv/protectmem latest
go: finding github.com/streadway/quantile latest
go: finding github.com/bmizerany/perks/quantile latest
go: finding github.com/onsi/ginkgo/extensions latest
go: finding github.com/bmizerany/perks latest
go: finding github.com/gocql/gocql latest
go: finding github.com/bitly/go-hostpool latest
go: finding github.com/bmizerany/assert latest

jaeger$ go1.12.1 build ./...

jaeger$

This is somewhat related to #26454 and #30831, in that it should be possible to upgrade past the error (using go get github.com/gocql/gocql@latest) rather than removing and re-resolving the dependency. Today that does not work, because the error in resolving the initial gopkg.in/inf.v0 causes the whole operation to fail before the upgrades are attempted.

@bcmills

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

Closing as a duplicate of #30831: the symptoms are a bit different, but the underlying pathology (having an existing bad dependency and not being able to upgrade out of it) will probably be fixed by the same set of changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.