protobuf-activerecord icon indicating copy to clipboard operation
protobuf-activerecord copied to clipboard

Doesn't work with Google's protobuf gem

Open gthank opened this issue 7 years ago • 3 comments

I'm trying to use Protocol Buffers to transmit data from a Python project into a Rails project. I'm using a .proto file (in v3 syntax) and the protoc compiler to guarantee the data is being transferred in a format both sides understand. As a consequence, the Ruby class def for the message does not expose the same API. In particular, the all_fields method does not exist, which breaks to_proto.

gthank avatar Sep 13 '17 19:09 gthank

This is currently written to be compatible with the ruby-protobuf/protobuf gem, which does not yet support the v3 Protocol Buffers syntax. Happy to review a PR if you'd like to take a crack at making this compatible.

liveh2o avatar Oct 04 '17 16:10 liveh2o

I've reverted to v2 for the moment so I can use the lib as-is. I started a fork to add side-by-side support for the google-protobuf gem so I could add v3 support, but they require different versions of protoc, and I didn't have time to work through all the details of how ruby-protobuf patches in Ruby support to the old protoc.

gthank avatar Oct 04 '17 17:10 gthank

I feel your pain, @gthank...

liveh2o avatar Oct 04 '17 19:10 liveh2o