Skip to content

Commit a72d937

Browse files
clintonpiglbrntt
andauthored
Use fully qualified types in generated code (#2012)
Motivation: The generated code has possible namespace collisions between user-defined types and gRPC types. Modifications: - Adjust `GRPCCodeGen` and `GRPCProtobufCodeGen` to use the fully qualified names of gRPC types when generating code. Result: This will help avoid namespace collision between user-defined types and gRPC types. --------- Co-authored-by: George Barnett <[email protected]>
1 parent 1ba0227 commit a72d937

File tree

3 files changed

+305
-305
lines changed

3 files changed

+305
-305
lines changed

Sources/InteroperabilityTests/Generated/empty_service.grpc.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public import GRPCCore
2525
internal import GRPCProtobuf
2626

2727
public enum Grpc_Testing_EmptyService {
28-
public static let descriptor = ServiceDescriptor.grpc_testing_EmptyService
28+
public static let descriptor = GRPCCore.ServiceDescriptor.grpc_testing_EmptyService
2929
public enum Method {
30-
public static let descriptors: [MethodDescriptor] = []
30+
public static let descriptors: [GRPCCore.MethodDescriptor] = []
3131
}
3232
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
3333
public typealias StreamingServiceProtocol = Grpc_Testing_EmptyServiceStreamingServiceProtocol
@@ -39,7 +39,7 @@ public enum Grpc_Testing_EmptyService {
3939
public typealias Client = Grpc_Testing_EmptyServiceClient
4040
}
4141

42-
extension ServiceDescriptor {
42+
extension GRPCCore.ServiceDescriptor {
4343
public static let grpc_testing_EmptyService = Self(
4444
package: "grpc.testing",
4545
service: "EmptyService"

0 commit comments

Comments
 (0)