Skip to content

Commit b4d355e

Browse files
authored
Regenerate protos after update (#54)
Motivation: swift-protobuf released a new version which modified generated code slightly. Our CI job for checking up-to-date generated code now fails. Modifications: - Update generated code Result: CI passes
1 parent baadf43 commit b4d355e

File tree

4 files changed

+28
-112
lines changed

4 files changed

+28
-112
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ let dependencies: [Package.Dependency] = [
5151
),
5252
.package(
5353
url: "https://github.com/apple/swift-protobuf.git",
54-
from: "1.28.1"
54+
from: "1.31.0"
5555
),
5656
.package(
5757
url: "https://github.com/apple/swift-distributed-tracing.git",

Sources/GRPCHealthService/Generated/health.pb.swift

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ fileprivate let _protobuf_package = "grpc.health.v1"
134134

135135
extension Grpc_Health_V1_HealthCheckRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
136136
package static let protoMessageName: String = _protobuf_package + ".HealthCheckRequest"
137-
package static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
138-
1: .same(proto: "service"),
139-
]
137+
package static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}service\0")
140138

141139
package mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
142140
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -166,9 +164,7 @@ extension Grpc_Health_V1_HealthCheckRequest: SwiftProtobuf.Message, SwiftProtobu
166164

167165
extension Grpc_Health_V1_HealthCheckResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
168166
package static let protoMessageName: String = _protobuf_package + ".HealthCheckResponse"
169-
package static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
170-
1: .same(proto: "status"),
171-
]
167+
package static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}status\0")
172168

173169
package mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
174170
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -197,12 +193,7 @@ extension Grpc_Health_V1_HealthCheckResponse: SwiftProtobuf.Message, SwiftProtob
197193
}
198194

199195
extension Grpc_Health_V1_HealthCheckResponse.ServingStatus: SwiftProtobuf._ProtoNameProviding {
200-
package static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
201-
0: .same(proto: "UNKNOWN"),
202-
1: .same(proto: "SERVING"),
203-
2: .same(proto: "NOT_SERVING"),
204-
3: .same(proto: "SERVICE_UNKNOWN"),
205-
]
196+
package static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}SERVING\0\u{1}NOT_SERVING\0\u{1}SERVICE_UNKNOWN\0")
206197
}
207198

208199
extension Grpc_Health_V1_HealthListRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
@@ -226,9 +217,7 @@ extension Grpc_Health_V1_HealthListRequest: SwiftProtobuf.Message, SwiftProtobuf
226217

227218
extension Grpc_Health_V1_HealthListResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
228219
package static let protoMessageName: String = _protobuf_package + ".HealthListResponse"
229-
package static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
230-
1: .same(proto: "statuses"),
231-
]
220+
package static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}statuses\0")
232221

233222
package mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
234223
while let fieldNumber = try decoder.nextFieldNumber() {

Sources/GRPCInteropTests/Generated/messages.pb.swift

Lines changed: 14 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public struct Grpc_Testing_BoolValue: Sendable {
8787
}
8888

8989
/// A block of data, to simply increase gRPC message size.
90-
public struct Grpc_Testing_Payload: @unchecked Sendable {
90+
public struct Grpc_Testing_Payload: Sendable {
9191
// SwiftProtobuf.Message conformance is added in an extension below. See the
9292
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
9393
// methods supported on all messages.
@@ -407,16 +407,12 @@ public struct Grpc_Testing_ReconnectInfo: Sendable {
407407
fileprivate let _protobuf_package = "grpc.testing"
408408

409409
extension Grpc_Testing_PayloadType: SwiftProtobuf._ProtoNameProviding {
410-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
411-
0: .same(proto: "COMPRESSABLE"),
412-
]
410+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0COMPRESSABLE\0")
413411
}
414412

415413
extension Grpc_Testing_BoolValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
416414
public static let protoMessageName: String = _protobuf_package + ".BoolValue"
417-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
418-
1: .same(proto: "value"),
419-
]
415+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}value\0")
420416

421417
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
422418
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -446,10 +442,7 @@ extension Grpc_Testing_BoolValue: SwiftProtobuf.Message, SwiftProtobuf._MessageI
446442

447443
extension Grpc_Testing_Payload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
448444
public static let protoMessageName: String = _protobuf_package + ".Payload"
449-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
450-
1: .same(proto: "type"),
451-
2: .same(proto: "body"),
452-
]
445+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{1}body\0")
453446

454447
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
455448
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -484,10 +477,7 @@ extension Grpc_Testing_Payload: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
484477

485478
extension Grpc_Testing_EchoStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
486479
public static let protoMessageName: String = _protobuf_package + ".EchoStatus"
487-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
488-
1: .same(proto: "code"),
489-
2: .same(proto: "message"),
490-
]
480+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}code\0\u{1}message\0")
491481

492482
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
493483
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -522,16 +512,7 @@ extension Grpc_Testing_EchoStatus: SwiftProtobuf.Message, SwiftProtobuf._Message
522512

523513
extension Grpc_Testing_SimpleRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
524514
public static let protoMessageName: String = _protobuf_package + ".SimpleRequest"
525-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
526-
1: .standard(proto: "response_type"),
527-
2: .standard(proto: "response_size"),
528-
3: .same(proto: "payload"),
529-
4: .standard(proto: "fill_username"),
530-
5: .standard(proto: "fill_oauth_scope"),
531-
6: .standard(proto: "response_compressed"),
532-
7: .standard(proto: "response_status"),
533-
8: .standard(proto: "expect_compressed"),
534-
]
515+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}response_type\0\u{3}response_size\0\u{1}payload\0\u{3}fill_username\0\u{3}fill_oauth_scope\0\u{3}response_compressed\0\u{3}response_status\0\u{3}expect_compressed\0")
535516

536517
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
537518
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -600,11 +581,7 @@ extension Grpc_Testing_SimpleRequest: SwiftProtobuf.Message, SwiftProtobuf._Mess
600581

601582
extension Grpc_Testing_SimpleResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
602583
public static let protoMessageName: String = _protobuf_package + ".SimpleResponse"
603-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
604-
1: .same(proto: "payload"),
605-
2: .same(proto: "username"),
606-
3: .standard(proto: "oauth_scope"),
607-
]
584+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}payload\0\u{1}username\0\u{3}oauth_scope\0")
608585

609586
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
610587
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -648,10 +625,7 @@ extension Grpc_Testing_SimpleResponse: SwiftProtobuf.Message, SwiftProtobuf._Mes
648625

649626
extension Grpc_Testing_StreamingInputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
650627
public static let protoMessageName: String = _protobuf_package + ".StreamingInputCallRequest"
651-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
652-
1: .same(proto: "payload"),
653-
2: .standard(proto: "expect_compressed"),
654-
]
628+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}payload\0\u{3}expect_compressed\0")
655629

656630
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
657631
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -690,9 +664,7 @@ extension Grpc_Testing_StreamingInputCallRequest: SwiftProtobuf.Message, SwiftPr
690664

691665
extension Grpc_Testing_StreamingInputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
692666
public static let protoMessageName: String = _protobuf_package + ".StreamingInputCallResponse"
693-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
694-
1: .standard(proto: "aggregated_payload_size"),
695-
]
667+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}aggregated_payload_size\0")
696668

697669
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
698670
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -722,11 +694,7 @@ extension Grpc_Testing_StreamingInputCallResponse: SwiftProtobuf.Message, SwiftP
722694

723695
extension Grpc_Testing_ResponseParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
724696
public static let protoMessageName: String = _protobuf_package + ".ResponseParameters"
725-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
726-
1: .same(proto: "size"),
727-
2: .standard(proto: "interval_us"),
728-
3: .same(proto: "compressed"),
729-
]
697+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}size\0\u{3}interval_us\0\u{1}compressed\0")
730698

731699
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
732700
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -770,12 +738,7 @@ extension Grpc_Testing_ResponseParameters: SwiftProtobuf.Message, SwiftProtobuf.
770738

771739
extension Grpc_Testing_StreamingOutputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
772740
public static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallRequest"
773-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
774-
1: .standard(proto: "response_type"),
775-
2: .standard(proto: "response_parameters"),
776-
3: .same(proto: "payload"),
777-
7: .standard(proto: "response_status"),
778-
]
741+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}response_type\0\u{3}response_parameters\0\u{1}payload\0\u{4}\u{4}response_status\0")
779742

780743
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
781744
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -824,9 +787,7 @@ extension Grpc_Testing_StreamingOutputCallRequest: SwiftProtobuf.Message, SwiftP
824787

825788
extension Grpc_Testing_StreamingOutputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
826789
public static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallResponse"
827-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
828-
1: .same(proto: "payload"),
829-
]
790+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}payload\0")
830791

831792
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
832793
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -860,9 +821,7 @@ extension Grpc_Testing_StreamingOutputCallResponse: SwiftProtobuf.Message, Swift
860821

861822
extension Grpc_Testing_ReconnectParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
862823
public static let protoMessageName: String = _protobuf_package + ".ReconnectParams"
863-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
864-
1: .standard(proto: "max_reconnect_backoff_ms"),
865-
]
824+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}max_reconnect_backoff_ms\0")
866825

867826
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
868827
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -892,10 +851,7 @@ extension Grpc_Testing_ReconnectParams: SwiftProtobuf.Message, SwiftProtobuf._Me
892851

893852
extension Grpc_Testing_ReconnectInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
894853
public static let protoMessageName: String = _protobuf_package + ".ReconnectInfo"
895-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
896-
1: .same(proto: "passed"),
897-
2: .standard(proto: "backoff_ms"),
898-
]
854+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}passed\0\u{3}backoff_ms\0")
899855

900856
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
901857
while let fieldNumber = try decoder.nextFieldNumber() {

0 commit comments

Comments
 (0)