-
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
Conversation
9f2cd99
to
964ec01
Compare
Thanks for contributing this PR, @y-yagi! The tests are really close to passing, but there seems to be an issue on macOS. Both the Ruby 3.0 and Ruby 3.4 tests are failing on macOS with a failure like this:
The same tests are passing on Linux and under FFI on the macOS, and the other descriptor tests are working as expected - it is just enum descriptor test without FFI that is having an issue. I'm going to re-run the tests now to see if the test failures are stable or if the tests are flaky. Do you have a macOS machine available to troubleshoot this on in the meantime? |
51e54e3
to
1afd9e8
Compare
I'm doubting I released an arena too early. So I fixed the timing of it. 1afd9e8 |
This comment was marked as resolved.
This comment was marked as resolved.
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.
1afd9e8
to
8d50ae2
Compare
I've rebased with the latest code. |
Some APIs (e.g. [BigQuery Storage](https://github.com/googleapis/googleapis/blob/ab61c52324b39d1c8619a96ab19cc6c173b13f2c/google/cloud/bigquery/storage/v1/protobuf.proto#L39)) 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. Closes #19971 FUTURE_COPYBARA_INTEGRATE_REVIEW=#19971 from y-yagi:add_to_proto_to_descriptors 8d50ae2 PiperOrigin-RevId: 723099882
Some APIs (e.g. [BigQuery Storage](https://github.com/googleapis/googleapis/blob/ab61c52324b39d1c8619a96ab19cc6c173b13f2c/google/cloud/bigquery/storage/v1/protobuf.proto#L39)) 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. Closes #19971 FUTURE_COPYBARA_INTEGRATE_REVIEW=#19971 from y-yagi:add_to_proto_to_descriptors 8d50ae2 PiperOrigin-RevId: 723117256
Some APIs (e.g. [BigQuery Storage](https://github.com/googleapis/googleapis/blob/ab61c52324b39d1c8619a96ab19cc6c173b13f2c/google/cloud/bigquery/storage/v1/protobuf.proto#L39)) 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. Closes #19971 FUTURE_COPYBARA_INTEGRATE_REVIEW=#19971 from y-yagi:add_to_proto_to_descriptors 8d50ae2 PiperOrigin-RevId: 723117256
Some APIs (e.g. [BigQuery Storage](https://github.com/googleapis/googleapis/blob/ab61c52324b39d1c8619a96ab19cc6c173b13f2c/google/cloud/bigquery/storage/v1/protobuf.proto#L39)) 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. Closes #19971 FUTURE_COPYBARA_INTEGRATE_REVIEW=#19971 from y-yagi:add_to_proto_to_descriptors 8d50ae2 PiperOrigin-RevId: 723117256
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.