protobuf-go/internal/conformance
Lasse Folger 9d9d8d3ef5 encoding/proto[json|text]: accept lower case names for group-like fields
This is a result of the discussion in [1]. Before editions, a group defined a multiple things:

* a type
* a field
* an encoding scheme

With editions this has changed and groups no longer exist and the different parts have to be defined individually. Most importantly, the field and the type also had the same name (usually and CamelCase name). To keep compatibility with proto2 groups, [2] introduced a concept of group-like fields and adjusted the Text/JSON parsers to accept the type name instead of the field name for such fields. This means you can convert from proto2 groups to editions without changing the semantics.
Furthermore, to avoid suprises with group-like fields (e.g. when a user by coincident specified a field that is group-like) protobuf decided that group-like fields should always accept the type and the field name for group like fields. This also allows us to eventually emit the field name rather than the type name for group like fields in the future.

This change implements this decision in Go.


[1] https://github.com/protocolbuffers/protobuf/issues/16239
[2] https://go.dev/cl/575916

Change-Id: I701c4cd228d2e0867b2a87771b6c6331459c4910
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/582755
Reviewed-by: Lasse Folger <lassefolger@google.com>
Reviewed-by: Mike Kruskal <mkruskal@google.com>
Commit-Queue: Michael Stapelberg <stapelberg@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Stapelberg <stapelberg@google.com>
Auto-Submit: Michael Stapelberg <stapelberg@google.com>
2024-05-06 08:56:34 +00:00
..
conformance_test.go all: update to protobuf 27.0-rc1 and regenerate protos 2024-05-03 08:08:45 +00:00
failing_tests_text_format.txt encoding/proto[json|text]: accept lower case names for group-like fields 2024-05-06 08:56:34 +00:00
failing_tests.txt all: update to protobuf 27.0-rc1 and regenerate protos 2024-05-03 08:08:45 +00:00