-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UR] Automatically generate ur_structure_type_t #670
Conversation
scripts/parse_specs.py
Outdated
@@ -914,6 +969,9 @@ def parse(section, version, tags, meta, ref): | |||
}) | |||
|
|||
specs = sorted(specs, key=lambda s: s['header']['ordinal']) | |||
_inline_extended_structs(specs, meta) | |||
registry = [f for f in files if f.endswith('registry.yml')][0] | |||
_generate_structure_type_t(specs, meta, registry) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I understand why this can't simply be a part of the generate_registry
function. Right now it's called almost immediately after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps an artifact of a previous iteration of this change when it was generating a separate file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To generate the structure type we need to inline the extended structs, which happens after generate_registry
, but since registry does not depend on this we could run these steps together after _inline_extended_structs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pbalcer I've refactored this so now the entire registry.yml
file is generated together.
e4ca6a6
to
20ba1e5
Compare
20ba1e5
to
2f73f77
Compare
This PR automatically generates $x_structure_type_t enumerations.