dproto
dproto copied to clipboard
D Protocol Buffer mixins to create structures at compile time
The map data type has a special proto syntax. The serialization of map map_field = N; is backward compatible to message MapFieldEntry { key_type key = 1; value_type value =...
Previously it is worked well. I'm not sure: this error in my code or in dproto code? dproto normally throws only its own exceptions? ``` core.exception.RangeError@std/bitmanip.d(2987): Range violation ---------------- ??:?...
[protoc 2.6.0](https://groups.google.com/forum/#!topic/protobuf/lvI8-sWZbUY) added support for [unions/`oneof`](https://developers.google.com/protocol-buffers/docs/proto#oneof)
```d enum def2=` message Node { Node node1 = 1; Node node2 = 2; } `; mixin ProtocolBufferFromString!(def2); void test2(){ Node node; node.node1=Node(); node.node1.node2=Node(); import std.stdio; writeln(node); } ``` Error:...
http://stackoverflow.com/questions/18873924/what-does-the-protobuf-text-format-look-like ref: https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.text_format#TextFormat.Parser.WriteLocationsTo.details I only see json and binary serialization (wire format) the text format is more convenient than json and is commonly used would be nice to have it...
replying to a private email I received so others can chime in here: > Do not you think that it's time to implement generation of D code directly > into...
The code coverage is currently broken. The unwanted side effect is that there is no green state in the PR overview because a response from coverage is missing. Solution is...
@msoucy proto syntax supports annotations via option: https://developers.google.com/protocol-buffers/docs/proto ``` import "google/protobuf/descriptor.proto"; extend google.protobuf.FieldOptions { optional float my_field_option = 50002; } message MyMessage { optional int32 foo = 1 [(my_field_option) =...
The proto2 specification allows for imported data structures to be specified precisely using _package specifiers_, as described here: https://developers.google.com/protocol-buffers/docs/proto#packages However, dproto fails to handle package specifiers, emitting an `undefined identifier`...
@msoucy in C++ we can write: ``` message MyMessage{ optional Foo foo=1; } message Foo{ optional Bar bar=1; } message Bar{ optional string baz=1; } ``` ``` MyMessage a; a.mutable_foo()->mutable_bar()->set_baz("hello");...