-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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-critic/go-ruleguard: issues running under 1.20 #3586
Comments
Hello, you have checked the following box:
can you also provide the version of golangci-lint you are using? |
The output is exactly the same. Should I raise this issue with gocritic instead? $ go get github.com/go-critic/go-critic/cmd/[email protected]
$ go run github.com/go-critic/go-critic/cmd/gocritic
# github.com/quasilyte/go-ruleguard/ruleguard
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:26:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:102:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:118:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:134:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:150:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:166:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:215:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:325:51: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:339:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: too many errors |
Bad news: $ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@master
go: upgraded github.com/cespare/xxhash/v2 v2.1.2 => v2.2.0
go: upgraded github.com/fsnotify/fsnotify v1.5.4 => v1.6.0
go: upgraded github.com/go-toolsmith/astcopy v1.0.1 => v1.1.0
go: upgraded github.com/golangci/golangci-lint v1.49.0 => v1.51.2-0.20230219142757-a775985f5de4
go: upgraded github.com/hashicorp/errwrap v1.0.0 => v1.1.0
go: upgraded github.com/inconshreveable/mousetrap v1.0.0 => v1.1.0
go: upgraded github.com/mattn/go-isatty v0.0.16 => v0.0.17
go: upgraded github.com/mattn/go-runewidth v0.0.13 => v0.0.14
go: upgraded github.com/prometheus/common v0.32.1 => v0.39.0
go: upgraded github.com/prometheus/procfs v0.7.3 => v0.9.0
go: upgraded github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 => v0.0.0-20221002170852-631b4cfd0c04
go: upgraded github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 => v0.0.0-20210819130434-b3f0c404a727
go: upgraded github.com/rivo/uniseg v0.2.0 => v0.4.3
go: upgraded github.com/spf13/viper v1.12.0 => v1.15.0
go: upgraded github.com/stretchr/testify v1.8.0 => v1.8.1
go: upgraded go.uber.org/atomic v1.7.0 => v1.10.0
go: upgraded go.uber.org/multierr v1.6.0 => v1.9.0
go: upgraded go.uber.org/zap v1.17.0 => v1.24.0
go: upgraded golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e => v0.0.0-20230213192124-5e25df0256eb
go: upgraded golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d => v0.0.0-20230213192124-5e25df0256eb
go: upgraded golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 => v0.3.0
go: upgraded golang.org/x/tools v0.1.12 => v0.6.0
go: upgraded mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 => v0.0.0-20230125043941-70a0ce6e7b95
$ go run github.com/golangci/golangci-lint/cmd/golangci-lint run
# github.com/quasilyte/go-ruleguard/ruleguard
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:26:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:102:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:118:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:134:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:150:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:166:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:215:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:325:51: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:339:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: undefined: gogrep.ExprSlice
../../go/pkg/mod/github.com/quasilyte/[email protected]/ruleguard/filters.go:354:50: too many errors |
@quasilyte can you take a look? |
There is a problem with versions only, not Go 1.20 bump (from what I see). Currently Problem is easy to reproduce by pining
I think the simplest fix now is to pin |
Amazing @quasilyte already tagged https://github.com/quasilyte/gogrep/releases/tag/v0.5.0 update for others should be ~soon. |
it's not really clear, if I update gogrephttps://github.com/quasilyte/gogrep to v0.5.0 the problem will be fixed? do I have to wait for releases of go-critic and go-ruleguard? The problem seems related to the use of |
I would assume that using this version of gocritic should fix the issues above: |
Thank you @cristaloleg and @quasilyte for your help and your reactivity ❤️ |
Can confirm, it's working.
|
Update golangci-lint to support 1.20 golangci/golangci-lint#3586
Update Go to ensure security updates are available. Also update golangci-lint to support Go 1.20 (golangci/golangci-lint#3586). Fixes #2141
Update Go to ensure security updates are available. Also update golangci-lint to support Go 1.20 (golangci/golangci-lint#3586). Fixes #2141
Update Go to ensure security updates are available. Also update golangci-lint to support Go 1.20 (golangci/golangci-lint#3586). Fixes #2141
Welcome
Description of the problem
Since Go 1.20 has been released our CI-Pipelines have been failing.
Before updating golangci-lint: https://builds.sr.ht/~rjarry/job/938148#bottom
After updating golangci-lint: https://builds.sr.ht/~rjarry/job/938728#bottom
Version of golangci-lint
before updating
after updating
Configuration file
I could confirm that it is not our custom linter by simply commenting it out.
Go environment
Verbose output of running
not compiling after updating to 1.51.1
Code example or link to a public repository
https://git.sr.ht/~rjarry/aerc
The text was updated successfully, but these errors were encountered: