Skip to content

Commit 88c4a54

Browse files
committed
Update generated code
Motivation: Newer protobuf versions changed how they generate code, so CI now fails. Modifications: Update generated code, bump minimum protobuf version Result: Protobuf is more up-to-date
1 parent bdff45d commit 88c4a54

File tree

9 files changed

+47
-190
lines changed

9 files changed

+47
-190
lines changed

Examples/v1/Echo/Model/echo.pb.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ fileprivate let _protobuf_package = "echo"
6666

6767
extension Echo_EchoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
6868
public static let protoMessageName: String = _protobuf_package + ".EchoRequest"
69-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
70-
1: .same(proto: "text"),
71-
]
69+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}text\0")
7270

7371
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
7472
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -98,9 +96,7 @@ extension Echo_EchoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme
9896

9997
extension Echo_EchoResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
10098
public static let protoMessageName: String = _protobuf_package + ".EchoResponse"
101-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
102-
1: .same(proto: "text"),
103-
]
99+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}text\0")
104100

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

Examples/v1/HelloWorld/Model/helloworld.pb.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ fileprivate let _protobuf_package = "helloworld"
6666

6767
extension Helloworld_HelloRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
6868
public static let protoMessageName: String = _protobuf_package + ".HelloRequest"
69-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
70-
1: .same(proto: "name"),
71-
]
69+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}name\0")
7270

7371
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
7472
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -98,9 +96,7 @@ extension Helloworld_HelloRequest: SwiftProtobuf.Message, SwiftProtobuf._Message
9896

9997
extension Helloworld_HelloReply: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
10098
public static let protoMessageName: String = _protobuf_package + ".HelloReply"
101-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
102-
1: .same(proto: "message"),
103-
]
99+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}message\0")
104100

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

Examples/v1/RouteGuide/Model/route_guide.pb.swift

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,7 @@ fileprivate let _protobuf_package = "routeguide"
174174

175175
extension Routeguide_Point: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
176176
public static let protoMessageName: String = _protobuf_package + ".Point"
177-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
178-
1: .same(proto: "latitude"),
179-
2: .same(proto: "longitude"),
180-
]
177+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}latitude\0\u{1}longitude\0")
181178

182179
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
183180
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -212,10 +209,7 @@ extension Routeguide_Point: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme
212209

213210
extension Routeguide_Rectangle: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
214211
public static let protoMessageName: String = _protobuf_package + ".Rectangle"
215-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
216-
1: .same(proto: "lo"),
217-
2: .same(proto: "hi"),
218-
]
212+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}lo\0\u{1}hi\0")
219213

220214
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
221215
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -254,10 +248,7 @@ extension Routeguide_Rectangle: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
254248

255249
extension Routeguide_Feature: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
256250
public static let protoMessageName: String = _protobuf_package + ".Feature"
257-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
258-
1: .same(proto: "name"),
259-
2: .same(proto: "location"),
260-
]
251+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}name\0\u{1}location\0")
261252

262253
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
263254
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -296,10 +287,7 @@ extension Routeguide_Feature: SwiftProtobuf.Message, SwiftProtobuf._MessageImple
296287

297288
extension Routeguide_RouteNote: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
298289
public static let protoMessageName: String = _protobuf_package + ".RouteNote"
299-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
300-
1: .same(proto: "location"),
301-
2: .same(proto: "message"),
302-
]
290+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}location\0\u{1}message\0")
303291

304292
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
305293
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -338,12 +326,7 @@ extension Routeguide_RouteNote: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
338326

339327
extension Routeguide_RouteSummary: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
340328
public static let protoMessageName: String = _protobuf_package + ".RouteSummary"
341-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
342-
1: .standard(proto: "point_count"),
343-
2: .standard(proto: "feature_count"),
344-
3: .same(proto: "distance"),
345-
4: .standard(proto: "elapsed_time"),
346-
]
329+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}point_count\0\u{3}feature_count\0\u{1}distance\0\u{3}elapsed_time\0")
347330

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

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ let packageDependencies: [Package.Dependency] = [
5656
),
5757
.package(
5858
url: "https://github.com/apple/swift-protobuf.git",
59-
from: "1.28.1"
59+
from: "1.31.0"
6060
),
6161
.package(
6262
url: "https://github.com/apple/swift-log.git",

Sources/GRPCReflectionService/v1/reflection-v1.pb.swift

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public struct Grpc_Reflection_V1_ServerReflectionResponse: Sendable {
252252
/// Serialized FileDescriptorProto messages sent by the server answering
253253
/// a file_by_filename, file_containing_symbol, or file_containing_extension
254254
/// request.
255-
public struct Grpc_Reflection_V1_FileDescriptorResponse: @unchecked Sendable {
255+
public struct Grpc_Reflection_V1_FileDescriptorResponse: Sendable {
256256
// SwiftProtobuf.Message conformance is added in an extension below. See the
257257
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
258258
// methods supported on all messages.
@@ -338,14 +338,7 @@ fileprivate let _protobuf_package = "grpc.reflection.v1"
338338

339339
extension Grpc_Reflection_V1_ServerReflectionRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
340340
public static let protoMessageName: String = _protobuf_package + ".ServerReflectionRequest"
341-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
342-
1: .same(proto: "host"),
343-
3: .standard(proto: "file_by_filename"),
344-
4: .standard(proto: "file_containing_symbol"),
345-
5: .standard(proto: "file_containing_extension"),
346-
6: .standard(proto: "all_extension_numbers_of_type"),
347-
7: .standard(proto: "list_services"),
348-
]
341+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}host\0\u{4}\u{2}file_by_filename\0\u{3}file_containing_symbol\0\u{3}file_containing_extension\0\u{3}all_extension_numbers_of_type\0\u{3}list_services\0")
349342

350343
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
351344
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -448,10 +441,7 @@ extension Grpc_Reflection_V1_ServerReflectionRequest: SwiftProtobuf.Message, Swi
448441

449442
extension Grpc_Reflection_V1_ExtensionRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
450443
public static let protoMessageName: String = _protobuf_package + ".ExtensionRequest"
451-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
452-
1: .standard(proto: "containing_type"),
453-
2: .standard(proto: "extension_number"),
454-
]
444+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}containing_type\0\u{3}extension_number\0")
455445

456446
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
457447
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -486,14 +476,7 @@ extension Grpc_Reflection_V1_ExtensionRequest: SwiftProtobuf.Message, SwiftProto
486476

487477
extension Grpc_Reflection_V1_ServerReflectionResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
488478
public static let protoMessageName: String = _protobuf_package + ".ServerReflectionResponse"
489-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
490-
1: .standard(proto: "valid_host"),
491-
2: .standard(proto: "original_request"),
492-
4: .standard(proto: "file_descriptor_response"),
493-
5: .standard(proto: "all_extension_numbers_response"),
494-
6: .standard(proto: "list_services_response"),
495-
7: .standard(proto: "error_response"),
496-
]
479+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}valid_host\0\u{3}original_request\0\u{4}\u{2}file_descriptor_response\0\u{3}all_extension_numbers_response\0\u{3}list_services_response\0\u{3}error_response\0")
497480

498481
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
499482
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -604,9 +587,7 @@ extension Grpc_Reflection_V1_ServerReflectionResponse: SwiftProtobuf.Message, Sw
604587

605588
extension Grpc_Reflection_V1_FileDescriptorResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
606589
public static let protoMessageName: String = _protobuf_package + ".FileDescriptorResponse"
607-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
608-
1: .standard(proto: "file_descriptor_proto"),
609-
]
590+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}file_descriptor_proto\0")
610591

611592
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
612593
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -636,10 +617,7 @@ extension Grpc_Reflection_V1_FileDescriptorResponse: SwiftProtobuf.Message, Swif
636617

637618
extension Grpc_Reflection_V1_ExtensionNumberResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
638619
public static let protoMessageName: String = _protobuf_package + ".ExtensionNumberResponse"
639-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
640-
1: .standard(proto: "base_type_name"),
641-
2: .standard(proto: "extension_number"),
642-
]
620+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}base_type_name\0\u{3}extension_number\0")
643621

644622
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
645623
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -674,9 +652,7 @@ extension Grpc_Reflection_V1_ExtensionNumberResponse: SwiftProtobuf.Message, Swi
674652

675653
extension Grpc_Reflection_V1_ListServiceResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
676654
public static let protoMessageName: String = _protobuf_package + ".ListServiceResponse"
677-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
678-
1: .same(proto: "service"),
679-
]
655+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}service\0")
680656

681657
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
682658
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -706,9 +682,7 @@ extension Grpc_Reflection_V1_ListServiceResponse: SwiftProtobuf.Message, SwiftPr
706682

707683
extension Grpc_Reflection_V1_ServiceResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
708684
public static let protoMessageName: String = _protobuf_package + ".ServiceResponse"
709-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
710-
1: .same(proto: "name"),
711-
]
685+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}name\0")
712686

713687
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
714688
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -738,10 +712,7 @@ extension Grpc_Reflection_V1_ServiceResponse: SwiftProtobuf.Message, SwiftProtob
738712

739713
extension Grpc_Reflection_V1_ErrorResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
740714
public static let protoMessageName: String = _protobuf_package + ".ErrorResponse"
741-
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
742-
1: .standard(proto: "error_code"),
743-
2: .standard(proto: "error_message"),
744-
]
715+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}error_code\0\u{3}error_message\0")
745716

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

0 commit comments

Comments
 (0)