golangci-lint won't compile with Go modules on go 1.13

Created on 23 Aug 2019  路  12Comments  路  Source: golangci/golangci-lint

It looks like there are some custom pseudo-versions specified in the go.mod file.

Output on Go 1.12: https://gist.github.com/fsouza/921905a8cc81e5d104011b1f96d9e6e8

Output on Go 1.13: https://gist.github.com/fsouza/768cae1b276bdc363aa1965c223bbd11

(Since proxy.golang.org is using Go 1.13, golangci-lint is not go getable with GOPROXY=https://proxy.golang.org).

If this is something you're willing to support, I can send a PR.

bug

All 12 comments

Appreciate the fix in #605, although I'm wondering鈥攊s this project still alive? I noticed no commits have been merged to master for over a month.

647

Community suggestion: to help things as clear as possible for when the project picks up again it might be useful to close your issue as it seems to have been addressed. 馃檪

Based on my experience with GH issue curation this will literally save _hours_ of maintainer time.

@thepudds provided more detail on the workaround in https://github.com/golangci/golangci-lint/issues/659#issuecomment-527854777.

This is fixed, #605 has been merged

@pierrre thanks for that change, there's progress, but it still doesn't compile here 馃槥

  • With proxy:
docker run -e GO111MODULE=on -e GOPROXY=https://proxy.golang.org,direct golang:1.13 go get github.com/golangci/golangci-lint/cmd/golangci-lint@master
go: finding github.com master
go: finding github.com/golangci/golangci-lint master
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint master
go: finding github.com/golangci/golangci-lint/cmd master
go: finding github.com/golangci master
go: downloading github.com/golangci/golangci-lint v1.17.2-0.20190909155618-f84095a9733f
go: extracting github.com/golangci/golangci-lint v1.17.2-0.20190909155618-f84095a9733f
go get: github.com/golangci/[email protected] requires
        github.com/timakin/[email protected]: invalid pseudo-version: does not match version-control timestamp (2019-07-21T03:02:26Z)
  • No proxy:
docker run -e GO111MODULE=on -e GOPROXY=direct golang:1.13 go get github.com/golangci/golangci-lint/cmd/golangci-lint@master
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint master
go: finding github.com/golangci/golangci-lint/cmd master
go: finding github.com/golangci/golangci-lint master
go: downloading github.com/golangci/golangci-lint v1.17.2-0.20190909155618-f84095a9733f
go: extracting github.com/golangci/golangci-lint v1.17.2-0.20190909155618-f84095a9733f
go get: github.com/golangci/[email protected] requires
        github.com/golangci/[email protected]: invalid pseudo-version: does not match version-control timestamp (2018-12-23T08:41:20Z)

Can you try with the latest commit id instead of @master ? => @<commit_id>.

Master isn't going to work either. See: https://github.com/golangci/golangci-lint/issues/659#issuecomment-529568490

605 wasn't a full fix (and a go mod tidy would show the errors). #670's build logs show the issues, at least.

@pierrre @master did get resolved to the last commit id, as you can see in the pseudo-version in that output: v1.17.2-0.20190909155618-f84095a9733f.

@jirfag thank you very much for fixing this!

Hopefully we can get rid of the replaces soon so go get <...>@master works, but for now cloning + go install works! 馃榿

I can't get rid of replacements until my pull requests to upstreams are merged. But I've changed replaced x/tools to be compatible with the replacement.
Now GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@95d5b2c works. And today-tomorrow I will make a new release.

Was this page helpful?
0 / 5 - 0 ratings