Repository navigation
[cel-types] Add FileDescriptorSetToTypeDefSet descriptor conversion. - #2427
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
CEL type definitions need a direct bridge from compiled Protocol Buffers `FileDescriptorSet` schemas into `cel::TypeDefSet` so message and enum definitions can be inspected, serialized, and later reconstructed. Implement `FileDescriptorSetToTypeDefSet` in `common/typedef/proto_to_typedef` to convert non-well-known `proto2`, `proto3`, and `editions` message and enum descriptors into `TypeDefSet`, documenting dialect-specific protobuf features that are intentionally omitted. Standard CEL well-known types map to their built-in `TypeSpec` equivalents, synthetic map-entry messages collapse into `map<K, V>` fields, real protobuf `oneof` declarations map to `StructTypeDef::Oneof` groups, and `"proto"` `cel::Aspect` properties capture file names, `allow_alias`, field numbers, custom `json_name` overrides, non-default field types, and `oneof` names alongside explicit `proto2` defaults and leading source comments. PiperOrigin-RevId: 1010058776
copybara-service
Bot
force-pushed
the
test_1010058776
branch
from
November 3, 2026 00:46
d02cc25 to
2d81494
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
[cel-types] Add FileDescriptorSetToTypeDefSet descriptor conversion.
CEL type definitions need a direct bridge from compiled Protocol Buffers
FileDescriptorSetschemas intocel::TypeDefSetso message and enum definitions can be inspected, serialized, and later reconstructed.Implement
FileDescriptorSetToTypeDefSetincommon/typedef/proto_to_typedefto convert non-well-knownproto2,proto3, andeditionsmessage and enum descriptors intoTypeDefSet, documenting dialect-specific protobuf features that are intentionally omitted. Standard CEL well-known types map to their built-inTypeSpecequivalents, synthetic map-entry messages collapse intomap<K, V>fields, real protobufoneofdeclarations map toStructTypeDef::Oneofgroups, and"proto"cel::Aspectproperties capture file names,allow_alias, field numbers, customjson_nameoverrides, non-default field types, andoneofnames alongside explicitproto2defaults and leading source comments.