mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-02-05 06:39:58 +00:00
fb8bd3a65a
Stop adding options to legacy MessageDescriptors and FieldDescriptors. We would synthesize options messages containing semantic options (FieldOptions.is_packed, FieldOptions.is_weak, MessageOptions.map_entry). This information is already contained in the protoreflect descriptors, so there is no real need to define a correct options message. If we do want to include options in legacy descriptors, then we should get the original value out of the FileDescriptorProto, since it may include additional extensions or other information. This change completely removes the dependency from internal/legacy to descriptor.proto. Change-Id: Ib6bbe4ca6e0fe7ae501f3e9b11d5fa0222808410 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/171458 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>