-
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
Support extensions for proto2 in Ruby? #6420
Comments
Sorry that we don't have time to add support for proto2 in ruby now. Is it possible for you to use proto3? |
Sorry for the inconvenience.
|
Hi, As I wrote above, my only problem is with extensions support in proto2 (this is the reason it fails). Also, please note that also a n "ignore" option is OK for me since I don't really serialize the extended fields. Is it still something hard to implement (mode that ignores extensions in proto2)? Thanks! |
Hello,
I'm trying to compile proto2 file to Ruby (using "protoc --ruby_out=...") and get this error:
Extensions are not yet supported for proto2 .proto files.
I've found this issue that seems to be related but it's still open (from 2016).
Few questions:
Are there any plans to support extensions for proto2 in Ruby?
I'm not very familiar with protobuf, but I read that the challenge is to support it in the DSL. Assuming that I don't use these fields of the extensions, is it an option to support telling the compiler to skip it in the generated Ruby models but support encoding to bytes with those fields as empty?
More than that, I'm actually only interested in encoding. Is there any way to encode Ruby hash to bytes based on proto definition without having the model in the middle? E.g, something like:
Instead of:
There's actually a JS tool called protobuf.js that generates a JSON descriptors file from proto file and allows exactly that, so if someone knows of a tool that can encode Ruby hashes to bytes based on JSON descriptors I'd love to hear.
Thanks!
The text was updated successfully, but these errors were encountered: