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/lint@v0.0.0-20190227174305-5b3e6a55c961: 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/lint@v0.0.0-20190227174305-5b3e6a55c961: 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/lint@v0.0.0-20190227174305-5b3e6a55c961: 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/lint@v0.0.0-20190227174305-5b3e6a55c961: 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/lint@v0.0.0-20190227174305-5b3e6a55c961: 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
Signed-off-by: Prativa Bawri<bawrip@vmware.com>
@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/lint@v0.0.0-20190227174305-5b3e6a55c961: 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<bawrip@vmware.com>
@thepudds
Copy link

thepudds commented Feb 28, 2019

From a quick look just now, there might be two issues, where github.com/openzipkin/zipkin-go@v0.1.5 and google.golang.org/grpc@v1.16.0 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/grpc@v1.16.0 than github.com/openzipkin/zipkin-go@v0.1.5 (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/grpc@v1.16.0:

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/lint@v0.0.0-20190227174305-5b3e6a55c961: 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/lint@v0.0.0-20190313153728-d0100b6bd8b3: 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/lint@v0.0.0-20190409202823-959b441ac422: 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