Skip to content

Commit

Permalink
Update protos file, generated files, and record a new conformance tes…
Browse files Browse the repository at this point in the history
…t failure. (apple#1753)
  • Loading branch information
thomasvl authored Feb 6, 2025
1 parent 4f6e091 commit 683e459
Show file tree
Hide file tree
Showing 106 changed files with 25,293 additions and 20,095 deletions.
38 changes: 38 additions & 0 deletions Protos/Conformance/editions/test_messages_proto2_editions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ message TestAllTypesProto2 {
// Reserved for unknown fields test.
reserved 1000 to 9999;

MessageSetCorrect message_set_correct = 500;

// message_set test case.
message MessageSetCorrect {
option message_set_wire_format = true;
Expand All @@ -338,6 +340,17 @@ message TestAllTypesProto2 {

int32 i = 9;
}

message ExtensionWithOneof {
oneof oneof_field {
int32 a = 1;
int32 b = 2;
}

extend MessageSetCorrect {
ExtensionWithOneof extension_with_oneof = 123456789;
}
}
}

message ForeignMessageProto2 {
Expand Down Expand Up @@ -640,3 +653,28 @@ message TestAllRequiredTypesProto2 {
];
}
}

message TestLargeOneof {
message A1 {
}

message A2 {
}

message A3 {
}

message A4 {
}

message A5 {
}

oneof large_oneof {
A1 a1 = 1;
A2 a2 = 2;
A3 a3 = 3;
A4 a4 = 4;
A5 a5 = 5;
}
}
27 changes: 27 additions & 0 deletions Protos/Conformance/google/protobuf/test_messages_proto2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ message TestAllTypesProto2 {
// Reserved for unknown fields test.
reserved 1000 to 9999;

optional MessageSetCorrect message_set_correct = 500;

// message_set test case.
message MessageSetCorrect {
option message_set_wire_format = true;
Expand All @@ -239,6 +241,16 @@ message TestAllTypesProto2 {
}
optional int32 i = 9;
}

message ExtensionWithOneof {
oneof oneof_field {
int32 a = 1;
int32 b = 2;
}
extend MessageSetCorrect {
optional ExtensionWithOneof extension_with_oneof = 123456789;
}
}
}

message ForeignMessageProto2 {
Expand Down Expand Up @@ -385,3 +397,18 @@ message TestAllRequiredTypesProto2 {
required int32 i = 9;
}
}

message TestLargeOneof {
message A1 {}
message A2 {}
message A3 {}
message A4 {}
message A5 {}
oneof large_oneof {
A1 a1 = 1;
A2 a2 = 2;
A3 a3 = 3;
A4 a4 = 4;
A5 a5 = 5;
}
}
23 changes: 23 additions & 0 deletions Protos/SwiftProtobuf/google/protobuf/descriptor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,29 @@ message FeatureSet {
edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" }
];

enum EnforceNamingStyle {
ENFORCE_NAMING_STYLE_UNKNOWN = 0;
STYLE2024 = 1;
STYLE_LEGACY = 2;
}
optional EnforceNamingStyle enforce_naming_style = 7 [
retention = RETENTION_SOURCE,
targets = TARGET_TYPE_FILE,
targets = TARGET_TYPE_EXTENSION_RANGE,
targets = TARGET_TYPE_MESSAGE,
targets = TARGET_TYPE_FIELD,
targets = TARGET_TYPE_ONEOF,
targets = TARGET_TYPE_ENUM,
targets = TARGET_TYPE_ENUM_ENTRY,
targets = TARGET_TYPE_SERVICE,
targets = TARGET_TYPE_METHOD,
feature_support = {
edition_introduced: EDITION_2024,
},
edition_defaults = { edition: EDITION_LEGACY, value: "STYLE_LEGACY" },
edition_defaults = { edition: EDITION_2024, value: "STYLE2024" }
];

reserved 999;

extensions 1000 to 9994 [
Expand Down
Loading

0 comments on commit 683e459

Please sign in to comment.