From 3ee4f6d0eccd6e530ed8012dae6dc00052b3966a Mon Sep 17 00:00:00 2001 From: Danny Kopping Date: Tue, 27 Jan 2026 20:44:21 +0200 Subject: [PATCH] chore: update to Go 1.25.6 (#21693) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Update Go version from 1.24.11 to 1.25.6 - Update go.mod to specify Go 1.25.6 - Update GitHub Actions setup-go default version - Update dogfood Dockerfile with new Go version and SHA256 checksum 🤖 Generated with [Claude Code](https://claude.com/claude-code) via [Coder Task](https://dev.coder.com/tasks/danny/42dcc0b6-17e1-4caf-bb44-8d6c8f346bef) --------- Co-authored-by: Claude Opus 4.5 --- .github/actions/setup-go/action.yaml | 2 +- dogfood/coder/Dockerfile | 20 ++++++++++---------- go.mod | 2 +- scripts/coder-dev.sh | 6 +++++- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/actions/setup-go/action.yaml b/.github/actions/setup-go/action.yaml index 324f8190ad..13f7e53283 100644 --- a/.github/actions/setup-go/action.yaml +++ b/.github/actions/setup-go/action.yaml @@ -4,7 +4,7 @@ description: | inputs: version: description: "The Go version to use." - default: "1.24.11" + default: "1.25.6" use-preinstalled-go: description: "Whether to use preinstalled Go." default: "false" diff --git a/dogfood/coder/Dockerfile b/dogfood/coder/Dockerfile index 440b6b1955..879a6fcbdb 100644 --- a/dogfood/coder/Dockerfile +++ b/dogfood/coder/Dockerfile @@ -11,8 +11,8 @@ RUN cargo install jj-cli typos-cli watchexec-cli FROM ubuntu:jammy@sha256:c7eb020043d8fc2ae0793fb35a37bff1cf33f156d4d4b12ccc7f3ef8706c38b1 AS go # Install Go manually, so that we can control the version -ARG GO_VERSION=1.24.11 -ARG GO_CHECKSUM="bceca00afaac856bc48b4cc33db7cd9eb383c81811379faed3bdbc80edb0af65" +ARG GO_VERSION=1.25.6 +ARG GO_CHECKSUM="f022b6aad78e362bcba9b0b94d09ad58c5a70c6ba3b7582905fababf5fe0181a" # Boring Go is needed to build FIPS-compliant binaries. RUN apt-get update && \ @@ -35,11 +35,11 @@ RUN apt-get update && \ # moq for Go tests. go install github.com/matryer/moq@v0.2.3 && \ # swag for Swagger doc generation - go install github.com/swaggo/swag/cmd/swag@v1.7.4 && \ + go install github.com/swaggo/swag/cmd/swag@v1.16.2 && \ # go-swagger tool to generate the go coder api client go install github.com/go-swagger/go-swagger/cmd/swagger@v0.28.0 && \ # goimports for updating imports - go install golang.org/x/tools/cmd/goimports@v0.31.0 && \ + go install golang.org/x/tools/cmd/goimports@v0.41.0 && \ # protoc-gen-go is needed to build sysbox from source go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30.0 && \ # drpc support for v2 @@ -49,8 +49,8 @@ RUN apt-get update && \ # goreleaser for compiling v2 binaries go install github.com/goreleaser/goreleaser@v1.6.1 && \ # Install the latest version of gopls for editors that support - # the language server protocol - go install golang.org/x/tools/gopls@v0.18.1 && \ + # the language server protocol (v0.21.0+ required for Go 1.25) + go install golang.org/x/tools/gopls@v0.21.0 && \ # gotestsum makes test output more readable go install gotest.tools/gotestsum@v1.9.0 && \ # goveralls collects code coverage metrics from tests @@ -62,8 +62,6 @@ RUN apt-get update && \ # charts and values files go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.5.0 && \ # sqlc for Go code generation - # (CGO_ENABLED=1 go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.27.0) && \ - # # Switched to coder/sqlc fork to fix ambiguous column bug, see: # - https://github.com/coder/sqlc/pull/1 # - https://github.com/sqlc-dev/sqlc/pull/4159 @@ -77,14 +75,16 @@ RUN apt-get update && \ go install github.com/quasilyte/go-ruleguard/cmd/ruleguard@v0.3.13 && \ # go-releaser for building 'fat binaries' that work cross-platform go install github.com/goreleaser/goreleaser@v1.6.1 && \ - go install mvdan.cc/sh/v3/cmd/shfmt@v3.7.0 && \ + # shfmt for shell script formatting + go install mvdan.cc/sh/v3/cmd/shfmt@v3.12.0 && \ # nfpm is used with `make build` to make release packages go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.35.1 && \ # yq v4 is used to process yaml files in coder v2. Conflicts with # yq v3 used in v1. go install github.com/mikefarah/yq/v4@v4.44.3 && \ mv /tmp/bin/yq /tmp/bin/yq4 && \ - go install go.uber.org/mock/mockgen@v0.5.0 && \ + # mockgen for generating mocks (v0.6.0+ required for Go 1.25) + go install go.uber.org/mock/mockgen@v0.6.0 && \ # Reduce image size. apt-get remove --yes gcc && \ apt-get autoremove --yes && \ diff --git a/go.mod b/go.mod index da725b3891..4a5eb303c6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/coder/coder/v2 -go 1.24.11 +go 1.25.6 // Required until a v3 of chroma is created to lazily initialize all XML files. // None of our dependencies seem to use the registries anyways, so this diff --git a/scripts/coder-dev.sh b/scripts/coder-dev.sh index 77f88caa68..83e4a85bcc 100755 --- a/scripts/coder-dev.sh +++ b/scripts/coder-dev.sh @@ -90,7 +90,11 @@ if [[ "${DEBUG_DELVE}" == 1 ]]; then # binary, so we can just build the debug binary here without having to worry # about/use the makefile. ./scripts/build_go.sh "${build_flags[@]}" - runcmd=(dlv exec --headless --continue --listen 127.0.0.1:12345 --accept-multiclient "$CODER_DELVE_DEBUG_BIN" --) + # Use go run to ensure Delve is built with current Go version. + # Go 1.25+ uses DWARFv5 which requires Delve built with Go 1.25+. + # GOTOOLCHAIN is set to force building Delve with the current Go version. + current_toolchain="go$(go env GOVERSION | sed 's/^go//')" + runcmd=(env "GOTOOLCHAIN=${current_toolchain}" go run github.com/go-delve/delve/cmd/dlv@latest exec --headless --continue --listen 127.0.0.1:12345 --accept-multiclient "$CODER_DELVE_DEBUG_BIN" --) fi exec "${runcmd[@]}" --global-config "${CODER_DEV_DIR}" "$@"