You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8a0569e
Browse filesBrowse the repository at this point in the historyBrowse files
Simplify Service_info: replace file_name and package_service_names with file_descriptor_proto
Remove the file_name and package_service_names fields from the Service_info
module interface, replacing them with a file_descriptor_proto field that
contains the serialized FileDescriptorProto bytes. This provides a more
canonical and self-contained reflection mechanism, since all metadata
(file name, services, etc.) can be derived from the descriptor itself.
- Remove package_service_name tracking from service code generation
- Add file_descriptor_proto as serialized proto bytes to Service_info
- Simplify emit_service_type to no longer return package_service_name
- Update reflection tests to verify roundtrip deserialization
- Update echo example to use the new Call.name accessor
let file_descriptor_bytes =Spec.Descriptor.Google.Protobuf.FileDescriptorProto.to_proto fd |>Ocaml_protoc_plugin.Writer.contents |>String.escaped in
452
442
let file_descriptor =Spec.Descriptor.Google.Protobuf.FileDescriptorProto.show fd in
453
443
Code.emit implementation `Begin"module Service_info : Runtime'.Service.Service_info with type t = Descriptor.Google.Protobuf.FileDescriptorProto.t = struct";
454
444
Code.emit implementation `None"type t = Descriptor.Google.Protobuf.FileDescriptorProto.t";
0 commit comments