Skip to content

Upgrade to Go 1.27 and migrate to JSON v2 - #4

Open
alexrios wants to merge 4 commits into
masterfrom
update/go-1.27-json-v2
Open

alexrios wants to merge 4 commits into
masterfrom
update/go-1.27-json-v2

Conversation

@alexrios

@alexrios alexrios commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Upgrade the build toolchain to Go 1.27 and migrate persistence, snapshots/presets, Go environment decoding and JSON export to encoding/json/v2. Serialization failures now produce stderr diagnostics and exit code 1 in the CLI, and appear in TUI export options without opening a preview. Snapshot write failures also clear the stale Exporting... footer.

  • Track Go 1.27 patches in mise, CI and release while retaining dependency versions.
  • Adopt v2 defaults: reject duplicate names and invalid UTF-8, match field names exactly, ignore unknown fields, encode nil collections as arrays/objects unless omitted, and use minimal escaping with unspecified map key order. Preserve zero omission for watchInterval and maxHistory with omitzero.
  • Keep valid older app-generated files readable without automatic rewrites and finish serialization before writing file contents.
  • Suggest jsonv2/nojsonv2 from Go 1.25 and simd from 1.26; exclude cacheprog/rangefunc from 1.26. Preserve free-form entry and unknown-version behavior.
  • Isolate test configuration using each platform's configuration environment variable, reject paths outside temporary roots, and verify fixture writes preserve existing files. Run CI natively on Linux, macOS and Windows. Initialize undo/redo history explicitly and cover timer deadlines with synctest.Test and synctest.Sleep.

Building requires Go 1.27+; Darwin binaries require macOS 13+. Direct v2 imports intentionally do not support GOEXPERIMENT=nojsonv2. Manually edited JSON relying on v1 permissiveness may require correction.

This branch has not been deployed

No deployments
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.

1 participant