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

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

Closed
fsouza opened this issue Aug 23, 2019 · 12 comments
Closed

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

fsouza opened this issue Aug 23, 2019 · 12 comments
Labels
bug Something isn't working

Comments

@fsouza
Copy link
Contributor

fsouza commented Aug 23, 2019

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.

@pierrre
Copy link
Contributor

pierrre commented Aug 26, 2019

Already fixed in #605

@tonyghita
Copy link

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

@pierrre
Copy link
Contributor

pierrre commented Aug 27, 2019

#647

@Helcaraxan
Copy link
Contributor

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.

@bcmills
Copy link

bcmills commented Sep 4, 2019

@thepudds provided more detail on the workaround in #659 (comment).

@pierrre
Copy link
Contributor

pierrre commented Sep 9, 2019

This is fixed, #605 has been merged

@fsouza
Copy link
Contributor Author

fsouza commented Sep 9, 2019

@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)

@pierrre
Copy link
Contributor

pierrre commented Sep 9, 2019

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

@zikaeroh
Copy link

zikaeroh commented Sep 9, 2019

Master isn't going to work either. See: #659 (comment)

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

@fsouza
Copy link
Contributor Author

fsouza commented Sep 9, 2019

@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.

@fsouza
Copy link
Contributor Author

fsouza commented Sep 10, 2019

@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! 😁

@fsouza fsouza closed this as completed Sep 10, 2019
@jirfag
Copy link
Member

jirfag commented Sep 10, 2019

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.

simonpasquier added a commit to simonpasquier/klog-gokit that referenced this issue Sep 10, 2019
* .circleci/config.yml: enable Go 1.13

* Install golangci-lint from source

See golangci/golangci-lint#652

* Quote "on"

* s/go install/go get/

* Use golangci-lint master

* Add go stanza to go.mod

* use golangci-lint v1.18.0

Signed-off-by: Simon Pasquier <[email protected]>
simonpasquier added a commit to simonpasquier/prometheus that referenced this issue Sep 10, 2019
It is required to support Go 1.13 (see
golangci/golangci-lint#652).

Signed-off-by: Simon Pasquier <[email protected]>
simonpasquier added a commit to prometheus/prometheus that referenced this issue Sep 10, 2019
It is required to support Go 1.13 (see
golangci/golangci-lint#652).

Signed-off-by: Simon Pasquier <[email protected]>
@tpounds tpounds added the bug Something isn't working label Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants