Skip to content

Commit d511b4c

Browse files
build: disable the jsonv2 GOEXPERIMENT
Go 1.27 enables the jsonv2 experiment by default, reimplementing encoding/json and making json.RawMessage an alias for jsontext.Value. The repo inherited this from #122, which bumped the go directive from 1.26.6 to 1.27.0 -- that directive is a minimum toolchain requirement, so GOTOOLCHAIN =auto then builds everything with go1.27 and its default experiments. This emulator serializes customer Lambda payloads, so swapping JSON implementation should be a deliberate, tested decision rather than a side effect of a toolchain bump. Pin it off for now. There is no GODEBUG opt-out -- jsonv2 is selected at compile time via build tags -- so it must be an environment variable. Exporting it from the Makefile covers local builds, the docker targets (which re-enter this Makefile in the container) and CI, which invokes only make targets. Fixes the localstack branch, red since Aug 22, without touching the upstream test that the experiment broke.
1 parent 7ec133c commit d511b4c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# LOCALSTACK CHANGES 2022-03-10: remove linker flags and add gc flags for delve debugger
22
# LOCALSTACK CHANGES 2022-03-28: change compile src folder
33
# LOCALSTACK CHANGES 2022-11-14: add --rm flag to compile-with-docker
4+
# LOCALSTACK CHANGES 2026-08-31: disable the jsonv2 GOEXPERIMENT (see GOEXPERIMENT below)
45

56
# RELEASE_BUILD_LINKER_FLAGS disables DWARF and symbol table generation to reduce binary size
67
#RELEASE_BUILD_LINKER_FLAGS=-s -w
78

9+
export GOEXPERIMENT := nojsonv2
10+
811
BINARY_NAME=aws-lambda-rie
912
ARCH=x86_64
1013
GO_ARCH_x86_64 := amd64

0 commit comments

Comments
 (0)