Reserve Root, Skip, and RootScalar in Builder.unique_name() so user $defs names can no longer collide with the generated root type alias or fixed Kind enumerators.
Allocate array-kind names (Arr0, Arr1, ...) only after checking existing object/enum names so the Kind enum never contains duplicates.
Add regression tests that also syntax-check the generated headers with a C++ compiler.
Closes #21.
- Reserve `Root`, `Skip`, and `RootScalar` in `Builder.unique_name()` so user `$defs` names can no longer collide with the generated root type alias or fixed `Kind` enumerators.
- Allocate array-kind names (`Arr0`, `Arr1`, ...) only after checking existing object/enum names so the `Kind` enum never contains duplicates.
- Add regression tests that also syntax-check the generated headers with a C++ compiler.
Make the type-name allocator aware of the identifiers the generator emits
itself (`Root` alias, `Skip`/`RootScalar` Kind enumerators) so user `$defs`
names can no longer collide with them. Array-kind names (`Arr0`, `Arr1`, ...)
are now allocated only after checking for object/enum names, preventing
duplicate `Kind` enumerators when a schema defines e.g. `Arr0`.
Add Python regression tests that also syntax-check the generated headers
with a C++ compiler.
Closes#21
weaselbot
changed title from WIP: schemagen reserve generated names to schemagen: reserve generated Root/Skip/RootScalar and avoid Kind/ArrN collisions2026-06-23 16:23:36 +00:00
andrew
merged commit e8830e27e9 into main2026-06-23 17:48:57 +00:00
andrew
deleted branch weaselbot/issue-212026-06-23 17:48:58 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #21.
Root,Skip, andRootScalarinBuilder.unique_name()so user$defsnames can no longer collide with the generated root type alias or fixedKindenumerators.Arr0,Arr1, ...) only after checking existing object/enum names so theKindenum never contains duplicates.WIP: schemagen reserve generated namesto schemagen: reserve generated Root/Skip/RootScalar and avoid Kind/ArrN collisions