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
Improves apis consistency related to modules containing the generated protobuf assets.
Proposal
Warning: This proposal includes breaking changes.
In this discussion, I assume the project status of 0ca0630. Currently we have some inconsistency apis in these crates.
tonic-types
tonic-health
tonic-reflection
module name of protobuf
pb
proto
proto
variable name of encoded file descriptor set
FILE_DESCRIPTOR_SET
GRPC_HEALTH_V1_FILE_DESCRIPTOR_SET
FILE_DESCRIPTOR_SET
Regarding to the module name of protobuf, my proposal is to rename all module names to pb or proto. My preference is pb as pb might better represent protobuf. proto is a common word so I think pb is a more appropriate module name.
When we uses the encoded file descriptorset (for example: FILE_DESCRIPTOR_SET in tonic-types), we uses register_encoded_file_descriptor_set. However there is register_file_descriptor_set. these apis might be confusable. In this point, my proposal is to rename the current variable name of the encoded file descriptor set to ENCODED_FILE_DESCRIPTOR_SET and provide new FILE_DESCRIPTOR_SET which is the FileDescriptorSet.
Alternatives
Leaves these apis inconsistency. However we might be able to take these proposals partially. For example, renaming GRPC_HEALTH_V1_FILE_DESCRIPTOR_SET in tonic-health to FILE_DESCRIPTOR_SET can be introduced without breaking changes by just being added as a new variable.
The text was updated successfully, but these errors were encountered:
I noticed that we can not get prost_types::FileDescriptorSet as static variable since prost::Message::decode is a non-const fn. So I'll change all file descriptor set variable names to FILE_DESCRIPTOR_SET which contains byte encoded value.
Feature Request
Crates
Motivation
Improves apis consistency related to modules containing the generated protobuf assets.
Proposal
In this discussion, I assume the project status of 0ca0630. Currently we have some inconsistency apis in these crates.
Regarding to the module name of protobuf, my proposal is to rename all module names to pb or proto. My preference is pb as pb might better represent protobuf. proto is a common word so I think pb is a more appropriate module name.
When we uses the encoded file descriptorset (for example:
FILE_DESCRIPTOR_SET
in tonic-types), we usesregister_encoded_file_descriptor_set
. However there isregister_file_descriptor_set
. these apis might be confusable. In this point, my proposal is to rename the current variable name of the encoded file descriptor set toENCODED_FILE_DESCRIPTOR_SET
and provide newFILE_DESCRIPTOR_SET
which is theFileDescriptorSet
.Alternatives
Leaves these apis inconsistency. However we might be able to take these proposals partially. For example, renaming
GRPC_HEALTH_V1_FILE_DESCRIPTOR_SET
in tonic-health toFILE_DESCRIPTOR_SET
can be introduced without breaking changes by just being added as a new variable.The text was updated successfully, but these errors were encountered: