Skip to content
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

Any plans on supporting protobuf 3? #156

Closed
Pacane opened this issue Jul 31, 2016 · 13 comments
Closed

Any plans on supporting protobuf 3? #156

Pacane opened this issue Jul 31, 2016 · 13 comments

Comments

@Pacane
Copy link

Pacane commented Jul 31, 2016

^

@skybrian
Copy link
Contributor

skybrian commented Aug 2, 2016

No concrete plans. (Certainly nice to have, but nobody is working on it.)

@skybrian
Copy link
Contributor

skybrian commented Aug 2, 2016

An intermediate step might be to make sure that we can interop with proto 3. (Apparently it should be forward/backward compatible.)

@Pacane
Copy link
Author

Pacane commented Aug 2, 2016

Well that's not the case right now. I tried compiling some proto3 stuff with this, but nope!

@Pacane
Copy link
Author

Pacane commented Aug 2, 2016

Also, this is going to be a blocker to update anything in this lib I believe.

@nemequ
Copy link

nemequ commented Oct 12, 2016

It's worth noting that this blocks proper gRPC support.

@jakobr-google jakobr-google self-assigned this Jan 6, 2017
@Brahmasmi
Copy link

Would it be possible to please share the current status of support for Protobuf 3?

The intended use case is to use grpc-dart in a flutter app for the communication stack. This would help replace Java and Swift grpc communication stacks with a common Dart one.

Thanks.

@jakobr-google @mit-mit @skybrian

@jakobr-google
Copy link
Contributor

Sure! The current status is that proto3 support mostly works, since the wire format is backwards compatible, but we have a bit of work to do before we can claim full support.

So, gRPC services defined in a proto3 document should work, but with some caveats:

  • The JSON representation doesn't match the proto3 spec. There's work in progress to fix this.
  • Proto3 fields don't have special support, specifically:
    • Maps show up a lists of entries instead of a proper map in Dart
    • OneOf fields don't properly clear the other fields when a new one is set and we don't yet have an accessor to show which field is set
    • Any fields will probably just show up as a blob.

Apart from that, compiling a proto3 definition to Dart code should work, including gRPC services. If you're not using any of the above, you should be fine. If you are, you'll need to work around the missing support for now.

Full proto3 support is coming up.

@Brahmasmi
Copy link

Danke @jakobr-google for the detailed update. It feels great to see the possibility of a common gRPC Dart communication stack.

Would it be possible for you to share an approximate timeline for the full proto3 support? Q1/2/3/4 2018?

Thanks.

@sigurdm
Copy link
Collaborator

sigurdm commented Aug 31, 2018

Any fields are now supported with a pack and unpack method!

@eredo
Copy link

eredo commented Oct 30, 2018

The JSON representation doesn't match the proto3 spec. There's work in progress to fix this.

Any progress on this?

@sigurdm
Copy link
Collaborator

sigurdm commented Oct 30, 2018

The JSON representation doesn't match the proto3 spec. There's work in progress to fix this.

Any progress on this?

This is being worked on here: #83
We are going to support both json with name-keys and with numeric keys

@Brahmasmi
Copy link

Tak Sigurd for the Any support.

Looking forward to the Map and OneOf i.e. complete Protobuf 3 support.

Dhanyavaad.

@mit-mit mit-mit transferred this issue from dart-archive/dart-protoc-plugin Dec 14, 2018
@szakarias
Copy link
Member

Map and Oneof are now both supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants