Skip to content

Commit 706cc08

Browse files
authored
chore: Bump to GoLang v1.26 (#5205)
## Relevant issue(s) Resolves #4258 ## Description - This is a routine version bump of GoLang, the previous bump was done in (#4260) - Also updates the GoLang version for AWS AMI generation. - Updates the documented minimum GoLang build prerequisite. - Removes the `windows/arm` cross-build target, which Go 1.26 no longer supports. - Update VERSIONING.md with the golang bumping exception ### Routine Todo(s) - [ ] Open ticket for next GoLang version bump (#TBD)
1 parent f089724 commit 706cc08

7 files changed

Lines changed: 13 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Building DefraDB from source requires significant system resources. If you encou
7373

7474
### Prerequisites
7575

76-
- [Go](https://golang.org/) 1.24 or later
76+
- [Go](https://golang.org/) 1.26 or later
7777
- [Rust toolchain](https://www.rust-lang.org/tools/install) (for WASM lens compilation, if running tests)
7878
- Git
7979

VERSIONING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ We as a team have decided that, whilst the exact strings are user-visible via th
2222

2323
We will not make significant changes to the structure of errors returned by any of our functions. For example, if a function returns an `client.ErrValueTypeMismatch` wrapped by an `client.ErrInvalidJSONPayload` - removing or replacing either one of these will only be done as part of a `MAJOR` version increment.
2424

25+
## Go version bumps
26+
27+
Raising the minimum supported Go version can prevent developers and downstream source consumers from building DefraDB with an older Go toolchain. Although this is technically a compatibility break for those environments, we do not treat Go version bumps as breaking changes under DefraDB's semver policy, and they do not require a `MAJOR` version increment.
28+
29+
Consumers building DefraDB from source are expected to use a supported Go version. We schedule these bumps according to our [Go Version Bumping Policy](./CONTRIBUTING_INTERNAL.md#-go-version-bumping-policy).
30+
2531
## The C embedded client
2632

2733
We made a mistake when designing many of the function signatures that form the [C client](./cbindings). Many of the functions have parameters that do not pair up with their Go equivalents - they take individual formal parameters, where the Go function takes an [options](./client/options) struct.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/sourcenetwork/defradb
22

3-
go 1.25.13
3+
go 1.26.7
44

55
require (
66
github.com/bits-and-blooms/bitset v1.24.6

tools/cloud/aws/packer/build_aws_ami.pkr.hcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ build {
6666
inline = [
6767
"/usr/bin/cloud-init status --wait",
6868
"sudo apt-get update && sudo apt-get install make build-essential -y",
69-
"curl -OL https://golang.org/dl/go1.25.5.linux-amd64.tar.gz",
70-
"rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.25.5.linux-amd64.tar.gz",
69+
"curl -OL https://golang.org/dl/go1.26.7.linux-amd64.tar.gz",
70+
"rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.26.7.linux-amd64.tar.gz",
7171
"export PATH=$PATH:/usr/local/go/bin",
7272
"git clone \"https://git@$DEFRADB_GIT_REPO\"",
7373
"cd ./defradb || { printf \"\\\ncd into defradb failed.\\\n\" && exit 2; }",

tools/configs/golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ run:
2424

2525
# Define the Go version limit.
2626
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.22.
27-
go: '1.25'
27+
go: '1.26'
2828

2929
# If set, we pass it to "go list -mod={option}". From "go help modules":
3030
# If invoked with -mod=readonly, the go command is disallowed from the implicit

tools/defradb.containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# WARNING: The build image SHOULD use the same OS version as the run image. Otherwise they may have
88
# different versions of GLIBC and the dynamic linking of libraries will fail.
99
# `bookworm` is Debian 12.
10-
FROM docker.io/golang:1.25-bookworm AS build
10+
FROM docker.io/golang:1.26-bookworm AS build
1111
WORKDIR /repo/
1212
COPY go.mod go.sum Makefile ./
1313
RUN make deps:modules

tools/scripts/cross-build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ if [[ -z "${platforms}" ]]; then
1212
platforms=(
1313
"windows/amd64"
1414
"windows/arm64"
15-
"windows/arm"
1615
"linux/amd64"
1716
"linux/arm64"
1817
"linux/arm"
@@ -38,4 +37,4 @@ do
3837
exit 1
3938
fi
4039
echo "Completed: ${output_name}"
41-
done
40+
done

0 commit comments

Comments
 (0)