-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce mandatory mechanism for specifying protobuf field numbers
Previously, field numbers were assigned automatically during protobuf schema generation, based on iteration order of properties in a data class. Since properties are iterated in alphabetical order, it is very easy to modify the data class in a way that changes a lot of field numbers, introducing a breaking change to the protobuf schema. This commit introduces the annotation `@ProtobufField` as a mandatory mechanism for explicitly providing field numbers. If a data class that uses `@ProtobufGen` has a property without `@ProtobufField`, the protobuf code generator fails. The fields in the protobuf schema are generated in the field number order, not in alphabetical order. This is to make sure that a Vert.x-generated and `protoc`-generated serializers produce outputs that are not just mutually _compatible_, but also _binary identical_.
- Loading branch information
Showing
12 changed files
with
538 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.