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
Missing Well Known Protobuf Types in Ruby gem #1284
Comments
I would really like to see this fixed before google-protobuf 3.0 is released. If you can give me some guidance on how you want this to be addressed I'd be happy to submit a pull request for it. |
Hi there, thanks for the report and the offer to fix! I agree that the well-known types should be included in the gem. Feel free to submit a PR for this. Ultimately we should include descriptor.proto in the gem also, which should provide |
AFAICT,
|
@haberman How do you want the well known types to be added to the gem? Can I simply submit a PR to add the generated ruby files? Or should those ruby files be generated for each gem build? I'm not sure how the gem is built and released so I'm not sure if the generated ruby files need to be added to the git repo or not. |
Ah, I should clarify something. We need both. In particular, custom options are declared as extensions of the proto classes -- see https://developers.google.com/protocol-buffers/docs/proto#customoptions |
We should generate the well-known types in the Rakefile, so they are built each time. |
This was fixed in the attached PR. |
@haberman Is there an ETA when this will be released? |
@blowmage these should've been released by the way: 3.0.0.alpha.5.0.4 on rubygems. |
Hi all! I'm super excited to be using grpc and protobuf in ruby! We are working on a client to connect to several Google Cloud services, and we are having an issue using the protobuf files from the google/googleapis project. Several core/well known protobuf types were removed from that project with the assumption that they would be provided by this project. And those protobuf files do now exist in this project, but they are not included in the ruby gem.
The python package looks to build these well known protobuf types as part of its build process. But in ruby those files are missing.
To get around this we've had to compile these protobuf files into ruby and host them in our project, but we would much rather have these files provided by the gem. Is that possible?
I should also note that even though
google.protobuf.Descriptor
is provided in the C code of the ruby gem, any proto3 files that import it will addrequire 'google/protobuf/descriptor'
to the generated ruby code. So we've created an empty file so those requires will succeed. So even if these well known types are provided in the C code we will still need those paths available to be required in ruby.Thanks!
The text was updated successfully, but these errors were encountered: