Comments (13)
It's worth noting that this blocks proper gRPC support.
from protobuf.dart.
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.
from protobuf.dart.
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.
from protobuf.dart.
No concrete plans. (Certainly nice to have, but nobody is working on it.)
from protobuf.dart.
An intermediate step might be to make sure that we can interop with proto 3. (Apparently it should be forward/backward compatible.)
from protobuf.dart.
Well that's not the case right now. I tried compiling some proto3 stuff with this, but nope!
from protobuf.dart.
Also, this is going to be a blocker to update anything in this lib I believe.
from protobuf.dart.
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
from protobuf.dart.
Any fields are now supported with a pack and unpack method!
from protobuf.dart.
The JSON representation doesn't match the proto3 spec. There's work in progress to fix this.
Any progress on this?
from protobuf.dart.
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
from protobuf.dart.
Tak Sigurd for the Any support.
Looking forward to the Map and OneOf i.e. complete Protobuf 3 support.
Dhanyavaad.
from protobuf.dart.
Map and Oneof are now both supported.
from protobuf.dart.
Related Issues (20)
- Unknown Fields HOT 12
- How do you generate via buf? HOT 2
- Error: Couldn't find constructor 'GrpcServiceName'. HOT 8
- Generate nullable types from WKT wrappers HOT 1
- Bad state: No element HOT 3
- GeneratedMessage constructors with `result` parameter conflict with `result` local var. HOT 1
- toProto3Json converts Int64 values to strings HOT 1
- Impossible to distinguish the `oneof` fields from non-`oneof` fields when creating/using a generated class instance. HOT 4
- How to access google.protobuf.FieldOptions extensions? HOT 1
- Prohibit ..deepCopy() call HOT 1
- Generated gRPC client method stubs get no comments or deprecation annotations HOT 1
- Incompatibility with Java-generated Serialized Protocol Buffer in Dart Protocol Buffers Library
- `protoc` does not generate built-in types HOT 1
- The `.values` field of a generated enum class contains the zero-valued unspecified value HOT 1
- Inconvenient to add an alternate name to each enum value using Enum Value Options
- [protoc_plugin] Error `The method '$_clearField' isn't defined for the class 'DartMixin'.` HOT 1
- [protoc_plugin] Plugin output is unparseable HOT 1
- Error: A value of type 'List<dynamic>' can't be returned from the function 'symbol' because it has a return type of 'PbList<ProtoOALightSymbol>'
- Error "The named parameter 'valueDefaultOrMaker' isn't defined." in version 21.1.2 (protoc 26.1) HOT 3
- Add iOS privacy manifest HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf.dart.