In version 1.21 go introduced automatic toolchain switching, which basically means downloading the go version specified in the go.mod file if it's newer than the one being used.
This is the cause of #3149. In that case the command failed only because the helm docs set go 1.22 in go.mod. Had they set 1.22.0 that version would have been downloaded and the build would work.
This may not be bad if language_version isn't specified, because autoupdate would only break in case the full version isn't specified like the above. However, this breaks the language_version if it is specified. Here's an example:
$ ~/.cache/pre-commit/repoka9x_fj6/golangenv-1.21.0/bin/golangci-lint versiongolangci-lint has version (devel) built with go1.22.1 from (a1d6c560de1a193a0c68ffed68cd5928ef39e884, modified: true, mod sum: "") on 2024-09-09T14:33:19Z
Activity
asottile commented on Sep 17, 2024
would you like to send a patch?
AleksaC commented on Sep 17, 2024
Yes, I'll look into it soon!