Osspial / vk-rs

Collection of Rust libraries for the Vulkan API
MIT License
24 stars 4 forks source link

panic when "API Constants" uses `alias` instead of value #19

Open TimDiekmann opened 6 years ago

TimDiekmann commented 6 years ago

The parser fails, if the vk.xml has an enum without value-attribute. It can't parse the alias. Happens in vk.xml v1.1.70

Edit: You never handle any alias-names

Edit: To be honest, your error handling is horrible and you should consider using rustfmt

Osspial commented 6 years ago

It looks like aliases were only just added in 1.1.70, so there wasn't much consideration for them when this library was originally written. I feel like, for now, the simplest solution would be to add code that ignores alias-only variants, to get 1.1.70 compiling in lieu of more comprehensive alias handling.

Also, I'm pretty sure I used panics exclusively because making custom error types is a pain, the ? operator wasn't stable, and this is intended for use in build scripts where there isn't much you can do to recover from an error of this type.