Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

Unexpected module path #436

Closed
bill-rich opened this issue Feb 27, 2019 · 56 comments
Closed

Unexpected module path #436

bill-rich opened this issue Feb 27, 2019 · 56 comments
Labels

Comments

@bill-rich
Copy link

Unable to fetch golang/lint because of unexpected module path error.

go get -u golang.org/x/lint
go: finding golang.org/x/lint latest
go: finding golang.org/x/sync latest
go: finding google.golang.org/genproto latest
go: finding golang.org/x/net latest
go: finding github.com/golang/glog latest
go: finding golang.org/x/tools latest
go: finding github.com/golang/lint latest
go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
go: finding golang.org/x/exp latest
go: finding golang.org/x/oauth2 latest
go: finding honnef.co/go/tools latest
go: finding golang.org/x/sys latest
go get: error loading module requirements
@arbarlow
Copy link

arbarlow commented Feb 27, 2019

I have just noticed this too, seem the go.mod added just recently has broken this? @matloob

@michaelandersen
Copy link

x-lint

Same here. Failing download of x/lint. Worked 4 hours ago.

@matloob
Copy link
Contributor

matloob commented Feb 27, 2019

@heschik

Oh I was looking at this very issue just now..

It seems that somehow golang.org/x/lint is being imported by someone as github.com/golang/lint (its former import path). golang.org/x/lint now has a "//import" comment, so it shouldn't even build with that import path.

I saw this in x/exp. I'm wondering if you can share which module you're seeing this in

@kourtni
Copy link

kourtni commented Feb 27, 2019

Hi,

I'm also seeing this error. I'm trying to generate a go.mod file for a project I'm working on. However it is failing with:

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

We don't directly depend on the golang linter, so not certain how I can get beyond this issue.

@alde
Copy link

alde commented Feb 27, 2019

I saw this in x/exp. I'm wondering if you can share which module you're seeing this in

I see the same thing, and grep-ing from my old vendor folder I have no imports matching that.

Trying to move https://github.com/alde/ale from glide to mod

@matloob
Copy link
Contributor

matloob commented Feb 27, 2019

@dmitshur to see if he has ideas

@kpurdon
Copy link

kpurdon commented Feb 27, 2019

I'm seeing this as well, let me know if I can provide any additional debug info. For now here is my require list from go.mod:

require (
	github.com/BurntSushi/toml v0.3.1 // indirect
	github.com/DATA-DOG/go-txdb v0.1.2
	github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 // indirect
	github.com/go-sql-driver/mysql v1.4.0 // indirect
	github.com/lib/pq v1.0.0
	github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2
	github.com/sirupsen/logrus v1.3.0
	github.com/spf13/viper v1.3.1
	github.com/streadway/amqp v0.0.0-20190214183023-884228600bc9
	github.com/stretchr/testify v1.3.0
)

@dmitshur
Copy link
Contributor

I can reproduce this in an empty module, using Go 1.12:

$ export GO111MODULE=on
$ cd $(mktemp -d)
$ go mod init foobar
$ go get -u golang.org/x/lint
go: finding golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961
go: finding golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
go: finding golang.org/x/net v0.0.0-20190227160552-c95aed5357e7
go: finding github.com/golang/protobuf v1.3.0
go: finding golang.org/x/tools v0.0.0-20190227180812-8dcc6e70cdef
go: finding google.golang.org/genproto v0.0.0-20190226184841-fc2db5cae922
go: finding golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
go: finding github.com/golang/lint v0.0.0-20190227174305-5b3e6a55c961
go: finding golang.org/x/exp v0.0.0-20190221220918-438050ddec5e
go: finding google.golang.org/grpc v1.19.0
go: finding golang.org/x/sys v0.0.0-20190226215855-775f8194d0f9
go: finding honnef.co/go/tools v0.0.0-20190215041234-466a0476246c
go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
go: finding github.com/google/pprof v0.0.0-20190226225141-b51a6544410d
go get: error loading module requirements
$ echo $?
1

@dmitshur
Copy link
Contributor

For those who are running into this, are you running go get -u? Does it work successfully if you leave out -u and run just go get?

@arbarlow
Copy link

I'm running go get -u, with a different library as it happens, but I think that is updating golang.org/x/lint anyway

