Skip to content

Commit

Permalink
Update MessageSet decoding to only take the first values.
Browse files Browse the repository at this point in the history
Looks like more things have been following upb on behaviors and there's
more specific enforcement happening for other languages, so that that
for Swift also.

If a sub field for proper MessageSet encoding is repeated, only honor
the first value for each of the fields, skipping all others. This
aligns with the other languages.

Add new tests to cover this behavior.
  • Loading branch information
thomasvl authored Feb 11, 2025
1 parent 683e459 commit eb17584
Show file tree
Hide file tree
Showing 17 changed files with 10,022 additions and 9,495 deletions.
1,185 changes: 593 additions & 592 deletions Protos/SwiftProtobufTests/generated_swift_names_enum_cases.proto

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ message GeneratedSwiftReservedEnums {
enum Google_Protobuf_UninterpretedOption { NONE_Google_Protobuf_UninterpretedOption = 0; }
enum Google_Protobuf_Value { NONE_Google_Protobuf_Value = 0; }
enum goPackage { NONE_goPackage = 0; }
enum gotData { NONE_gotData = 0; }
enum group { NONE_group = 0; }
enum groupFieldNumberStack { NONE_groupFieldNumberStack = 0; }
enum groupSize { NONE_groupSize = 0; }
Expand Down
Loading

0 comments on commit eb17584

Please # to comment.