Skip to content

the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.24.1) #5641

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

Closed
6 of 7 tasks
buzzdan opened this issue Mar 26, 2025 · 3 comments
Labels
question Further information is requested

Comments

@buzzdan
Copy link

buzzdan commented Mar 26, 2025

Welcome

  • Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've read the typecheck section of the FAQ.
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
  • I agree to follow this project's Code of Conduct

How did you install golangci-lint?

go install

Description of the problem

my go.mod had a version of 1.24.1
when i changed it to 1.23.7 it worked

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version v2.0.2 built with go1.23.7 from (unknown, modified: ?, mod sum: "h1:dMCC8ikPiLDvHMFy3+XypSAuGDBOLzwWqqamer+bWsY=") on (unknown)

Configuration

$ golangci-lint fmt --config=.golangci.yaml
Error: can't load config: the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.24.1)
Failed executing command with error: can't load config: the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.24.1)

Go environment

$ go version && go envgo version && go env
go version go1.23.7 darwin/arm64
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/danmordechay/Library/Caches/go-build'
GOENV='/Users/danmordechay/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/danmordechay/go/1.23.7/pkg/mod'
GONOPROXY='github.com/weka'
GONOSUMDB='github.com/weka'
GOOS='darwin'
GOPATH='/Users/danmordechay/go/1.23.7'
GOPRIVATE='github.com/weka'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/danmordechay/.goenv/versions/1.23.7'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/danmordechay/.goenv/versions/1.23.7/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.7'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/danmordechay/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/danmordechay/dev/gohome/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/w4/wb1ryhrj5x3fsk0cz8h5p_vm0000gn/T/go-build2508768153=/tmp/go-build -gno-record-gcc-switches -fno-common'

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
INFO golangci-lint has version v2.0.2 built with go1.23.7 from (unknown, modified: ?, mod sum: "h1:dMCC8ikPiLDvHMFy3+XypSAuGDBOLzwWqqamer+bWsY=") on (unknown) 
INFO [config_reader] Config search paths: [./ /Users/danmordechay/dev/gohome /Users/danmordechay/dev /Users/danmordechay /Users /] 
INFO [config_reader] Used config file .golangci.yaml 
Error: can't load config: the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.24.1)
Failed executing command with error: can't load config: the Go language version (go1.23) used to build golangci-lint is lower than the targeted Go version (1.24.1)

A minimal reproducible example or link to a public repository

// add your code here

Validation

  • Yes, I've included all information above (version, config, etc.).

Supporter

@buzzdan buzzdan added the bug Something isn't working label Mar 26, 2025
Copy link

boring-cyborg bot commented Mar 26, 2025

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez added question Further information is requested and removed bug Something isn't working labels Mar 26, 2025
@ldez
Copy link
Member

ldez commented Mar 26, 2025

$ golangci-lint --version
golangci-lint has version v2.0.2 built with go1.23.7 from (unknown, modified: ?, mod sum: "h1:dMCC8ikPiLDvHMFy3+XypSAuGDBOLzwWqqamer+bWsY=") on (unknown)

Once again, this issue is the illustration of why we strongly discourage to use go install.

https://golangci-lint.run/welcome/install/#install-from-sources

go install doesn't "install" but compile golangci-lint.

You are compiling golangci-lint with go1.23 but your project needs go1.24.

Please use our official binaries.

Duplicate of #5563 and a lot of other issues.

@ldez ldez closed this as completed Mar 26, 2025
@buzzdan
Copy link
Author

buzzdan commented Mar 27, 2025

@ldez thanks for the reply. fixed my installation 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants