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

Breaks go get -u #904

Closed
eccles opened this issue Oct 3, 2019 · 13 comments
Closed

Breaks go get -u #904

eccles opened this issue Oct 3, 2019 · 13 comments
Labels
kind/bug describes or fixes a bug

Comments

@eccles
Copy link

eccles commented Oct 3, 2019

I am trying to execute go get -u ./... on my repo and get the following error:

go: gopkg.in/urfave/[email protected]: go.mod has non-....v1 module path "github.com/urfave/cli" at revision v1.22.1

The urfave/cli package is an indirect dependency so I cannot fix this myself.

go env:
GOARCH="amd64"
GOBIN="/home/xxxx/go/bin"
GOCACHE="/homexxxxl/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/xxxx/go"
GOPROXY=""
GORACE=""
GOROOT="/home/paul/go"
GOTMPDIR=""
GOTOOLDIR="/home/xxx/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/xxxx/git/yyy/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build955206262=/tmp/go-build -gno-record-gcc-switches"

@coilysiren
Copy link
Member

@eccles I need two things:

  • a reproduction of this issue in CI
  • to know which upstream project is causing this problem

Can you get me that please?

@AudriusButkevicius
Copy link
Contributor

Also, what go version. I suspect you need to move to go 1.13, given the module support has teething issues in 1.12

@eccles
Copy link
Author

eccles commented Oct 8, 2019

Apparently go-ethereum pulls gopkg.in/urfave/cli.v1 in.

$ go mod why gopkg.in/urfave/cli.v1
gopkg.in/urfave/cli.v1
github.com/ethereum/go-ethereum/ethclient
github.com/ethereum/go-ethereum/ethclient.test
github.com/ethereum/go-ethereum/node
github.com/ethereum/go-ethereum/internal/debug
gopkg.in/urfave/cli.v1

AND

$ go mod why github.com/urfave/cli
go: finding github.com/urfave/cli v1.22.1
go: downloading github.com/urfave/cli v1.22.1
go: extracting github.com/urfave/cli v1.22.1
go: finding github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
go: finding github.com/russross/blackfriday/v2 v2.0.1
go: finding github.com/shurcooL/sanitized_anchor_name v1.0.0
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
go: extracting github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
go: downloading github.com/russross/blackfriday/v2 v2.0.1
go: extracting github.com/russross/blackfriday/v2 v2.0.1
go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
go: extracting github.com/shurcooL/sanitized_anchor_name v1.0.0
github.com/urfave/cli
(main module does not need package github.com/urfave/cli)

@eccles
Copy link
Author

eccles commented Oct 8, 2019

Moving to 1.13 is not possible at the moment although it is planned

@saschagrunert
Copy link
Member

saschagrunert commented Oct 8, 2019

Moving to 1.13 is not possible at the moment although it is planned

Are you using go 1.12? It usually should work with it, but if not can you try
export GOPROXY=https://proxy.golang.org and check again if it works as intended?

@eccles
Copy link
Author

eccles commented Oct 8, 2019

With GOPROXY set the error changes:

2019-10-08T09:20:34.6515969Z go get: upgrading gopkg.in/urfave/[email protected]: unexpected status (https://proxy.golang.org/gopkg.in/urfave/cli.v1/@v/v1.22.1.info): 410 Gone

@eccles
Copy link
Author

eccles commented Oct 8, 2019

Intersetingly with GOPROXY set I also get the 410 Gone for github.com/go-interpreter/[email protected]

@coilysiren
Copy link
Member

2019-10-08T09:20:34.6515969Z go get: upgrading gopkg.in/urfave/[email protected]: unexpected status (https://proxy.golang.org/gopkg.in/urfave/cli.v1/@v/v1.22.1.info): 410 Gone

Change gopkg.in to github.com, we only know how to publish to GitHub at the moment

@eccles
Copy link
Author

eccles commented Oct 9, 2019

Unfortunately I cant do that as it is not a direct dependency.

@eccles
Copy link
Author

eccles commented Oct 9, 2019

Adding:

// fix https://github.com/urfave/cli/issues/904
replace gopkg.in/urfave/cli.v1 => github.com/urfave/cli v1.22.1

to go.mod fixed the problem. This is a bit of a hack but might useful for others.

Does anyone think that this is a bug in go-ethereum? Should I report it there as well?

@coilysiren
Copy link
Member

@eccles it looks like go-ethereum is using vendoring, and doesn't have a go.mod. My appraisal is that the issue here is one with golang itself, it's very hard / very confusing to mix modules and vendoring. You probably want to make an issue with go-ethereum asking them to move to go modules, it looks like nobody's reported a Github issue about that yet https://github.com/ethereum/go-ethereum/issues?utf8=✓&q=is%3Aissue+modules+vendor

@coilysiren
Copy link
Member

@eccles I truly apologize for forcing the hack upon you 🙏 but it sounds like you've got stuff working now yeah?

@coilysiren
Copy link
Member

Closing pending more feedback about us needing to do work here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug describes or fixes a bug
Projects
None yet
Development

No branches or pull requests

4 participants