_This change should have no user impact._ And you can see that the only changes to generated files are in comments. Before this change, we used comments to denote reserved or deprecated fields. This works, but I think we should instead use the `reserved` keyword, which offers a few advantages. From [the protobuf docs][0]: > If you update a message type by entirely removing a field, or > commenting it out, future users can reuse the field number when making > their own updates to the type. This can cause severe issues if they > later load old versions of the same .proto, including data corruption, > privacy bugs, and so on. One way to make sure this doesn't happen is > to specify that the field numbers (and/or names, which can also cause > issues for JSON serialization) of your deleted fields are reserved. > The protocol buffer compiler will complain if any future users try to > use these field identifiers. This updates our proto files to use `reserved` instead of comments. It also adds support to our wrapper script. (I moved a few things around in that script, too, for consistency.) I think this is a useful change on its own, but I think it'll make things a little better when we deprecate some fields, which we're planning to do soon. [0]: https://developers.google.com/protocol-buffers/docs/proto3#reserved |
||
|---|---|---|
| .. | ||
| ContactDiscovery.proto | ||
| DeviceTransfer.proto | ||
| Fingerprint.proto | ||
| Groups.proto | ||
| KeyBackup.proto | ||
| Makefile | ||
| Provisioning.proto | ||
| README.md | ||
| SessionRecord.proto | ||
| SignalIOS.proto | ||
| SignalService.proto | ||
| StorageService.proto | ||
| WebSocketResources.proto | ||
SignalServiceKit Protobufs
These protobuf definitions are copied from Signal-Android, but modified to match some iOS conventions.
Prerequisites
Install Apple's swift-protobuf (not the similarly named protobuf-swift)
brew install swift-protobuf
This should install an up to date protobuf package as a dependency. Note that since we use the legacy proto2 format, we need to specify this in our .proto files.
syntax = "proto2";
Building Protobuf
cd ~/src/WhisperSystems/SignalServiceKit/protobuf
make