@SVilgelm
Copy link

14:41:03$ golint -set_exit_status -min_confidence 0.81 ./pkg/...
-bash: golint: command not found

14:41:11$ go get golang.org/x/lint/golint
go: finding golang.org/x/lint/golint latest
go: finding golang.org/x/lint latest

14:41:19$ golint -set_exit_status -min_confidence 0.81 ./pkg/...

14:41:48$ rm -rf ~/go/src/golang.org/x/lint/ ~/go/bin/golint

14:41:56$ golint -set_exit_status -min_confidence 0.81 ./pkg/...
-bash: /Users/svilgelm/go/bin/golint: No such file or directory

14:41:59$ go get -u golang.org/x/lint/golint
go: finding golang.org/x/lint/golint latest
go: finding golang.org/x/lint latest
go: finding golang.org/x/sync latest
go: finding golang.org/x/net latest
go: finding golang.org/x/tools latest
go: finding google.golang.org/genproto latest
go: finding github.com/golang/glog latest
go: finding github.com/golang/lint latest
go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
go: finding honnef.co/go/tools latest
go: finding golang.org/x/exp latest
go: finding golang.org/x/oauth2 latest
go: finding golang.org/x/sys latest
go get: error loading module requirements

14:42:17$ golint -set_exit_status -min_confidence 0.81 ./pkg/...
-bash: /Users/svilgelm/go/bin/golint: No such file or directory

@kpurdon
Copy link

kpurdon commented Feb 27, 2019

In a clean docker build I see a failure on an empty module w/ -u and success without -u

with -u

docker run -it --rm golang:1.12 sh -c "GO111MODULE=on mkdir /tmp/foo && cd /tmp/foo && go mod init foo && go get -u golang.org/x/lint"
go: creating new go.mod: module foo
go: finding golang.org/x/lint latest
go: finding golang.org/x/tools v0.0.0-20190226205152-f727befe758c
go: finding golang.org/x/tools latest
go: finding golang.org/x/net v0.0.0-20190213061140-3a22650c66bd
go: finding golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
go: finding google.golang.org/appengine v1.4.0
go: finding golang.org/x/sync latest
go: finding golang.org/x/net v0.0.0-20180724234803-3673e40ba225
go: finding github.com/golang/protobuf v1.2.0
go: finding golang.org/x/text v0.3.0
go: finding github.com/golang/protobuf v1.3.0
go: finding golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
go: finding golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
go: finding google.golang.org/genproto v0.0.0-20180831171423-11092d34479b
go: finding golang.org/x/net latest
go: finding google.golang.org/genproto latest
go: finding golang.org/x/net v0.0.0-20181106065722-10aee1819953
go: finding golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52
go: finding golang.org/x/lint v0.0.0-20180702182130-06c8688daad7
go: finding google.golang.org/grpc v1.16.0
go: finding golang.org/x/exp v0.0.0-20190121172915-509febef88a4
go: finding honnef.co/go/tools v0.0.0-20180728063816-88497007e858
go: finding google.golang.org/grpc v1.19.0
go: finding google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8
go: finding golang.org/x/net v0.0.0-20180826012351-8a410e7b638d
go: finding github.com/kisielk/gotool v1.0.0
go: finding github.com/client9/misspell v0.3.4
go: finding github.com/golang/lint v0.0.0-20180702182130-06c8688daad7
go: finding github.com/golang/mock v1.1.1
go: finding golang.org/x/sys v0.0.0-20180830151530-49385e6e1522
go: finding golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
go: finding cloud.google.com/go v0.26.0
go: finding honnef.co/go/tools latest
go: finding google.golang.org/appengine v1.1.0
go: finding github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: finding github.com/golang/mock v1.2.0
go: finding golang.org/x/tools v0.0.0-20190114222345-bf090417da8b
go: finding golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3
go: finding honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099
go: finding github.com/BurntSushi/toml v0.3.1
go: finding github.com/golang/lint latest
go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
go get: error loading module requirements

without -u

