Skip to content

Commit 5bcb13a

Browse files
authored
chore: support go1.25 (#135)
Allows go1.25 and introduces a "maybe supported" option in the CI script, as it's not certain whether a dev release is supported or not supported (and it being binary makes it impossible to do early testing).
1 parent d393997 commit 5bcb13a

21 files changed

+33
-25
lines changed

.github/workflows/ci.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ contains() {
1818
WAF_ENABLED=$([ "$GOOS" = "windows" ] && echo false || echo true)
1919

2020
if $(contains "$GOVERSION" devel); then
21-
WAF_ENABLED=false
21+
WAF_ENABLED=maybe
2222
fi
2323

2424
# run is the main function that runs the tests
@@ -32,7 +32,7 @@ run() {
3232
test_tags="$2,$GOOS,$GOARCH"
3333
cgo=$($(contains "$2" cgo) && echo 1 || echo 0)
3434

35-
echo "Running matrix $test_tags where the WAF is" "$($waf_enabled && echo "supported" || echo "not supported")" "..."
35+
echo "Running matrix $test_tags where the WAF is enablement is ${waf_enabled}..."
3636
env CGO_ENABLED="$cgo" go test -shuffle=on -tags="$tags" -args -waf-build-tags="$test_tags" -waf-supported="$waf_enabled" ./...
3737

3838
if ! $waf_enabled; then

_tools/libddwaf-updater/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var (
3232
)
3333

3434
const (
35-
goVersionUnsupported = "go1.25"
35+
goVersionUnsupported = "go1.26"
3636
)
3737

3838
var (

alignement_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Copyright 2016-present Datadog, Inc.
55

66
// Purego only works on linux/macOS with amd64 and arm64 from now
7-
//go:build (linux || darwin) && (amd64 || arm64) && !go1.25 && !datadog.no_waf && (cgo || appsec)
7+
//go:build (linux || darwin) && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec)
88

99
package libddwaf
1010

builder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2016-present Datadog, Inc.
55

6-
//go:build (amd64 || arm64) && (linux || darwin) && !go1.25 && !datadog.no_waf && (cgo || appsec)
6+
//go:build (amd64 || arm64) && (linux || darwin) && !go1.26 && !datadog.no_waf && (cgo || appsec)
77

88
package libddwaf
99

encoder_decoder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2016-present Datadog, Inc.
55

6-
//go:build (amd64 || arm64) && (linux || darwin) && !go1.25 && !datadog.no_waf && (cgo || appsec)
6+
//go:build (amd64 || arm64) && (linux || darwin) && !go1.26 && !datadog.no_waf && (cgo || appsec)
77

88
package libddwaf
99

internal/bindings/libddwaf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2016-present Datadog, Inc.
55

6-
//go:build (linux || darwin) && (amd64 || arm64) && !go1.25 && !datadog.no_waf && (cgo || appsec)
6+
//go:build (linux || darwin) && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec)
77

88
package bindings
99

internal/bindings/waf_dl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2016-present Datadog, Inc.
55

6-
//go:build (linux || darwin) && (amd64 || arm64) && !go1.25 && !datadog.no_waf && (cgo || appsec)
6+
//go:build (linux || darwin) && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec)
77

88
package bindings
99

internal/bindings/waf_dl_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2016-present Datadog, Inc.
55

6-
//go:build (linux || darwin) && (amd64 || arm64) && !go1.25 && !datadog.no_waf && (cgo || appsec)
6+
//go:build (linux || darwin) && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec)
77

88
package bindings
99

internal/bindings/waf_dl_unsupported.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Copyright 2016-present Datadog, Inc.
55

66
// Build when the target OS or architecture are not supported
7-
//go:build (!linux && !darwin) || (!amd64 && !arm64) || go1.25 || datadog.no_waf || (!cgo && !appsec)
7+
//go:build (!linux && !darwin) || (!amd64 && !arm64) || go1.26 || datadog.no_waf || (!cgo && !appsec)
88

99
package bindings
1010

internal/lib/dump_waf_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This product includes software developed at Datadog (https://www.datadoghq.com/).
44
// Copyright 2016-present Datadog, Inc.
55

6-
//go:build darwin && (amd64 || arm64) && !go1.25 && !datadog.no_waf && (cgo || appsec)
6+
//go:build darwin && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec)
77

88
package lib
99

0 commit comments

Comments
 (0)