protobuf-go/reflect
Michael Stapelberg 7c85df2652 reflect/protodesc: fix group validation: not supported in proto3
Before this change, calling dynamicpb.NewMessage() on a
protoreflect.MessageDescriptor that uses Editions would fail with:

message field "[…].relatedqueries" is an invalid group: proto: invalid under
proto2 semantics

(While Go Protobuf does not yet support Editions, C++ programs
can save descriptors to a file that is later loaded by a Go program.)

Given that groups are only supported in proto2, but not in proto3
(see https://protobuf.dev/editions/features/#message_encoding),
I think the conditional meant to say "proto3 semantics".

Change-Id: I00368e4433ca60bb883b726e34ee6b8862cfd1e7
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/554955
Reviewed-by: Cassondra Foesch <cfoesch@gmail.com>
Reviewed-by: Christian Höppner <hoeppi@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-01-09 14:54:38 +00:00
..
protodesc reflect/protodesc: fix group validation: not supported in proto3 2024-01-09 14:54:38 +00:00
protopath all: modernize documentation 2023-09-05 14:55:28 +00:00
protorange all: modernize documentation 2023-09-05 14:55:28 +00:00
protoreflect reflect/protodesc: support editions feature resolution 2023-12-08 13:18:14 +00:00
protoregistry all: modernize documentation 2023-09-05 14:55:28 +00:00