Skip to content

Update protos file, generated files, and record a new conformance test failure. #1753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading