Skip to content

disable the jsonv2 GOEXPERIMENT - #130

Merged
dfangl merged 1 commit into
localstackfrom
fix/disable-jsonv2-experiment
Sep 1, 2026
Merged

disable the jsonv2 GOEXPERIMENT#130
dfangl merged 1 commit into
localstackfrom
fix/disable-jsonv2-experiment

Conversation

@carole-lavillonniere

@carole-lavillonniere carole-lavillonniere commented Aug 31, 2026

Copy link
Copy Markdown

Ci is red since Aug 22 (#122#127 all merged over a failing test suite).
This has been blocking the weekly RIE auto-release.

What happened

#122 was a one-line Renovate change: go 1.26.6go 1.27.0. That line is not a library version — it is a minimum toolchain requirement. With GOTOOLCHAIN=auto, the go command then fetches and builds everything with go1.27, and Go 1.27 enables the jsonv2 GOEXPERIMENT by default.

Under jsonv2, encoding/json declares type RawMessage = jsontext.Value instead of type RawMessage []byte. Verified — the toolchain is what decides, the language directive is irrelevant except that it selects the toolchain:

json.RawMessage resolves to
go1.26.6 toolchain json.RawMessage
go1.27.0 toolchain jsontext.Value
go1.27.0, directive 1.26.6 jsontext.Value
go1.27.0, GOEXPERIMENT=nojsonv2 json.RawMessage

TODO

  • require test in the branch ruleset (needs an admin of this repo) 🙏

@carole-lavillonniere carole-lavillonniere changed the title build: disable the jsonv2 GOEXPERIMENT disable the jsonv2 GOEXPERIMENT Aug 31, 2026
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.
@carole-lavillonniere
carole-lavillonniere force-pushed the fix/disable-jsonv2-experiment branch from 7a81336 to d511b4c Compare August 31, 2026 11:37
@carole-lavillonniere
carole-lavillonniere requested review from a team and removed request for dominikschubert August 31, 2026 11:43
@dfangl
dfangl merged commit 4b2f682 into localstack Sep 1, 2026
4 checks passed
@dfangl
dfangl deleted the fix/disable-jsonv2-experiment branch September 1, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants