mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-29 00:32:43 +00:00
9e454d6514
Before this CL we only used features where they were applicable, e.g. file features were only set on the file descriptor and field features only on the fields descriptor. After this CL all descriptors (file, message and field) contain always all features and when initializing either of them we merge the features specified by options with the features of the parent descriptor and use the result as the effective feature. This way we initialize all the descriptors the same way and the proto spec can change on which level features can be specified without us having to change the code (at the moment most features can only be specified on file or field level, in the future message might also be possible). Change-Id: I822202bf6a2bba5167bf9622c91a65c4523e78f9 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/555975 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Stapelberg <stapelberg@google.com>