`go:lint-all` fails with Go 1.27.1 despite configured version
What is the issue?
I'm trying to run dagger check go:lint-all on a Go 1.27.1 project, but I'm getting an error saying golangci-lint was built with Go 1.26.
I've set version = "1.27.1" in dagger.toml to match my go.mod, and dagger update reports “Lockfile already up to date.” Is there another setting needed to use lint with this Go version?
What my agent thinks is causing the issue
My agent traced this to GoModule.lintExec in go.dang, which selects a fixed golangci/golangci-lint:v2.11.4-alpine image. It looks like the configured Go base is used for tests and generation, but not lint, which may explain the mismatch.
This looks similar to https://github.com/dagger/dagger/issues/11977.
Dagger version
version: v1.0.0-beta.11
commit: a4e1e4ff
dirty: no
platform: linux/amd64
runner-host: image://registry.dagger.io/engine:v1.0.0-beta.11Steps to reproduce
In a project with go 1.27.1 in go.mod, use:
dagger.toml
[modules.go]
source = "github.com/dagger/go"
[modules.go.settings]
version = "1.27.1"dagger.lock
[["version","2"]]
["","git-latest",["https://github.com/dagger/go"],"refs/heads/main"]
["","git-sha",["https://github.com/dagger/go","refs/heads/main"],"8d294186ba876b781ba4abd12d96735d0d0fb331"]Run:
dagger update
dagger check go:lint-allLog output
TRACE ✘ FAILED
dagger check go:lint-all 1.7s
! exit code: 3
CHECKS ✘ 1 failed
✘ go:lint-all 0.4s ERROR
✘ withExec golangci-lint run --path-prefix ./ --output.tab.path=stderr --output.tab.print-linter-name=true --output.tab.colors=false --show-stats=false --max-issues-per-linter=0 --max-same-issues=0 0.2s ERROR
┃ Error: can't load config: the Go language version (go1.26) used to build golangci-lint is lower than the targeted Go version (1.27.1)
┃ The command is terminated due to an error: can't load config: the Go language version (go1.26) used to build golangci-lint is lower than the targeted Go version (1.27.1)
! exit code: 3
RUN LOCALLY
dagger check "go:lint-all"Source: dagger/dagger