generator: Demote vk-parse
error-asserts to a warning message
#960
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #959
When
vk-parse
encounters XML parsing errors (e.g. on unknown attributes or elements) it skips the element and emits an error in a list of errors that are returned to the caller. We were originally never checking these leading to hard-to-debug issues, but eventually started asserting on this list being empty or otherwise panicking in #930.Since
ash
's generator is used in Khronos' upstream CI (in a fallible yet warning way), any new attribute would cause the generator to fail and subsequently require updates tovk-parse
andash
before their CI is no longer flagged as "succeeded with warnings". "Solve" this by once again allowing errors to exist, while still at least printing them tostderr
for insights (that were previously missing...) to anyone running the generator.Note @oddhack that this once again allows the generator to fail further in the chain when expected elements are missing, in which case an update is required either way. If this happens often we can adjust
vk-parse
to be more lenient in still emitting errors but continuing to parse said element, if the new/unrecognized elements or attributes are considered harmless to the parsing process.