From 3b0090c6921c97fd99a6d62fa67cdba4afb4f080 Mon Sep 17 00:00:00 2001 From: Kaj Kowalski Date: Mon, 15 Jun 2026 17:24:05 +0000 Subject: [PATCH] ci: pin modernize tool to gopls v0.21.x for Go 1.25 compatibility The autofix workflow's `task modernize` step installed the modernize analyzer from gopls@latest, which as of v0.22.0 requires Go 1.26. The project targets Go 1.25 (go.mod) and CI runs with GOTOOLCHAIN=local, so the install failed. Pin to the v0.21.x line, which supports Go >= 1.25. --- Taskfile.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index 682f003..a591d90 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -266,7 +266,9 @@ tasks: silent: true aliases: [modern] cmds: - - go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./... + # Pinned to the v0.21.x line: newer gopls (v0.22+) requires Go 1.26, but + # this project targets Go 1.25 (see go.mod). + - go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.21.0 -fix -test ./... - echo "Code modernized" # Dependency management