Repository navigation
Support Zig 0.17 alongside 0.16 - #2
Merged
Merged
Conversation
Zig 0.17 replaced the `fields` slice in `@typeInfo` with parallel `field_names`/`field_types`/`field_attrs` slices. Add an internal compat module that presents the 0.16 shape on both versions and route struct and union reflection through it; enums use `std.meta.fieldNames`. In build.zig, forward run arguments with `addPassthruArgs` and pass the conformance suite with `addOptionPathDirectory` when available. Also replace `StaticBitSet.initEmpty()` with `.empty` and the removed `**` operator in tests with `@splat`. CI now runs on 0.16.0 and 0.17.0.
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.
Makes json.zig build and test on both Zig 0.16 and 0.17.
fieldsin@typeInfowith parallelfield_names/field_types/field_attrsslices. New internalsrc/compat.zigpresents the 0.16 shape (structFields,unionFields) on both versions; enums usestd.meta.fieldNames.build.zig: forward run args withaddPassthruArgs(0.17) orb.args(0.16); pass the conformance suite withaddOptionPathDirectorywhen available, since 0.17'saddOptionPathexpects a fileStaticBitSet.initEmpty()→.empty**operator with@splat0.16.0and0.17.0; README and CHANGELOG updatedLocally on both versions: 57/57 tests pass,
zig fmt --checkis clean, andzig build conformanceoutput is identical.