Skip to content

Merge v0.16.0 into main — promote zig 0.16 upgrade to default branch#10

Merged
GrapeBaBa merged 6 commits into
blockblaz:mainfrom
GrapeBaBa:promote/v0.16.0-to-main
May 11, 2026
Merged

Merge v0.16.0 into main — promote zig 0.16 upgrade to default branch#10
GrapeBaBa merged 6 commits into
blockblaz:mainfrom
GrapeBaBa:promote/v0.16.0-to-main

Conversation

@GrapeBaBa
Copy link
Copy Markdown
Member

Summary

Promote the zig-0.16-ready state from the v0.16.0 release-style branch into main, so the default branch finally ships:

main is currently stuck on the 0.15.2 base — downstream consumers on zig 0.16 (e.g. zeam's spectest suite) are forced to pin the v0.16.0 branch or vendor the library because the default branch doesn't compile under 0.16. This PR consolidates the two branches so the default branch is the canonical 0.16-ready snapshot and the release-style branch can be retired.

Conflicts that were resolved in the merge

  1. The terminal if (!saw_data_chunk)if (!saw_stream_identifier and !saw_data_chunk) change appears on both branches in both decodeFromReader and decodeFramed. The lines are functionally identical; kept v0.16.0's longer comment (more interop context).
  2. The empty-stream regression tests (decode accepts identifier-only stream as empty payload and decodeFromReader accepts identifier-only stream as empty payload) exist on both branches. The main copy from fix: accept identifier-only stream as empty payload #8 uses std.io.fixedBufferStream / std.ArrayListUnmanaged.writer, both removed in zig 0.16. Dropped those duplicates; kept the v0.16.0 versions from fix: accept identifier-only stream as empty payload (zig-0.16 rebase of #8) #9 which use the new std.Io.Reader.fixed(...) / Writer.Allocating API and would compile on the post-merge state.

After the merge there is exactly one copy of each test, on the 0.16 API.

Test plan

  • zig build test on zig 0.16.0 after the merge — Build Summary: 3/3 steps succeeded; 13/13 tests passed.

After this lands

  • The v0.16.0 branch can be deleted (or left as a tag for historical reference).
  • Downstream pins can move to a commit on main again.

anshalshukla and others added 6 commits April 25, 2026 00:20
`decode` and `decodeFromReader` rejected a stream that contained only
the 10-byte stream-identifier chunk with `FrameError.NotFramed`, even
though the Snappy framing spec treats it as a valid representation of
an empty payload. Go's `snappy.NewReader` and Rust's
`snap::read::FrameDecoder` both accept the same input and decode it to
an empty slice; cross-client interop fixtures (e.g. leanSpec's
`test_snappy_frame_empty`) emit exactly this 10-byte form for empty
input.

The terminal post-loop check in both decode paths now requires that
both `saw_stream_identifier` and `saw_data_chunk` be unset to declare
the input unframed. A stream with the identifier alone — and no data
chunks — returns an empty slice.

Adds two regression tests against the canonical 10-byte
`"\xff\x06\x00\x00sNaPpY"` input (`decode` and `decodeFromReader`). The
existing `frame roundtrip samples` test already covered round-tripping
`""` through the lib's own encoder, but the encoder appends an empty
data chunk in `finish()`, which masked the gap on the decode side.

This is the zig-0.16-ready version of blockblaz#8 (which was cut against the
0.15.2 commit base and never reconciled with the `v0.16.0` branch).
…-0.16

fix: accept identifier-only stream as empty payload (zig-0.16 rebase of blockblaz#8)
Reconcile the `main` and `v0.16.0` branches so the default branch
ships zig 0.16 support together with the empty-stream decode fix.
Both branches independently cherry-picked the same logical empty-fix
on different bases (main on 0.15.2 via blockblaz#8, v0.16.0 on 0.16 via blockblaz#9),
which produced two collisions when merging:

  1. The terminal `if (!saw_data_chunk)` check in `decodeFromReader`
     and `decodeFramed` is the same line on both sides; keep one copy
     with v0.16.0's longer comment (more interop context).
  2. `test "decode accepts identifier-only stream as empty payload"`
     and `test "decodeFromReader accepts identifier-only stream as
     empty payload"` appear on both branches. The main copy still
     uses `std.io.fixedBufferStream` / `ArrayListUnmanaged.writer`,
     which were removed in zig 0.16 — drop those duplicates and keep
     the v0.16.0 versions that use the new `std.Io.Reader.fixed(...)`
     / `Writer.Allocating` API.

After the merge `main` carries the zig 0.16 upgrade
(`df262c6`, `f939ed6`) plus a single canonical empty-fix regression
suite, and `zig build test` is green under zig 0.16.0
(3/3 build steps, 13/13 tests).

Downstream consumers can now point at the default branch instead of
the `v0.16.0` release-style branch (which has been the only
0.16-ready snapshot until today).
`build.zig.zon` listed two dependencies — `.snappyz` and `.zig_snappy`
— with the same URL and same content hash, but `build.zig` only ever
references the first via `b.dependency("snappyz", ...)`. The
`.zig_snappy` entry has been dead since it was introduced; remove it.

No behavioural change: same lockfile content, same package tree.
`zig build test` on 0.16.0 — 3/3 build steps, 13/13 tests passed.
GrapeBaBa added a commit to blockblaz/zeam that referenced this pull request May 11, 2026
The vendored copy of `pkgs/third_party/snappyframesz/build.zig.zon`
carried two identical dependency entries — `.snappyz` and
`.zig_snappy` — with the same URL and hash. The library's `build.zig`
only references the first one (`b.dependency("snappyz", ...)`); the
second is dead weight inherited from the upstream `v0.16.0` tip.

Drop it here so the vendored copy doesn't propagate the noise. The
same change is also stacked on the upstream PR that promotes
`v0.16.0` to `main` (blockblaz/snappyframesz#10) so the next sync
won't reintroduce it.
@GrapeBaBa GrapeBaBa merged commit e95759d into blockblaz:main May 11, 2026
2 checks passed
GrapeBaBa added a commit to blockblaz/zeam that referenced this pull request May 11, 2026
Upstream blockblaz/snappyframesz#10 merged the zig 0.16 upgrade + the
empty-stream decode fix into main. Pin e95759d9 and delete
pkgs/third_party/snappyframesz/.
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