mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-26 21:24:22 +00:00
3b8611b60b
Resolves golang/protobuf#1615 The protoc compiler disallows setting the message encoding feature of map fields to delimited since maps, at least for now (as of edition 2023) should always use normal length-prefixed encoding. But the field (and a message value field inside the map entry) could inherit such a feature value if it were set as a file-wide default. At the point where the code changes the kind from message to group, based on the field's resolved features, the message type hasn't yet been resolved. So this change adds a check after the FieldDescriptor's message type is resolved, to change the kind back from group to message if the field is a map field or a field in a map entry message. Change-Id: I785269a4ecd80d1a17866c08b2afc0b01440e0e3 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/588976 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cassondra Foesch <cfoesch@gmail.com> Reviewed-by: Mike Kruskal <mkruskal@google.com> Reviewed-by: Michael Stapelberg <stapelberg@google.com> |
||
---|---|---|
.. | ||
internal_gengo | ||
testdata | ||
annotation_test.go | ||
main.go | ||
retention_test.go |