-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
go1.20 support #3414
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
go1.20 support #3414
Conversation
f569933
to
24f1b8e
Compare
The behavior of $ go version
go version go1.19.4 linux/amd64
$ go list -e -json=Name,ImportPath,Error,Dir,GoFiles,IgnoredGoFiles,IgnoredOtherFiles,CFiles,CgoFiles,CXXFiles,MF -export=true -- ./test/testdata/notcompiles/typecheck.go
# command-line-arguments
test/testdata/notcompiles/typecheck.go:4:1: syntax error: non-declaration statement outside function body
{
"Dir": "/home/ldez/sources/go/src/github.com/golangci/golangci-lint/test/testdata/notcompiles",
"ImportPath": "command-line-arguments",
"Name": "testdata",
"GoFiles": [
"typecheck.go"
]
} $ go version
go version go1.20rc1 linux/amd64
$ go list -e -json=Name,ImportPath,Error,Dir,GoFiles,IgnoredGoFiles,IgnoredOtherFiles,CFiles,CgoFiles,CXXFiles,MF -export=true -- ./test/testdata/notcompiles/typecheck.go
{
"Dir": "/home/ldez/sources/go/src/github.com/golangci/golangci-lint/test/testdata/notcompiles",
"ImportPath": "command-line-arguments",
"Name": "testdata",
"GoFiles": [
"typecheck.go"
],
"Error": {
"ImportStack": null,
"Pos": "",
"Err": "# command-line-arguments\ntest/testdata/notcompiles/typecheck.go:4:1: syntax error: non-declaration statement outside function body\n"
}
} Why this is important? because As the error message has specific content the position is empty ( Related to:
I created a fix but I think the impact on |
Running golangci-lint (v1.50.1) with go1.20 crashes the shell. The CI crashes because we test the previous version (v1.50.1).
|
d0acebc
to
6060eda
Compare
Confirm that this version resolves high memory consumption on my Go codebase, Go v1.20rc3 |
This should fix the OOM problem - golangci/golangci-lint#3414.
I still have the huuuuge memory usage with the 1.51 update... I'm running MacOS Monterey 12.6.3 on an Intel chip. |
I guess you are installing golangci-lint with brew, brew uses go1.19 instead of go1.20. So you have to use either our binaries or our Docker image or build/install golangci-lint with go1.20. golangci-lint requires to be built with go1.20, without that golangci-lint cannot work with go1.20. Note the latest version of golangci-lint is |
The current version OOMs: golangci/golangci-lint#3414.
golangci-lint <= 1.50 does not support Go > 1.20 and will OOM. This PR fixes the issue. xref: golangci/golangci-lint#3414 Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
…angci-lint#3414) - ignore some errors, should refactor in the future Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
- Add nolint:unused pragmas. - Enable nolintlint linter. - Add max-* settings to show all errors at once. - update golangci-lint to 1.52.1 to support Go 1.20 (See golangci/golangci-lint#3414) - ignore some errors, should refactor in the future Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
- Add nolint:unused pragmas. - Enable nolintlint linter. - Add max-* settings to show all errors at once. - update golangci-lint to 1.52.1 to support Go 1.20 (See golangci/golangci-lint#3414) - ignore some errors, should refactor in the future Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
- Add nolint:unused pragmas. - Enable nolintlint linter. - Add max-* settings to show all errors at once. - update golangci-lint to 1.52.1 to support Go 1.20 (See golangci/golangci-lint#3414) - ignore some errors, should refactor in the future Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
This PR adds the support of go1.20.
Note for GitHub Action users: the Go version must be quoted (
'1.20'
) otherwise it is interpreted as a float (1.2
).This PR is to evaluate and prepare golangci-lint to go1.20.This PR will evolve during the beta and RC phases of go1.20.Fixes #3420