Skip to content
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

Usage of default values in protobuf #46

Open
joto opened this issue Nov 19, 2015 · 0 comments
Open

Usage of default values in protobuf #46

joto opened this issue Nov 19, 2015 · 0 comments

Comments

@joto
Copy link

joto commented Nov 19, 2015

The google protobuf v3 spec doesn't allow you to define default values any more. In v3 defaults are what you would expect: 0 for integers, empty strings for strings, whatever has value 0 in enums.
(For details see https://developers.google.com/protocol-buffers/docs/proto3 and https://github.com/google/protobuf/blob/master/CHANGES.txt#L309).

We are using protobuf v2 currently, but to keep our options open for later switching to protobuf v3 I suggest we get rid of default values that don't correspond to the default values in the protobuf spec in the .proto and move any defaults we need into the vector tile spec.

Specifically this is the version field which has a default of 1 and the extent field which has a default of 4096.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants