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

FieldRange should support "to max" as a valid rhs value #7

Open
perezd opened this issue Aug 2, 2020 · 0 comments
Open

FieldRange should support "to max" as a valid rhs value #7

perezd opened this issue Aug 2, 2020 · 0 comments
Labels

Comments

@perezd
Copy link
Owner

perezd commented Aug 2, 2020

This would also be required for extension ranges.

Documentation on how it can be used:
https://developers.google.com/protocol-buffers/docs/reference/proto2-spec#extensions

Also note, that multiple "x to y" interval ranges can be declared: https://developers.google.com/protocol-buffers/docs/proto#reserved_values (which is supported today according to the tests).

Additionally, upon inspection of this class, this should be changed to use rangeClosed instead of range:
https://github.com/perezd/protopoet/blob/master/java/protopoet/FieldRange.java#L48

Presumably we'll use Integer.MAX_VALUE to signal "max" and so that'll break as it is today if we do.

@perezd perezd added the proto2 label Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant