Skip to content

build: move Glaze to 9.0.0 - #33

Merged
Reddimus merged 2 commits into
mainfrom
build/glaze-9
Sep 26, 2026
Merged

Reddimus merged 2 commits into
mainfrom
build/glaze-9

Conversation

@Reddimus

Copy link
Copy Markdown
Owner

Moves the private Glaze dependency from 8.3.0 to 9.0.0, the current release.

spc-cpp's use of Glaze doesn't change in 9.0. It still uses glz::generic, glz::read with null_terminated, format_error, and the bundled fast_float, which is byte-identical between the two versions. CMake's minimum stays 3.31.

Behavior

  • Every parser gives the same output. The golden snapshots, corpus, and client-parity tests pass unchanged.
  • A body that is only a number with an empty exponent (1e, 1e+, 1E-) used to parse to an empty result. Now it is a parse error. The new tests fail on 8.3 and pass on 9.0:
    • Corpus.RejectsMalformedNumbers checks malformed numbers both as the whole body and inside a feature.
    • ClientParity.AMalformedBodyFailsWithTheParsersMessage adds 1e, which covers the clients' std::string read path.

Benchmarks

Medians of 10 interleaved repetitions each, on macOS arm64:

  • Instructions fell 0.5 to 7.1% on every benchmark. BM_ParseTree/iem_storm_reports.json went from 16.74M to 15.55M.
  • Allocations, bytes allocated, peak bytes, and retained bytes are identical.
  • compare.py puts the overall time geomean at +0.4%, which is noise. The BM_ParseDouble controls run unchanged code and still moved +6 to 9% between the two runs. The storm-reports parse is significantly faster (p = 0.014).
  • parse_owned_root is still 4 to 7% cheaper than parse_root on 9.0, so its comment still holds.

Checks run locally

  • The full gate on macOS (Apple Clang 21, -Werror): make test, lint, lint-md, fixtures-check, test-consumers.
  • Homebrew Clang 18 + libc++ 18: all 132 tests pass.
  • Ubuntu 24.04:
    • GCC 13 with -Werror: all 132 tests pass.
    • ASan+UBSan and TSan: all 125 tests pass in each.
    • Consumer checks pass.
  • Every example, run live against NOAA and IEM, and tools/verify_arcgis_metadata.py (39/39 layers).

Apple Clang 17 (Xcode 16.4) and Clang 19 with libstdc++ can only be checked here in CI.

Glaze 9 parses every fixture to the same output with the same allocations
and 0.5 to 7% fewer instructions. It also rejects a body that is only a
number with an empty exponent, such as `1e`, which 8.3 parsed to an empty
result. Tests now cover malformed numbers at the end of the input and
inside a document, on both the parser and client read paths.
Copilot AI lite review requested due to automatic review settings September 26, 2026 08:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Reddimus
Reddimus merged commit 36e23b1 into main Sep 26, 2026
12 checks passed
@Reddimus
Reddimus deleted the build/glaze-9 branch September 26, 2026 08:15
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