docker run -it --rm golang:1.12 sh -c "GO111MODULE=on mkdir /tmp/foo && cd /tmp/foo && go mod init foo && go get golang.org/x/lint"
go: creating new go.mod: module foo
go: finding golang.org/x/lint latest
go: finding golang.org/x/tools v0.0.0-20190226205152-f727befe758c
go: finding golang.org/x/net v0.0.0-20190213061140-3a22650c66bd
go: finding golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
go: finding google.golang.org/appengine v1.4.0
go: finding golang.org/x/net v0.0.0-20180724234803-3673e40ba225
go: finding github.com/golang/protobuf v1.2.0
go: finding golang.org/x/text v0.3.0
go: downloading golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961
go: extracting golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961
go: downloading golang.org/x/tools v0.0.0-20190226205152-f727befe758c
go: extracting golang.org/x/tools v0.0.0-20190226205152-f727befe758c

Prativa20 added a commit to vmware-archive/legacy-terraform-provider-vra7 that referenced this issue Feb 27, 2019
@matloob
Copy link
Contributor

matloob commented Feb 27, 2019

@bcmills: any ideas?

@matloob
Copy link
Contributor

matloob commented Feb 27, 2019

We're going to look into whether we can figure out what's going on. If we can't find any leads in a couple of days, we'll revert the change that added the go.mod file. But hopefully we don't need to.

@kpurdon
Copy link

kpurdon commented Feb 27, 2019

FWIW this bug actually made me check myself on the copy/paste of -u from the README, which is something I don't actually want to be doing in CI. So, thanks for the bug? =)

Let me know if there is any additional debugging I can do or information I can provide.

@michaelandersen
Copy link

michaelandersen commented Feb 27, 2019

Looks like it's fixed: googleapis/go-genproto#144..

sorry too soon :)

@kernle32dll
Copy link

kernle32dll commented Feb 27, 2019

Appending the current result of @kpurdon docker command. It has become much much longer in the past 2 hours. That looks awfully like a circle-import of grand scheme.

