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

go get cmd/golangci-lint fails on Go 1.13 (tip) which uses proxy.golang.org (HTTP error 410 Gone) #595

Open
mewmew opened this issue Jul 1, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@mewmew
Copy link

commented Jul 1, 2019

  1. Go environment: go version && go env

go version output:

go version devel +bc593eac2d Mon Jul 1 14:45:49 2019 +0000 linux/amd64

go env output:

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/u/.cache/go-build"
GOENV="/home/u/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/u/goget:/home/u/Desktop/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/u/go1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/u/go1.13/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build741963370=/tmp/go-build -gno-record-gcc-switches"

On the latest version of Go (which uses proxy.golang.org) it seems like go get is resulting in a 410 HTTP error.

$ go get github.com/golangci/golangci-lint/cmd/golangci-lint
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
verifying github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540/go.mod: github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540/go.mod: reading https://sum.golang.org/lookup/github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540: 410 Gone
@mewmew

This comment has been minimized.

Copy link
Author

commented Jul 1, 2019

Related to this issue, on our CI builds we've started to notice 400 HTTP error (Bad Request) reported by proxy.golang.org for the go-critic dependency of golangci-lint.

ref: https://travis-ci.org/llir/llvm/jobs/552889788

$ go get github.com/golangci/golangci-lint/cmd/golangci-lint
go: finding github.com/mattn/goveralls v0.0.2
go: downloading github.com/mattn/goveralls v0.0.2
go: extracting github.com/mattn/goveralls v0.0.2
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
go: finding github.com/golangci/golangci-lint v1.17.1
go: downloading github.com/golangci/golangci-lint v1.17.1
go: extracting github.com/golangci/golangci-lint v1.17.1
go get: github.com/golangci/golangci-lint@v1.17.1 requires
	github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540: reading https://proxy.golang.org/github.com/go-critic/go-critic/@v/v0.0.0-20181204210945-1df300866540.mod: 400 Bad Request
The command "go get github.com/golangci/golangci-lint/cmd/golangci-lint" failed and exited with 1 during .

Edit: It seems like other dependencies of golangci-lint have similar issues when using proxy.golang.org:

$ go get github.com/golangci/golangci-lint/cmd/golangci-lint
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
verifying github.com/golangci/ineffassign@v0.0.0-20180808204949-42439a7714cc/go.mod: github.com/golangci/ineffassign@v0.0.0-20180808204949-42439a7714cc/go.mod: reading https://sum.golang.org/lookup/github.com/golangci/ineffassign@v0.0.0-20180808204949-42439a7714cc: 410 Gone
@mewmew

This comment has been minimized.

Copy link
Author

commented Jul 2, 2019

It also seems that on Go 1.13 (tip), it is not possible to go get golangci-lint, even when configuring GOPROXY=direct and GOSUMDB=off.

$ GOPROXY=direct GOSUMDB=off go get github.com/golangci/golangci-lint/cmd/golangci-lint
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
go: finding github.com/golangci/golangci-lint/cmd latest
go: downloading github.com/golangci/gofmt v0.0.0-20181105071733-0b8337e80d98
go: downloading github.com/go-critic/go-critic v0.0.0-20181204210945-1df300866540
go: downloading github.com/gogo/protobuf v1.1.1
go: downloading github.com/golangci/ineffassign v0.0.0-20180808204949-42439a7714cc
go: extracting github.com/gogo/protobuf v1.1.1
build github.com/golangci/golangci-lint/cmd/golangci-lint: cannot load github.com/go-critic/go-critic/checkers: github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540: invalid pseudo-version: does not match version-control timestamp (2019-05-26T07:48:19Z)

mewmew added a commit to mewmew/ci that referenced this issue Jul 2, 2019

ci: run golangci-lint only if tool is present
This is used to mitigate CI failure when go get fails
for golangci-lint (ref golangci/golangci-lint#595)

mewmew added a commit to llir/llvm that referenced this issue Jul 2, 2019

@y3llowcake

This comment has been minimized.

Copy link

commented Jul 3, 2019

pierrre added a commit to pierrre/golangci-lint that referenced this issue Jul 10, 2019

fix invalid dependencies
Some dependencies have invalid date.

Fixes golangci#581 golangci#595

pierrre added a commit to pierrre/golangci-lint that referenced this issue Jul 10, 2019

fix invalid dependencies
Some dependencies have invalid date.

Fixes golangci#581 golangci#595
@pierrre

This comment has been minimized.

Copy link

commented Jul 11, 2019

I've submitted a PR that fixes the issue
#605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.