镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[cel-types] Add TypeDefSet and bidirectional FileDescriptorSet conversion. - #2342

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_996098089
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_996098089

Conversation

@copybara-service

Copy link
Copy Markdown

[cel-types] Add TypeDefSet and bidirectional FileDescriptorSet conversion.

Provide cel::TypeDefSet to represent an indexed collection of unique TypeDef objects and enums with Protobuf and YAML serialization helpers (TypeDefSetToProto, TypeDefSetFromProto, TypeDefSetToYaml, TypeDefSetFromYaml).

Extend ProtoObjectProperties, ProtoFieldProperties, and ProtoEnumProperties with file names, extension ranges, real oneof names, explicit field labels, non-default field types, and enum default values so protobuf schemas can round-trip without losing fidelity. Implement FileDescriptorSetToTypeDefSet and TypeDefSetToFileDescriptorSet in common/typedef/proto_to_typedef to convert between FileDescriptorSet and TypeDefSet, mapping CEL well-known types to built-in TypeSpec representations and reconstructing nested message/enum hierarchies, real and synthetic proto3_optional oneofs, map entries, and leading source comments.

…sion.

Provide `cel::TypeDefSet` to represent an indexed collection of unique `TypeDef` objects and enums with Protobuf and YAML serialization helpers (`TypeDefSetToProto`, `TypeDefSetFromProto`, `TypeDefSetToYaml`, `TypeDefSetFromYaml`).

Extend `ProtoObjectProperties`, `ProtoFieldProperties`, and `ProtoEnumProperties` with file names, extension ranges, real oneof names, explicit field labels, non-default field types, and enum default values so protobuf schemas can round-trip without losing fidelity. Implement `FileDescriptorSetToTypeDefSet` and `TypeDefSetToFileDescriptorSet` in `common/typedef/proto_to_typedef` to convert between `FileDescriptorSet` and `TypeDefSet`, mapping CEL well-known types to built-in `TypeSpec` representations and reconstructing nested message/enum hierarchies, real and synthetic `proto3_optional` oneofs, map entries, and leading source comments.

PiperOrigin-RevId: 996098089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant