Skip to content

Commit 6c52032

Browse files
committed
Regenerate
1 parent aeaac78 commit 6c52032

File tree

6 files changed

+385
-18
lines changed

6 files changed

+385
-18
lines changed

Reference/Conformance/conformance/conformance.pb.swift

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,27 @@ enum Conformance_TestCategory: SwiftProtobuf.Enum, Swift.CaseIterable {
142142

143143
}
144144

145+
/// Meant to encapsulate all types of tests: successes, skips, failures, etc.
146+
/// Therefore, this may or may not have a failure message. Failure messages
147+
/// may be truncated for our failure lists.
148+
struct Conformance_TestStatus: Sendable {
149+
// SwiftProtobuf.Message conformance is added in an extension below. See the
150+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
151+
// methods supported on all messages.
152+
153+
var name: String = String()
154+
155+
var failureMessage: String = String()
156+
157+
/// What an actual test name matched to in a failure list. Can be wildcarded or
158+
/// an exact match without wildcards.
159+
var matchedName: String = String()
160+
161+
var unknownFields = SwiftProtobuf.UnknownStorage()
162+
163+
init() {}
164+
}
165+
145166
/// The conformance runner will request a list of failures as the first request.
146167
/// This will be known by message_type == "conformance.FailureSet", a conformance
147168
/// test should return a serialized FailureSet in protobuf_payload.
@@ -150,7 +171,7 @@ struct Conformance_FailureSet: Sendable {
150171
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
151172
// methods supported on all messages.
152173

153-
var failure: [String] = []
174+
var test: [Conformance_TestStatus] = []
154175

155176
var unknownFields = SwiftProtobuf.UnknownStorage()
156177

@@ -441,10 +462,54 @@ extension Conformance_TestCategory: SwiftProtobuf._ProtoNameProviding {
441462
]
442463
}
443464

465+
extension Conformance_TestStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
466+
static let protoMessageName: String = _protobuf_package + ".TestStatus"
467+
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
468+
1: .same(proto: "name"),
469+
2: .standard(proto: "failure_message"),
470+
3: .standard(proto: "matched_name"),
471+
]
472+
473+
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
474+
while let fieldNumber = try decoder.nextFieldNumber() {
475+
// The use of inline closures is to circumvent an issue where the compiler
476+
// allocates stack space for every case branch when no optimizations are
477+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
478+
switch fieldNumber {
479+
case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
480+
case 2: try { try decoder.decodeSingularStringField(value: &self.failureMessage) }()
481+
case 3: try { try decoder.decodeSingularStringField(value: &self.matchedName) }()
482+
default: break
483+
}
484+
}
485+
}
486+
487+
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
488+
if !self.name.isEmpty {
489+
try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
490+
}
491+
if !self.failureMessage.isEmpty {
492+
try visitor.visitSingularStringField(value: self.failureMessage, fieldNumber: 2)
493+
}
494+
if !self.matchedName.isEmpty {
495+
try visitor.visitSingularStringField(value: self.matchedName, fieldNumber: 3)
496+
}
497+
try unknownFields.traverse(visitor: &visitor)
498+
}
499+
500+
static func ==(lhs: Conformance_TestStatus, rhs: Conformance_TestStatus) -> Bool {
501+
if lhs.name != rhs.name {return false}
502+
if lhs.failureMessage != rhs.failureMessage {return false}
503+
if lhs.matchedName != rhs.matchedName {return false}
504+
if lhs.unknownFields != rhs.unknownFields {return false}
505+
return true
506+
}
507+
}
508+
444509
extension Conformance_FailureSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
445510
static let protoMessageName: String = _protobuf_package + ".FailureSet"
446511
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
447-
1: .same(proto: "failure"),
512+
2: .same(proto: "test"),
448513
]
449514

450515
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -453,21 +518,21 @@ extension Conformance_FailureSet: SwiftProtobuf.Message, SwiftProtobuf._MessageI
453518
// allocates stack space for every case branch when no optimizations are
454519
// enabled. https://github.com/apple/swift-protobuf/issues/1034
455520
switch fieldNumber {
456-
case 1: try { try decoder.decodeRepeatedStringField(value: &self.failure) }()
521+
case 2: try { try decoder.decodeRepeatedMessageField(value: &self.test) }()
457522
default: break
458523
}
459524
}
460525
}
461526

462527
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
463-
if !self.failure.isEmpty {
464-
try visitor.visitRepeatedStringField(value: self.failure, fieldNumber: 1)
528+
if !self.test.isEmpty {
529+
try visitor.visitRepeatedMessageField(value: self.test, fieldNumber: 2)
465530
}
466531
try unknownFields.traverse(visitor: &visitor)
467532
}
468533

469534
static func ==(lhs: Conformance_FailureSet, rhs: Conformance_FailureSet) -> Bool {
470-
if lhs.failure != rhs.failure {return false}
535+
if lhs.test != rhs.test {return false}
471536
if lhs.unknownFields != rhs.unknownFields {return false}
472537
return true
473538
}

Reference/upstream/conformance/conformance.pb.swift

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,27 @@ enum Conformance_TestCategory: SwiftProtobuf.Enum, Swift.CaseIterable {
142142

143143
}
144144

145+
/// Meant to encapsulate all types of tests: successes, skips, failures, etc.
146+
/// Therefore, this may or may not have a failure message. Failure messages
147+
/// may be truncated for our failure lists.
148+
struct Conformance_TestStatus: Sendable {
149+
// SwiftProtobuf.Message conformance is added in an extension below. See the
150+
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
151+
// methods supported on all messages.
152+
153+
var name: String = String()
154+
155+
var failureMessage: String = String()
156+
157+
/// What an actual test name matched to in a failure list. Can be wildcarded or
158+
/// an exact match without wildcards.
159+
var matchedName: String = String()
160+
161+
var unknownFields = SwiftProtobuf.UnknownStorage()
162+
163+
init() {}
164+
}
165+
145166
/// The conformance runner will request a list of failures as the first request.
146167
/// This will be known by message_type == "conformance.FailureSet", a conformance
147168
/// test should return a serialized FailureSet in protobuf_payload.
@@ -150,7 +171,7 @@ struct Conformance_FailureSet: Sendable {
150171
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
151172
// methods supported on all messages.
152173

153-
var failure: [String] = []
174+
var test: [Conformance_TestStatus] = []
154175

155176
var unknownFields = SwiftProtobuf.UnknownStorage()
156177

@@ -441,10 +462,54 @@ extension Conformance_TestCategory: SwiftProtobuf._ProtoNameProviding {
441462
]
442463
}
443464

465+
extension Conformance_TestStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
466+
static let protoMessageName: String = _protobuf_package + ".TestStatus"
467+
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
468+
1: .same(proto: "name"),
469+
2: .standard(proto: "failure_message"),
470+
3: .standard(proto: "matched_name"),
471+
]
472+
473+
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
474+
while let fieldNumber = try decoder.nextFieldNumber() {
475+
// The use of inline closures is to circumvent an issue where the compiler
476+
// allocates stack space for every case branch when no optimizations are
477+
// enabled. https://github.com/apple/swift-protobuf/issues/1034
478+
switch fieldNumber {
479+
case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
480+
case 2: try { try decoder.decodeSingularStringField(value: &self.failureMessage) }()
481+
case 3: try { try decoder.decodeSingularStringField(value: &self.matchedName) }()
482+
default: break
483+
}
484+
}
485+
}
486+
487+
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
488+
if !self.name.isEmpty {
489+
try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
490+
}
491+
if !self.failureMessage.isEmpty {
492+
try visitor.visitSingularStringField(value: self.failureMessage, fieldNumber: 2)
493+
}
494+
if !self.matchedName.isEmpty {
495+
try visitor.visitSingularStringField(value: self.matchedName, fieldNumber: 3)
496+
}
497+
try unknownFields.traverse(visitor: &visitor)
498+
}
499+
500+
static func ==(lhs: Conformance_TestStatus, rhs: Conformance_TestStatus) -> Bool {
501+
if lhs.name != rhs.name {return false}
502+
if lhs.failureMessage != rhs.failureMessage {return false}
503+
if lhs.matchedName != rhs.matchedName {return false}
504+
if lhs.unknownFields != rhs.unknownFields {return false}
505+
return true
506+
}
507+
}
508+
444509
extension Conformance_FailureSet: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
445510
static let protoMessageName: String = _protobuf_package + ".FailureSet"
446511
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
447-
1: .same(proto: "failure"),
512+
2: .same(proto: "test"),
448513
]
449514

450515
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -453,21 +518,21 @@ extension Conformance_FailureSet: SwiftProtobuf.Message, SwiftProtobuf._MessageI
453518
// allocates stack space for every case branch when no optimizations are
454519
// enabled. https://github.com/apple/swift-protobuf/issues/1034
455520
switch fieldNumber {
456-
case 1: try { try decoder.decodeRepeatedStringField(value: &self.failure) }()
521+
case 2: try { try decoder.decodeRepeatedMessageField(value: &self.test) }()
457522
default: break
458523
}
459524
}
460525
}
461526

462527
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
463-
if !self.failure.isEmpty {
464-
try visitor.visitRepeatedStringField(value: self.failure, fieldNumber: 1)
528+
if !self.test.isEmpty {
529+
try visitor.visitRepeatedMessageField(value: self.test, fieldNumber: 2)
465530
}
466531
try unknownFields.traverse(visitor: &visitor)
467532
}
468533

469534
static func ==(lhs: Conformance_FailureSet, rhs: Conformance_FailureSet) -> Bool {
470-
if lhs.failure != rhs.failure {return false}
535+
if lhs.test != rhs.test {return false}
471536
if lhs.unknownFields != rhs.unknownFields {return false}
472537
return true
473538
}

Reference/upstream/google/protobuf/cpp_features.pb.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ struct Pb_CppFeatures: Sendable {
5555
/// Clears the value of `stringType`. Subsequent reads from it will return its default value.
5656
mutating func clearStringType() {self._stringType = nil}
5757

58+
var enumNameUsesStringView: Bool {
59+
get {return _enumNameUsesStringView ?? false}
60+
set {_enumNameUsesStringView = newValue}
61+
}
62+
/// Returns true if `enumNameUsesStringView` has been explicitly set.
63+
var hasEnumNameUsesStringView: Bool {return self._enumNameUsesStringView != nil}
64+
/// Clears the value of `enumNameUsesStringView`. Subsequent reads from it will return its default value.
65+
mutating func clearEnumNameUsesStringView() {self._enumNameUsesStringView = nil}
66+
5867
var unknownFields = SwiftProtobuf.UnknownStorage()
5968

6069
enum StringType: SwiftProtobuf.Enum, Swift.CaseIterable {
@@ -93,6 +102,7 @@ struct Pb_CppFeatures: Sendable {
93102

94103
fileprivate var _legacyClosedEnum: Bool? = nil
95104
fileprivate var _stringType: Pb_CppFeatures.StringType? = nil
105+
fileprivate var _enumNameUsesStringView: Bool? = nil
96106
}
97107

98108
// MARK: - Extension support defined in cpp_features.proto.
@@ -151,6 +161,7 @@ extension Pb_CppFeatures: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
151161
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
152162
1: .standard(proto: "legacy_closed_enum"),
153163
2: .standard(proto: "string_type"),
164+
3: .standard(proto: "enum_name_uses_string_view"),
154165
]
155166

156167
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
@@ -161,6 +172,7 @@ extension Pb_CppFeatures: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
161172
switch fieldNumber {
162173
case 1: try { try decoder.decodeSingularBoolField(value: &self._legacyClosedEnum) }()
163174
case 2: try { try decoder.decodeSingularEnumField(value: &self._stringType) }()
175+
case 3: try { try decoder.decodeSingularBoolField(value: &self._enumNameUsesStringView) }()
164176
default: break
165177
}
166178
}
@@ -177,12 +189,16 @@ extension Pb_CppFeatures: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
177189
try { if let v = self._stringType {
178190
try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
179191
} }()
192+
try { if let v = self._enumNameUsesStringView {
193+
try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
194+
} }()
180195
try unknownFields.traverse(visitor: &visitor)
181196
}
182197

183198
static func ==(lhs: Pb_CppFeatures, rhs: Pb_CppFeatures) -> Bool {
184199
if lhs._legacyClosedEnum != rhs._legacyClosedEnum {return false}
185200
if lhs._stringType != rhs._stringType {return false}
201+
if lhs._enumNameUsesStringView != rhs._enumNameUsesStringView {return false}
186202
if lhs.unknownFields != rhs.unknownFields {return false}
187203
return true
188204
}

0 commit comments

Comments
 (0)