-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to_proto
to descriptor classes
#19971
base: main
Are you sure you want to change the base?
Conversation
There is the same name function in `upb/util/def_to_proto.c`. https://github.com/protocolbuffers/protobuf/blob/c8ad77475634f77468cd237dd10bcff978a2372a/upb/util/def_to_proto.c#L57 The amalgamation merges `upb` files into one file. So, it causes a compile error when the functions have the same name.
@@ -181,7 +181,7 @@ bool upb_FileDef_Resolves(const upb_FileDef* f, const char* path) { | |||
return false; | |||
} | |||
|
|||
static char* strviewdup(upb_DefBuilder* ctx, upb_StringView view) { | |||
static char* _strviewdup(upb_DefBuilder* ctx, upb_StringView view) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed this because there is the same name function in upb/util/def_to_proto.c
.
protobuf/upb/util/def_to_proto.c
Line 57 in c8ad774
static upb_StringView strviewdup(upb_ToProto_Context* ctx, const char* s) { |
The amalgamation merges upb
files into one file. So, it causes a compile error when the functions have the same name.
Some APIs (e.g. BigQuery Storage) use DescriptorProto for schema descriptions. But, in Ruby, there are no methods for that so far.
This PR implements the method for that(`to_proto) to descriptor classes.
Fixes #12044.