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

unexpected module path "golang.org/x/lint" using go.mod - no problems using otherwise #2700

Closed
adriendomoison opened this issue Mar 20, 2019 · 8 comments

Comments

@adriendomoison
Copy link

Running go version go1.12.1 darwin/amd64 on MacOS 10.14.2

I'm trying to install grpc using go.mod but I get stuck on the lint package

go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
go get: error loading module requirements

Here is the full install

$> go get -u google.golang.org/grpc
go: finding github.com/golang/glog latest
go: finding github.com/golang/protobuf v1.3.1
go: finding golang.org/x/sync latest
go: finding golang.org/x/lint latest
go: finding google.golang.org/genproto latest
go: finding golang.org/x/net latest
go: finding honnef.co/go/tools latest
go: finding golang.org/x/oauth2 latest
go: finding golang.org/x/tools latest
go: finding cloud.google.com/go v0.37.1
go: finding golang.org/x/tools v0.0.0-20190311212946-11955173bddd
go: finding golang.org/x/exp latest
go: finding golang.org/x/crypto latest
go: finding golang.org/x/sys v0.0.0-20190312061237-fead79001313
go: finding golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6
go: finding golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846
go: finding github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802
go: finding golang.org/x/build v0.0.0-20190314133821-5284462c4bec
go: finding golang.org/x/image v0.0.0-20190227222117-0694c2d4d067
go: finding github.com/BurntSushi/xgb latest
go: finding golang.org/x/time latest
go: finding github.com/google/pprof latest
go: finding golang.org/x/build latest
go: finding github.com/google/btree latest
go: finding github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024
go: finding google.golang.org/api v0.2.0
go: finding github.com/jstemmer/go-junit-report latest
go: finding golang.org/x/tools v0.0.0-20190312170243-e65039ee4138
go: finding golang.org/x/mobile latest
go: finding golang.org/x/image latest
go: finding golang.org/x/sys latest
go: finding github.com/openzipkin/zipkin-go v0.1.6
go: finding github.com/coreos/go-systemd latest
go: finding github.com/grpc-ecosystem/grpc-gateway v1.8.5
go: finding github.com/beorn7/perks latest
go: finding github.com/tarm/serial latest
go: finding github.com/googleapis/gax-go/v2 v2.0.4
go: finding github.com/prometheus/client_model latest
go: finding github.com/jellevandenhooff/dkim latest
go: finding github.com/prometheus/procfs latest
go: finding golang.org/x/perf latest
go: finding github.com/flynn/go-shlex latest
go: finding github.com/gregjones/httpcache latest
go: finding github.com/anmitsu/go-shlex latest
go: finding github.com/onsi/gomega v1.5.0
go: finding github.com/kr/pty v1.1.4
go: finding go4.org latest
go: finding github.com/bradfitz/go-smtpd latest
go: finding github.com/eapache/go-xerial-snappy latest
go: finding gopkg.in/tomb.v1 latest
go: finding github.com/mwitkow/go-conntrack latest
go: finding github.com/gogo/protobuf v1.2.0
go: finding gopkg.in/check.v1 latest
go: finding github.com/alecthomas/template latest
go: finding grpc.go4.org latest
go: finding github.com/alecthomas/units latest
go: finding github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9
go: finding github.com/golang/lint latest
go: finding google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96
go: finding github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82
go: finding github.com/kr/logfmt latest
go: finding google.golang.org/api v0.0.0-20170206182103-3d017632ea10
go: finding github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0
go: finding cloud.google.com/go v0.0.0-20170206221025-ce650573d812
go: finding github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e
go: finding github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190129172621-c8b1d7a94ddf
go: finding github.com/rcrowley/go-metrics latest
go: finding github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9
go: finding github.com/mattn/go-sqlite3 v0.0.0-20161215041557-2d44decb4941
go: finding golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382
go: finding github.com/gonum/internal v0.0.0-20181124074243-f884aa714029
go: finding github.com/gonum/floats latest
go: finding github.com/aclements/go-moremath v0.0.0-20161014184102-0ff62e0875ff
go: finding github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac
go: finding github.com/GoogleCloudPlatform/cloudsql-proxy latest
go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
go get: error loading module requirements

The package itself fails alone:

$ go get github.com/golang/lint
go: finding github.com/golang/lint latest
go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
go: error loading module requirements

I don't have the issue if I run it outside of my repository with go.mod

$> go get -u google.golang.org/grpc
$>

Any ideas?

@aofei
Copy link

aofei commented Mar 20, 2019

This problem has been fixed in 7c93bdf. You just have to wait for the next version to be released.

Edit: It hasn't been fixed.

@adriendomoison
Copy link
Author

Sorry, the titles were very different. So what can we do in the meantime? Any workaround or waiting is the only option if we want to use go.mod? Any ETA? Thanks!

@aofei
Copy link

aofei commented Mar 21, 2019

@adriendomoison

Here's a workaround for you: run go get google.golang.org/[email protected] for the time being.

It should be noted, your go get -u google.golang.org/grpc's -u will lead the Go modules to try to update all related dependencies (not just grpc/grpc-go).

@menghanl
Copy link
Contributor

Note that release 1.19.1 doesn't have the fix (7c93bdf) that @aofei mentioned.

If I understand correctly, the fix is actually 6572a80, which was in 1.17.0.
The problem is that, all packages that depend on gRPC need to upgrade gRPC past 1.17.0, so go mod won't see the wrong package (golang/lint).

@adriendomoison
Copy link
Author

adriendomoison commented Mar 22, 2019

Thanks! It looks like the transition to go.mod for the go community, in general, is not going to be easy... 😬

@dfawley
Copy link
Member

dfawley commented Mar 22, 2019

I don't think there's anything we can do for this, unfortunately.

@jeanbza
Copy link
Member

jeanbza commented Apr 8, 2019

For anyone still running into this problem - this has been fixed. For whichever you depend on, please use:

  • cloud.google.com/go v0.37.4
  • google.golang.org/api v0.3.2
  • go.opencensus.io v0.20.1

@lock lock bot locked as resolved and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants