protobuf-go/reflect/protodesc
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
..
desc_init.go reflect/protodesc: support editions feature resolution 2023-12-08 13:18:14 +00:00
desc_resolve.go
desc_validate.go reflect/protodesc: fix group validation: not supported in proto3 2024-01-09 14:54:38 +00:00
desc.go reflect/protodesc: support editions feature resolution 2023-12-08 13:18:14 +00:00
editions_defaults.binpb reflect/protodesc: support editions feature resolution 2023-12-08 13:18:14 +00:00
editions.go reflect/protodesc: support editions feature resolution 2023-12-08 13:18:14 +00:00
file_test.go reflect/protodesc: don't generate invalid syntax values 2023-11-08 07:09:48 +00:00
proto.go reflect/protodesc: don't generate invalid syntax values 2023-11-08 07:09:48 +00:00