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
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@krasi-georgiev
Copy link

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 added modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 4, 2019
@andybons andybons modified the milestones: vgo, Unplanned Apr 4, 2019
@andybons
Copy link
Member

andybons commented Apr 4, 2019

@bcmills @jayconrod

@bcmills
Copy link
Contributor

bcmills 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
Copy link
Contributor

bcmills 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
Copy link
Contributor

bcmills 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants