-
Notifications
You must be signed in to change notification settings - Fork 192
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
generator: Use "Backwards-compatible" comment to detect and omit deprecated aliases #502
Conversation
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.
Dropping the backwards-compatibility aliases entirely sounds good to me.
They also don't make much sense anyway with just the |
If you're up for it, I see no reason to delay! |
vk.xml now contains the comment text "Backwards-compatible alias containing a typo" which we can use to detect intentional renames, without needing to specify explicit overrides/exceptions in the generator anymore. These deprecated constants exist for the sole reason of backwards compatibility which Vulkan cannot permit itself to remove in the C headers, but are unreasonable for crate authors to use anyway due to their `#[deprecated]` annotation whose cargo-check warnings are easy to fix by just using the non-deprecated variant instead. Furthermore, Ash is still allowing itself to perform breaking changes in its releases making this the perfect time to get rid of all these useless variants and the generator support code that comes with it. No need to come up with a "more proper" variant name if we don't generate those that "intentionally" fail to adhere to the "enum variant name" specification in the first place.
5cf2200
to
fca8109
Compare
@Ralith Done! |
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.
Very tidy!
vk.xml now contains the comment text "Backwards-compatible alias containing a typo" which we can use to detect intentional renames, without needing to specify explicit overrides/exceptions in the generator anymore.
These deprecated constants exist for the sole reason of backwards compatibility which Vulkan cannot permit itself to remove in the C headers, but are unreasonable for crate authors to use anyway due to their
#[deprecated]
annotation whose cargo-check warnings are easy to fix by just using the non-deprecated variant instead. Furthermore, Ash is still allowing itself to perform breaking changes in its releases making this the perfect time to get rid of all these useless variants and the generator support code that comes with it. No need to come up with a "more proper" variant name if we don't generate those that "intentionally" fail to adhere to the "enum variant name" specification in the first place.Perhaps we should reach a point where we just stop generating any variants with this discrepancy at all, given that we're releasing ash where breaking changes are allowed andDone!#[deprecated]
triggers check/clippy warnings already anyway. I doubt anyone uses these (EDIT: Bar all the missing#[deprecated]
annotations from https://github.com/MaikKlein/ash/pull/501/files... 😅).