The pyi generator now includes Kythe annotations for:
* Extension field constants (e.g., `EXTENSION_FIELD`).
* Field number constants (e.g., `STRING_FIELD_FIELD_NUMBER`).
* `Create` methods in generated Stubby client classes.
These annotations allow the Python indexer to link these generated symbols back to their definitions in the `.proto` files.
PiperOrigin-RevId: 852971617
Note that this is a behavior where JRuby "native" has different behavior than CRuby or JRuby FFI.
The CRuby / FFI behavior is a longstanding nonconformance, which is to treat all enums as open. While this is nonconformant, we keep this behavior because it is more useful than respecting closed enum semantics.
PiperOrigin-RevId: 850508608
Instead of giving every MiniTable two parallel arrays (fields and subs), we now have one block of memory that contains both lists.
For sub-message or enum fields, the `upb_MiniTableField` now contains a byte offset to where the `upb_MiniTable*` or `upb_MiniTableEnum*` can be found.
The new design offers several benefits:
1. The sub-table requires fewer pointer-chasing indirections to find.
2. We no longer need the `upb_MiniTable*` to find the sub-MiniTable -- the `upb_MiniTableField*` is enough now. So APIs like `upb_MiniTable_GetSubMessageTable()` now require fewer parameters.
3. This unifies fields and extensions -- both can now find a sub-table using exactly the same code, with no need to distinguish between them.
We still benefit from having two lists. If we tried to put the sub-table pointer directly into `upb_MiniTableField`, it would double the size of `upb_MiniTableField` from 12 to 24 bytes, due to alignment. Using the current design, sub-message fields only take 20 bytes, while others take 12, so this design is an improvement even if 100% of fields are sub-message fields.
PiperOrigin-RevId: 833329706