Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable automatic toolchain switching in golang #3300

Closed
@AleksaC

Description

@AleksaC

search you tried in the issue tracker

toolchain

describe your issue

In version 1.21 go introducedautomatic toolchain switching, which basically means downloading the go version specified in thego.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 setgo 1.22 ingo.mod. Had they set1.22.0 that version would have been downloaded and the build would work.

This may not be bad iflanguage_version isn't specified, because autoupdate would only break in case the full version isn't specified like the above. However, this breaks thelanguage_version if it is specified. Here's an example:

default_language_version:golang:"1.21.0"repos:-repo:https://github.com/golangci/golangci-lintrev:v1.61.0# uses go 1.22.1hooks:    -id:golangci-lint-config-verify
$~/.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

pre-commit --version

pre-commit 3.8.0

.pre-commit-config.yaml

default_language_version:golang:"1.21.0"repos:-repo:https://github.com/golangci/golangci-lintrev:v1.61.0# uses go 1.22.1hooks:    -id:golangci-lint-config-verify

~/.cache/pre-commit/pre-commit.log (if present)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp