commit | 381f04c1028a1c061e30d743e9a95fab84e93054 | [log] [tgz] |
---|---|---|
author | Joe Tsai <joetsai@digital-static.net> | Thu Dec 06 12:10:41 2018 -0800 |
committer | Joe Tsai <thebrokentoaster@gmail.com> | Fri Dec 07 19:42:29 2018 +0000 |
tree | bf1864a79c1204b2003b5afe9377e8d34464e4f1 | |
parent | a4cbffe4bcbad833cba75e6e16223b2c7c88b48a [diff] |
reflect/protoreflect: add MessageDescriptor.ExtensionRangeOptions Considerable thought was given to whether a seperate ExtensionRanges interface should be made that encapsulates FieldNumbers with an Options method. However, I decided against this design for the following reasons: * Extension ranges share syntax with reserved numbers and fields. Why is extension ranges so special that it can have options, while the other two currently do not? How do we know that those other two won't grow options in the future? If they do, then those APIs can be expanded in the same way as how extension range options is being expanded here today. * Extension range options stand out like a sore thumb compared to the other eight options. The other options correspond with a named declaration and have a full protobuf name that they are associated with. Extension range options is the only options that is not correlated with a full name. * Extension range options are an extremely rarely used feature and it seems unfortunate complicating the common case with additional structure. Change-Id: Ib284a0b798c57dc264febe304692eee5b9c8e91b Reviewed-on: https://go-review.googlesource.com/c/153018 Reviewed-by: Damien Neil <dneil@google.com>
WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.
This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.
List of relevant design documents:
We appreciate community contributions. See CONTRIBUTING.md.
Issues regarding the new API can be filed at github.com/golang/protobuf. Please use a APIv2:
prefix in the title to make it clear that the issue is regarding the new API work.