Repository navigation
Merge v0.3.0 into fork - #2
Merged
Merged
Conversation
…doc bootstrap and segment paths
Document.set now creates missing intermediate objects along a path
(e.g. set("a.b.c", v) creates a and a.b as needed) instead of returning
error.PathNotFound; array elements are still only ever replaced, never
created. Adds Document.empty for bootstrapping a document with no
source bytes, and setValueSegments/setSegments/removeSegments for
addressing a path as pre-split key segments so a key containing a
literal "." is unambiguous. set/setValue/remove now route through the
same segment-based core internally, splitting string paths the same
way as before.
The remove-comment exclusion previously took the union of both non-last/last swept-trivia sets, which over-excluded and let a real comment-loss bug (dropping the removed member's own leading comment on a non-last removal) slip past the battery. Match Document.removeSeg's three object branches exactly instead. Also switch the comment presence checks (invariants 5 and 7) from whole-output substring search to delimited-token multiset matching, so one comment's text can't be masked by another's that is a prefix of it, or by a colliding bare key.
softprops/action-gh-release v3.0.0 moves the release action from Node 20 to Node 24 and nothing else; repin from v2.6.2 to v3.0.2 by its SHA. Bump actions/checkout in ci.yml from v4 (Node 20) to v6 (Node 24) to match. Node 20 is being retired for GitHub Actions.
Manual call wrapping, hand-aligned trailing comments, and compressed single-line blocks; zig fmt canonicalizes all of it. No semantic change.
The fuzzer (fuzz/main.zig) existed but CI never ran it; run 200k deterministic iterations on every push. Add zig fmt --check to the test matrix, with .gitattributes pinning LF checkout so the gate works on Windows (Git for Windows defaults core.autocrlf on and zig fmt rejects CRLF). Also build in ReleaseFast, run the microbenchmarks on pull requests and manual dispatch, cache the zig build directory, cancel superseded runs, allow manual dispatch, and bound every job at 20 minutes.
Published numbers need to say what they were measured on; the harness now prints zig version, optimize mode, target triple, and CPU model before the table.
The previous numbers were captured inside a Linux VM (labeled aarch64-linux) on the same machine, which hid the real hardware. Re-measure natively: Apple M1 Max, Zig 0.16.0, ReleaseFast, p50 per harness run, median of ten runs, worst cross-run spread below 8% per cell, and say all of that next to the table.
Run the bench job on push as a build-and-runs gate instead of only on pull requests and manual dispatch, and widen the format check to bench/ and fuzz/, which were outside the gate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve conflicts