Repository navigation
Support Zig 0.17 alongside 0.16 - #49
Merged
Merged
Conversation
Zig 0.17 replaced the `fields` and `decls` slices in `@typeInfo` with parallel `field_names`/`field_types`/`field_attrs`/`decl_names` slices. Add an internal compat module that presents the 0.16 shape on both versions and route struct/union reflection through it. Also replace `std.meta.Int` with `@Int`, `StaticBitSet.initEmpty()` with `.empty`, and the removed `**` operator in tests with `@splat`. CI now runs on 0.16.0 and 0.17.0.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 msgpack.zig build and test on both Zig 0.16 and 0.17.
fields/declsin@typeInfowith parallelfield_names/field_types/field_attrs/decl_namesslices. New internalsrc/compat.zigpresents the 0.16 shape (structFields,unionFields,declNames) on both versions;struct.zig,union.zigand the smoke-test coverage check use it.std.meta.Int→@Int,StaticBitSet.initEmpty()→.empty**operator with@splat0.16.0and0.17.0; README and CHANGELOG updated187/187 tests pass locally on both versions.
Note: 0.17's
zig fmtrewrites@intFromEnumto@backingInt, which 0.16 doesn't have, sosrc/enum.zigis onlyzig fmtclean under 0.16. CI doesn't runzig fmt --check, but./check.shshould be run with 0.16 until 0.16 support is dropped.Summary by CodeRabbit