Skip to content

Commit 79de0f2

Browse files
committed
Update project Go toolchain version to 1.22.9
Support for specifying the Go toolchain version compatibility of a module to patch version granularity via the `go` directive of the go.mod module metadata file was introduced in Go 1.21.0. The `go` directives of the project's modules were changed to specify the patch version when the project's Go version was bumped to 1.22.3. However, support for this version format was not added to the `go fix` command until Go 1.22.7. This caused the `go fix` command (which is invoked by the "check-outdated" job of the project's "Check Go" workflow) to fail when a version of Go between 1.21.0 and 1.22.6 was used: ``` invalid -go=go1.22.3 exit status 2 task: Failed to run task "go:fix": exit status 1 ``` Previously, this did not affect the CI system because the workflows only specified the Go version to be installed by the "actions/setup-go" action to the minor version (1.22), and the action happened to use a version of Go >1.22.6. However, the "actions/setup-go" action now installs the exact version of Go specified the `go` directive, which means the runs of the "Check Go" workflow would fail with the above error if the value of the `go` directive is >=1.21.0 and <1.22.7. The chosen solution is to bump the value of the `go` directive to a version with the `go fix` command bug fixed. Although this could be achieved by a bump to 1.22.7, it makes sense to bump Go all the way to the latest version in the 1.22.x series (because apparently the production release build system is not compatible with Go 1.23.x).
1 parent 4f2f4f5 commit 79de0f2

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

DistTasks.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ version: "3"
1919

2020
vars:
2121
CONTAINER: "docker.elastic.co/beats-dev/golang-crossbuild"
22-
GO_VERSION: "1.22.5"
22+
GO_VERSION: "1.22.9"
2323

2424
tasks:
2525
Windows_32bit:
@@ -131,11 +131,12 @@ tasks:
131131
desc: Builds Linux ARMv6 binaries
132132
dir: "{{.DIST_DIR}}"
133133
cmds:
134+
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
134135
- |
135136
docker run -v `pwd`/..:/home/build -w /home/build \
136137
-e CGO_ENABLED=0 \
137138
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
138-
--build-cmd "{{.BUILD_COMMAND}}" \
139+
--build-cmd "git config --global --add safe.directory /home/build && {{.BUILD_COMMAND}}" \
139140
-p "{{.BUILD_PLATFORM}}"
140141
141142
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
@@ -172,7 +173,7 @@ tasks:
172173
#
173174
# Until there is a fix released we must use a recent gcc for Linux_ARMv6 build, so for this
174175
# build we select the debian10 based container.
175-
CONTAINER_TAG: "{{.GO_VERSION}}-armel-debian9"
176+
CONTAINER_TAG: "{{.GO_VERSION}}-armel-debian12"
176177
PACKAGE_PLATFORM: "Linux_ARMv6"
177178
PACKAGE_NAME: "{{.PROJECT_NAME}}_{{.VERSION}}_{{.PACKAGE_PLATFORM}}.tar.gz"
178179

docsgen/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/cobra/docsgen/go.mod
22
module github.com/arduino/arduino-lint/docsgen
33

4-
go 1.22.3
4+
go 1.22.9
55

66
replace github.com/arduino/arduino-lint => ../
77

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/arduino/arduino-lint
22

3-
go 1.22.3
3+
go 1.22.9
44

55
replace github.com/jandelgado/gcov2lcov => github.com/jandelgado/gcov2lcov v1.0.5 // v1.0.4 causes Dependabot updates to fail due to checksum mismatch (likely a moved tag). This is an unused transitive dependency, so version is irrelevant.
66

ruledocsgen/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/arduino/arduino-lint/ruledocsgen
22

3-
go 1.22.3
3+
go 1.22.9
44

55
replace github.com/arduino/arduino-lint => ../
66

0 commit comments

Comments
 (0)