Send a subset of protobuf descriptors #86
Merged
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.
Summary
Updates the protobuf descriptor to send only the subset of descriptors needed to describe a given protobuf publisher message.
I had a internal crate that had a large number of protobuf message definitions all under the same protobuf package. My naive initial implementation would send the entire descriptor pool of every message for every publisher 😬. Besides being overly verbose it would confuse ecal_mon_gui when trying to parse the messages.
There was also a large amount of comments from the original .proto (prost_types::FileDescriptorProto::source_code_info) that was being send along with the descriptor which is not needed. Also the documentation states it can be removed. https://docs.rs/prost-types/latest/prost_types/struct.FileDescriptorProto.html#structfield.source_code_info Now the descriptor more closely aligns to the form of C++ ecal_sample_person_send.
Related Issues / Discussions
Related to #80
Checklist
cargo check,cargo test)