$ docker run -it --rm golang:1.12 sh -c "GO111MODULE=on mkdir /tmp/foo && cd /tmp/foo && go mod init foo && go get -u golang.org/x/lint"
go: creating new go.mod: module foo
go: finding golang.org/x/lint latest
go: finding golang.org/x/tools v0.0.0-20190226205152-f727befe758c
go: finding golang.org/x/tools latest
go: finding golang.org/x/net v0.0.0-20190213061140-3a22650c66bd
go: finding golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
go: finding google.golang.org/appengine v1.4.0
go: finding golang.org/x/sync latest
go: finding golang.org/x/net v0.0.0-20180724234803-3673e40ba225
go: finding github.com/golang/protobuf v1.2.0
go: finding golang.org/x/text v0.3.0
go: finding github.com/golang/protobuf v1.3.0
go: finding golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
go: finding golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
go: finding google.golang.org/genproto v0.0.0-20180831171423-11092d34479b
go: finding golang.org/x/net latest
go: finding google.golang.org/genproto latest
go: finding golang.org/x/exp v0.0.0-20190121172915-509febef88a4
go: finding google.golang.org/grpc v1.19.0
go: finding honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099
go: finding honnef.co/go/tools latest
go: finding golang.org/x/net v0.0.0-20180826012351-8a410e7b638d
go: finding google.golang.org/appengine v1.1.0
go: finding google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8
go: finding github.com/BurntSushi/toml v0.3.1
go: finding github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: finding github.com/golang/mock v1.1.1
go: finding golang.org/x/tools v0.0.0-20190114222345-bf090417da8b
go: finding golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3
go: finding golang.org/x/sys v0.0.0-20180830151530-49385e6e1522
go: finding github.com/client9/misspell v0.3.4
go: finding golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
go: finding cloud.google.com/go v0.26.0
go: finding golang.org/x/oauth2 latest
go: finding cloud.google.com/go v0.34.0
go: finding golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
go: finding golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
go: finding github.com/golang/mock v1.2.0
go: finding github.com/golang/glog latest
go: finding golang.org/x/exp latest
go: finding cloud.google.com/go v0.36.0
go: finding golang.org/x/sys latest
go: finding golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890
go: finding google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922
go: finding golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2
go: finding google.golang.org/grpc v1.17.0
go: finding github.com/google/martian v2.1.0+incompatible
go: finding github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57
go: finding github.com/google/go-cmp v0.2.0
go: finding github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c
go: finding github.com/googleapis/gax-go/v2 v2.0.3
go: finding golang.org/x/time v0.0.0-20181108054448-85acf8d2951c
go: finding go.opencensus.io v0.18.0
go: finding google.golang.org/api v0.1.0
go: finding golang.org/x/time latest
go: finding golang.org/x/lint v0.0.0-20180702182130-06c8688daad7
go: finding golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d
go: finding golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b
go: finding honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a
go: finding golang.org/x/net v0.0.0-20181106065722-10aee1819953
go: finding honnef.co/go/tools v0.0.0-20180728063816-88497007e858
go: finding golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52
go: finding google.golang.org/grpc v1.16.0
go: finding github.com/google/btree latest
go: finding go.opencensus.io v0.19.0
go: finding google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf
go: finding github.com/ghodss/yaml v1.0.0
go: finding github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910
go: finding github.com/golang/lint v0.0.0-20180702182130-06c8688daad7
go: finding github.com/matttproud/golang_protobuf_extensions v1.0.1
go: finding github.com/prometheus/client_model latest
go: finding github.com/kisielk/gotool v1.0.0
go: finding github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e
go: finding github.com/openzipkin/zipkin-go v0.1.1
go: finding github.com/grpc-ecosystem/grpc-gateway v1.5.0
go: finding github.com/openzipkin/zipkin-go v0.1.5
go: finding golang.org/x/build latest
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/golang/lint latest
go: finding github.com/stretchr/testify v1.2.2
go: finding github.com/grpc-ecosystem/grpc-gateway v1.7.0
go: finding github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50
go: finding github.com/prometheus/common v0.2.0
go: finding golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
go: finding github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973
go: finding github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86
go: finding github.com/stretchr/testify v1.3.0
go: finding github.com/shurcooL/htmlg latest
go: finding github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: finding dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0
go: finding github.com/beorn7/perks latest
go: finding github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4
go: finding github.com/neelance/astrewrite latest
go: finding github.com/prometheus/client_golang v0.8.0
go: finding github.com/google/pprof latest
go: finding github.com/google/go-querystring v1.0.0
go: finding git.apache.org/thrift.git v0.0.0-20181218151757-9b75e4fe745a
go: finding github.com/flynn/go-shlex latest
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding dmitri.shuralyov.com/html/belt latest
go: finding github.com/go-kit/kit v0.8.0
go: finding gopkg.in/inf.v0 v0.9.1
go: finding github.com/prometheus/client_golang v0.9.2
go: finding github.com/shurcooL/component latest
go: finding github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133
go: finding google.golang.org/appengine v1.3.0
go: finding github.com/shurcooL/webdavfs latest
go: finding honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3
go: finding github.com/go-logfmt/logfmt v0.3.0
go: finding github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537
go: finding github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1
go: finding github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95
go: finding github.com/go-logfmt/logfmt v0.4.0
go: finding github.com/shurcooL/sanitized_anchor_name v1.0.0
go: finding github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a
go: finding google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2
go: finding github.com/eapache/go-resiliency v1.1.0
go: finding github.com/shurcooL/users latest
go: finding github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470
go: finding github.com/prometheus/common v0.0.0-20181218105931-67670fe90761
go: finding cloud.google.com/go v0.31.0
go: finding github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d
go: finding github.com/prometheus/procfs latest
go: finding dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412
go: finding github.com/shurcooL/github_flavored_markdown latest
go: finding grpc.go4.org v0.0.0-20170609214715-11d0a25b4919
go: finding github.com/coreos/go-systemd latest
go: finding github.com/grpc-ecosystem/grpc-gateway v1.6.2
go: finding cloud.google.com/go v0.33.1
go: finding github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9
go: finding github.com/gogo/protobuf v1.1.1
go: finding dmitri.shuralyov.com/service/change latest
go: finding github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
go: finding github.com/shurcooL/httpgzip latest
go: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
go: finding golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852
go: finding golang.org/x/perf latest
go: finding github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223
go: finding github.com/gogo/protobuf v1.2.1
go: finding github.com/mwitkow/go-conntrack latest
go: finding github.com/prometheus/client_golang v0.9.1
go: finding gopkg.in/check.v1 latest
go: finding github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc
go: finding github.com/golang/snappy v0.0.1
go: finding github.com/go-stack/stack v1.8.0
go: finding google.golang.org/genproto v0.0.0-20181109154231-b5d43981345b
go: finding golang.org/x/sys v0.0.0-20181218192612-074acd46bca6
go: finding github.com/gorilla/context v1.1.1
go: finding github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191
go: finding grpc.go4.org latest
go: finding golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e
go: finding google.golang.org/api v0.0.0-20181030000543-1d582fd0359e
go: finding github.com/alecthomas/template latest
go: finding github.com/eapache/queue v1.1.0
go: finding golang.org/x/net v0.0.0-20181114220301-adae6a3d119a
go: finding github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7
go: finding github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c
go: finding github.com/gopherjs/gopherjs latest
go: finding dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3
go: finding github.com/russross/blackfriday v1.5.2
go: finding github.com/shurcooL/issues latest
go: finding golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5
go: finding github.com/gorilla/mux v1.6.2
go: finding github.com/gregjones/httpcache latest
go: finding github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20
go: finding github.com/shurcooL/gopherjslib latest
go: finding github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
go: finding github.com/shurcooL/highlight_go latest
go: finding github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82
go: finding github.com/gorilla/mux v1.7.0
go: finding github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625
go: finding github.com/tarm/serial latest
go: finding github.com/dustin/go-humanize v1.0.0
go: finding github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a
go: finding github.com/bradfitz/go-smtpd latest
go: finding github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d
go: finding github.com/russross/blackfriday v2.0.0+incompatible
go: finding github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21
go: finding github.com/shurcooL/gofontwoff latest
go: finding github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239
go: finding github.com/eapache/go-xerial-snappy latest
go: finding dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c
go: finding github.com/shurcooL/reactions latest
go: finding github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9
go: finding github.com/anmitsu/go-shlex latest
go: finding github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d
go: finding github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273
go: finding github.com/googleapis/gax-go v2.0.0+incompatible
go: finding github.com/rcrowley/go-metrics latest
go: finding golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
go: finding google.golang.org/grpc v1.14.0
go: finding dmitri.shuralyov.com/state latest
go: finding github.com/gliderlabs/ssh v0.1.1
go: finding github.com/googleapis/gax-go v2.0.2+incompatible
go: finding github.com/sergi/go-diff v1.0.0
go: finding github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1
go: finding golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4
go: finding google.golang.org/appengine v1.2.0
go: finding github.com/gliderlabs/ssh v0.1.3
go: finding github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2
go: finding github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab
go: finding github.com/pkg/errors v0.8.0
go: finding dmitri.shuralyov.com/app/changes latest
go: finding git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999
go: finding github.com/jellevandenhooff/dkim latest
go: finding github.com/microcosm-cc/bluemonday v1.0.1
go: finding github.com/shurcooL/octicon latest
go: finding github.com/openzipkin/zipkin-go v0.1.3
go: finding github.com/pkg/errors v0.8.1
go: finding github.com/neelance/sourcemap latest
go: finding github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515
go: finding github.com/kr/pty v1.1.3
go: finding github.com/microcosm-cc/bluemonday v1.0.2
go: finding github.com/Shopify/sarama v1.19.0
go: finding github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241
go: finding google.golang.org/api v0.0.0-20181220000619-583d854617af
go: finding github.com/kr/logfmt latest
go: finding github.com/onsi/ginkgo v1.7.0
go: finding github.com/Shopify/sarama v1.21.0
go: finding golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16
go: finding github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc
go: finding github.com/shurcooL/httperror latest
go: finding golang.org/x/oauth2 v0.0.0-20181120190819-8f65e3013eba
go: finding github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b
go: finding golang.org/x/crypto latest
go: finding gopkg.in/yaml.v2 v2.2.1
go: finding github.com/shurcooL/highlight_diff latest
go: finding github.com/pierrec/lz4 v2.0.5+incompatible
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding go4.org v0.0.0-20180809161055-417644f6feb5
go: finding go4.org latest
go: finding github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d
go: finding github.com/sourcegraph/annotate latest
go: finding golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1
go: finding github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371
go: finding github.com/shurcooL/httpfs latest
go: finding github.com/kr/pretty v0.1.0
go: finding github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf
go: finding github.com/alecthomas/units latest
go: finding github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122
go: finding github.com/shurcooL/notifications latest
go: finding golang.org/x/net v0.0.0-20181217023233-e147a9138326
go: finding github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e
go: finding github.com/sourcegraph/syntaxhighlight latest
go: finding github.com/kisielk/errcheck v1.1.0
go: finding github.com/kisielk/errcheck v1.2.0
go: finding golang.org/x/net v0.0.0-20181220203305-927f97764cc3
go: finding sourcegraph.com/sourcegraph/go-diff v0.5.0
go: finding golang.org/x/tools v0.0.0-20180221164845-07fd8470d635
go: finding golang.org/x/tools v0.0.0-20181122213734-04b5d21e00f1
go: finding github.com/kr/text v0.1.0
go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
go: finding github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3
go: finding github.com/kr/pty v1.1.1
go: finding gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: finding github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041
go: finding github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48
go: finding github.com/julienschmidt/httprouter v1.2.0
go: finding github.com/stretchr/objx v0.1.0
go: finding github.com/sirupsen/logrus v1.2.0
go: finding sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4
go: finding github.com/google/go-github v17.0.0+incompatible
go: finding google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb
go: finding github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e
go: finding golang.org/x/net v0.0.0-20181029044818-c44066c5c816
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b
go: finding github.com/onsi/gomega v1.4.3
go: finding github.com/davecgh/go-spew v1.1.0
go: finding golang.org/x/sys v0.0.0-20181029174526-d69651ed3497
go get: error loading module requirements

