Skip to content
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

Add automatic checks of the XML to the CI #959

Open
4 tasks
kpet opened this issue Aug 9, 2023 · 1 comment
Open
4 tasks

Add automatic checks of the XML to the CI #959

kpet opened this issue Aug 9, 2023 · 1 comment

Comments

@kpet
Copy link
Contributor

kpet commented Aug 9, 2023

@SunSerega
Copy link
Contributor

SunSerega commented Aug 10, 2023

Surprisingly, my bindings were packing just fine even without my suggestion in #958.
I only got a couple of new warnings in the log: "cl_ prefix missing" and "enum wasn't used" - then it got filtered out and couldn't affect anything further.

I can suggest dozens of small sanity checks (like having valid prefixes/suffixes) which I already do when parsing XML from this repo + a few more complicated ones when code-generating my bindings.
But I'm not sure how appropriate it would be to check all the little things in this repo's tests. It might just make creating pulls less convenient, because when there are many small checks - some of them would inevitably give false negatives once in a while.

Off the top of my head, I can only think of one thing that would be great to check: vendor names/suffixes.
For instance, in some places capitalization of ARM is inconsistent:

    <enums name="cl_arm_svm_alloc.flags" vendor="ARM" type="bitmask">

vs

    <enums name="cl_command_termination_reason_arm" vendor="Arm">

For my sanity checks I also made this table, so I can automatically determine that, for instance, IMG in CL_MIPMAP_FILTER_ANY_IMG refers to a vendor, rather than being part of the name.
That table is good enough for what I'm doing, but not really good enough to add to XML as is. Some vendor names/suffixes are missing. Would probably also help to add some annotation for each vendor. But I don't know many of those vendors well enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants