Skip to content

Commit a011e71

Browse files
authored
Regenerate protos (#4)
Motivation: SwiftProtobuf 1.30.0 was released recently and includes a few changes in the code it generates. This now trips up our CI job which checks our generated code is up-to-date. Modifications: Regenerate protos Result: CI passes
1 parent b0dda37 commit a011e71

File tree

3 files changed

+32
-31
lines changed

3 files changed

+32
-31
lines changed

Tests/GRPCCoreTests/Configuration/Generated/rls.pb.swift

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,16 @@ fileprivate let _protobuf_package = "grpc.lookup.v1"
134134

135135
extension Grpc_Lookup_V1_RouteLookupRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
136136
static let protoMessageName: String = _protobuf_package + ".RouteLookupRequest"
137-
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
138-
3: .standard(proto: "target_type"),
139-
5: .same(proto: "reason"),
140-
6: .standard(proto: "stale_header_data"),
141-
4: .standard(proto: "key_map"),
142-
7: .same(proto: "extensions"),
143-
]
137+
static let _protobuf_nameMap = SwiftProtobuf._NameMap(
138+
reservedNames: ["server", "path"],
139+
reservedRanges: [1..<3],
140+
numberNameMappings: [
141+
3: .standard(proto: "target_type"),
142+
5: .same(proto: "reason"),
143+
6: .standard(proto: "stale_header_data"),
144+
4: .standard(proto: "key_map"),
145+
7: .same(proto: "extensions"),
146+
])
144147

145148
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
146149
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -198,11 +201,14 @@ extension Grpc_Lookup_V1_RouteLookupRequest.Reason: SwiftProtobuf._ProtoNameProv
198201

199202
extension Grpc_Lookup_V1_RouteLookupResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
200203
static let protoMessageName: String = _protobuf_package + ".RouteLookupResponse"
201-
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
202-
3: .same(proto: "targets"),
203-
2: .standard(proto: "header_data"),
204-
4: .same(proto: "extensions"),
205-
]
204+
static let _protobuf_nameMap = SwiftProtobuf._NameMap(
205+
reservedNames: ["target"],
206+
reservedRanges: [1..<2],
207+
numberNameMappings: [
208+
3: .same(proto: "targets"),
209+
2: .standard(proto: "header_data"),
210+
4: .same(proto: "extensions"),
211+
])
206212

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

Tests/GRPCCoreTests/Configuration/Generated/rls_config.pb.swift

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -587,17 +587,20 @@ extension Grpc_Lookup_V1_HttpKeyBuilder: SwiftProtobuf.Message, SwiftProtobuf._M
587587

588588
extension Grpc_Lookup_V1_RouteLookupConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
589589
static let protoMessageName: String = _protobuf_package + ".RouteLookupConfig"
590-
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
591-
1: .standard(proto: "http_keybuilders"),
592-
2: .standard(proto: "grpc_keybuilders"),
593-
3: .standard(proto: "lookup_service"),
594-
4: .standard(proto: "lookup_service_timeout"),
595-
5: .standard(proto: "max_age"),
596-
6: .standard(proto: "stale_age"),
597-
7: .standard(proto: "cache_size_bytes"),
598-
8: .standard(proto: "valid_targets"),
599-
9: .standard(proto: "default_target"),
600-
]
590+
static let _protobuf_nameMap = SwiftProtobuf._NameMap(
591+
reservedNames: ["request_processing_strategy"],
592+
reservedRanges: [10..<11],
593+
numberNameMappings: [
594+
1: .standard(proto: "http_keybuilders"),
595+
2: .standard(proto: "grpc_keybuilders"),
596+
3: .standard(proto: "lookup_service"),
597+
4: .standard(proto: "lookup_service_timeout"),
598+
5: .standard(proto: "max_age"),
599+
6: .standard(proto: "stale_age"),
600+
7: .standard(proto: "cache_size_bytes"),
601+
8: .standard(proto: "valid_targets"),
602+
9: .standard(proto: "default_target"),
603+
])
601604

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

Tests/GRPCCoreTests/Configuration/Generated/service_config.pb.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2549,15 +2549,11 @@ extension Grpc_ServiceConfig_RlsLoadBalancingPolicyConfig: SwiftProtobuf.Message
25492549
var _childPolicy: [Grpc_ServiceConfig_LoadBalancingConfig] = []
25502550
var _childPolicyConfigTargetFieldName: String = String()
25512551

2552-
#if swift(>=5.10)
25532552
// This property is used as the initial default value for new instances of the type.
25542553
// The type itself is protecting the reference to its storage via CoW semantics.
25552554
// This will force a copy to be made of this reference when the first mutation occurs;
25562555
// hence, it is safe to mark this as `nonisolated(unsafe)`.
25572556
static nonisolated(unsafe) let defaultInstance = _StorageClass()
2558-
#else
2559-
static let defaultInstance = _StorageClass()
2560-
#endif
25612557

25622558
private init() {}
25632559

@@ -3692,15 +3688,11 @@ extension Grpc_ServiceConfig_XdsClusterResolverLoadBalancingPolicyConfig.Discove
36923688
var _overrideHostStatus: [Grpc_ServiceConfig_OverrideHostLoadBalancingPolicyConfig.HealthStatus] = []
36933689
var _telemetryLabels: Dictionary<String,String> = [:]
36943690

3695-
#if swift(>=5.10)
36963691
// This property is used as the initial default value for new instances of the type.
36973692
// The type itself is protecting the reference to its storage via CoW semantics.
36983693
// This will force a copy to be made of this reference when the first mutation occurs;
36993694
// hence, it is safe to mark this as `nonisolated(unsafe)`.
37003695
static nonisolated(unsafe) let defaultInstance = _StorageClass()
3701-
#else
3702-
static let defaultInstance = _StorageClass()
3703-
#endif
37043696

37053697
private init() {}
37063698

0 commit comments

Comments
 (0)