This awfully reminds me of that Sirupsen business (sirupsen/logrus#566 and sirupsen/logrus#570) a few years back...

@srikanthops
Copy link

for the if fails when I use -u, without -u it works fine

markpeek pushed a commit to vmware-archive/legacy-terraform-provider-vra7 that referenced this issue Feb 28, 2019
* Adding more unit tests for the sdk and some refactoring
   - Added more tests in the sdk
   - Removed some logs that are not required.
   - Removed a duplicate function
* Updating go.sum to fix the build failure
* Fix build error as reported in golang/lint#436

Signed-off-by: Prativa Bawri<[email protected]>
@thepudds
Copy link

thepudds commented Feb 28, 2019

From a quick look just now, there might be two issues, where github.com/openzipkin/[email protected] and google.golang.org/[email protected] might both be using the older path of github.com/golang/lint.

Create a clean module cache, and do a go get -u golang.org/x/lint (which currently fails):

mkdir /tmp/scratchpad/lint-test
cd /tmp/scratchpad/lint-test
export GOPATH=/tmp/scratchpad/gopath-for-lint
go mod init tempmod
go get -u golang.org/x/lint  # this currently fails

grep our newly populated module cache:

cd $GOPATH/pkg/mod
grep -r github.com/golang/lint

where the grep -r outputs:

 ...
cache/download/github.com/openzipkin/zipkin-go/@v/v0.1.5.mod:  
 github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3 // indirect
cache/download/google.golang.org/grpc/@v/v1.16.0.mod: 
 github.com/golang/lint v0.0.0-20180702182130-06c8688daad7
...

edit: direct user of the old lint path might more likely be google.golang.org/[email protected] than github.com/openzipkin/[email protected] (given zipkin-go seems to be indirect for the old lint path)

@sickhye

This comment has been minimized.

@thepudds

This comment has been minimized.

@thepudds
Copy link

thepudds commented Feb 28, 2019

Let's take a look at seemingly problematic google.golang.org/[email protected]:

git clone -b v1.16.0 https://github.com/grpc/grpc-go /tmp/scratchpad/grpc
cd /tmp/scratchpad/grpc

The grpc go.mod at this version shows both variations of the lint path:

       github.com/golang/lint v0.0.0-20180702182130-06c8688daad7
       golang.org/x/lint v0.0.0-20180702182130-06c8688daad7 // indirect

grep -r github.com/golang/lint shows the now incorrect older lint path:

test/tools/tools.go:    _ "github.com/golang/lint/golint"

@thepudds
Copy link

FWIW, Go 1.11.5 fails with similar error:

mkdir /tmp/scratchpad/lint-test-go1.11
cd /tmp/scratchpad/lint-test-go1.11
export GOPATH=/tmp/scratchpad/gopath-for-lint-go1.11
go1.11.5 mod init tempmod
go1.11.5 get -u golang.org/x/lint  

which fails with:

...
go: github.com/golang/[email protected]: parsing go.mod: 
unexpected module path "golang.org/x/lint"
...
go: finding github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e
go get: error loading module requirements

@dmitshur
Copy link
Contributor

dmitshur commented Feb 28, 2019

Thanks for the nice analysis @thepudds. It was a good idea to clean the module cache, run the go get -u command, then look at the module cache content to find relevant old versions of modules that import lint at the github.com/golang/lint path.

Independent of the lint issue, I've filed golang/go#30455 for the cmd/go issue, which should be investigated even after the lint issue is resolved.

I think I see the root cause of go get -u golang.org/x/lint failing in module mode now, and how to resolve it most directly.

The problem is in the https://github.com/openzipkin/zipkin-go module. Its latest tagged version is v0.1.5, which requires the bad old grpc module you mentioned:

https://github.com/openzipkin/zipkin-go/blob/v0.1.5/go.mod#L27

I'll file an issue into that repo. As soon as they issue a new version that updates its grpc dependency, I believe the go get -u golang.org/x/lint issue should be resolved.

@dmitshur
Copy link
Contributor

@broady Thanks, filed golang/go#30833 for that.

gwthm-in pushed a commit to gojek/weaver that referenced this issue Mar 18, 2019
Link: golang/lint#436

Error while building: go: github.com/golang/[email protected]: parsing go.mod: unexpected module path "golang.org/x/lint"
krumke-lanke pushed a commit to krumke-lanke/hlf-sdk-go that referenced this issue Mar 20, 2019
@matthijskooijman
Copy link

matthijskooijman commented Apr 11, 2019

Update: I just realized that what I'm saying here, is the same as what @broady said above at #436 (comment)

I just ran into this issue trying to upgrade an existing project with go get -u.

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

I'm not completely sure what happened here, but it seemed the only link from my project to lint was through grpc, where version 1.16.0 references the github.com/golang/lint url (though it also references golang.org/x/lint). Some of my dependencies again depended on grpc 1.16.0, which is probably why that was pulled in. However, the latest version of grpc has this fixed, which I would expect to be considered when I run grpc -u. Even more, grpc 1.16.0 references an older version of lint, that does not have a go.mod file yet. So it appears that go get -u was trying to update github.com/golang/lint before updating grpc and realizing github.com/golang/lint was no longer needed.

I tried explicitly upgrading grpc first and then doing a go get -u, but that resulted in the same problem as before, somehow.

What did work, was to add this to my go.mod:

replace github.com/golang/lint v0.0.0-20190409202823-959b441ac422 => github.com/golang/lint v0.0.0-20190409202823-5614ed5bae6fb75893070bdc0996a68765fdd275

Then running go.get -u worked as expected (installing version golang.org/x/lint v0.0.0-20190409202823-959b441ac422 according to go list -m all). Unfortunately, removing the replace line afterwards makes it break again (which I think means that whenever the lint package is updated, I must update the replace line as well).

I suspect that this is a go bug, and it occurs as long as any of your dependencies explictly list grpc v1.16.0 (even though you've upgraded to a later version in your own go.mod) and might go away when everbody lists newer grpc versions. I haven't properly verified this, though.

dahamr pushed a commit to dahamr/gorm that referenced this issue Apr 29, 2019
This change updates just github.com/denisenkom/go-mssqldb to latest
to resolve the mess caused by golang/lint adding mod support.

See golang/lint#436.
dahamr pushed a commit to dahamr/gorm that referenced this issue Apr 29, 2019
This change updates just github.com/denisenkom/go-mssqldb to latest
to resolve the mess caused by golang/lint adding mod support.

See golang/lint#436.
jonahgeorge pushed a commit to appnexus/ankh that referenced this issue Dec 4, 2019
One of the Ankh dependencies is importing `github.com/golang/lint`
which now specifies it must be imported as `golang.org/x/lint`.

```sh
go mod edit -replace github.com/golang/lint@latest=golang.org/x/lint@latest
```

golang/go#30831
golang/lint#436
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests