-
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
Update addressbook.proto, tutorial code and documentation #565
Comments
Note that now we need a proto3 version of addressbook.proto. This may affect other platforms, and could do with an overhaul to follow proto3 conventions anyway (e.g. repeated field names). Will need to think about that carefully before merging into master. Raised issue protocolbuffers#565 for this.
@xfxyjwf @anandolee, should everyone be using the proto3 version of the file in the future? If we want everyone to migrate to proto3 addressbook (which shouldn't be hard, because the addressbook examples are pretty simple), we should probably do this work in upstream/master first and then pull this change into csharp-experimental rather than the other way round (we don't want too many unrelated changes in the big PR to merge C# to master, because it's going to be big enough). |
The examples directory is intended to show users how to build their project with protobuf (also to verify that protobuf installation works). We don't need to cover every API version there. As we are advocating proto3, changing addressbook.proto to proto3 seems good to me. |
…tocolbuffers#565) A prior changed (see protocolbuffers#511) allows Unmarshal to treat fields with unknown wire types with known tags as unknown fields. When doing so, we must be careful not to set the required field bit. For example, suppose we have: message Foo { require fixed32 my_field = 1; } Then parsing a message with a field of type varint and tag 1 should not satisfy the required that Foo.my_field be set.
…enum inner options, see protocolbuffers#565; Other minor optimizations
Currently addressbook.proto is proto2.
We should either update it to proto3, or create a new equivalent for proto3. This should follow the new repeated fields naming convention of using plurals.
The csharp_experimental branch will soon have a proto3 version which has just removed the proto2 aspects of the file - we should consider this carefully before merging into master.
The text was updated successfully, but these errors were encountered: