Recursively mark chained children for kotlin gen Update mark_n2k to recursively mark all potential chained children for native to Kotlin conversion. This ensures that all the necessary ToKotlin functions are generated and fixes a downstream build error where WGPUCompatibilityModeLimits is not currently being generated. This was already done for mark_k2n. This is a fix to unblock the Dawn into Google3 roll. Change-Id: I7e76aa8494c789ad7a6571ea4b20552a5b11ab21 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/296756 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Natalie Chouinard <chouinard@google.com>
diff --git a/generator/dawn_json_generator.py b/generator/dawn_json_generator.py index c6a8f6b..3a97702 100644 --- a/generator/dawn_json_generator.py +++ b/generator/dawn_json_generator.py
@@ -879,6 +879,9 @@ # Recursively mark all members of this structure. for member in typ.members: mark_n2k(member.type) + # Recursively mark all potential chained children. + for child in chain_children.get(typ.name.get(), []): + mark_n2k(child) def mark_k2n(typ): # Only proceed if it's a structure and hasn't been marked yet to avoid infinite recursion.