Motivation: Generated code may rely on messages which ship with SwiftProtobuf, as such we should always import SwiftProtobuf. Modifications: - Import SwiftProtobuf in codegen Result: Resolves #951
@@ -22,6 +22,7 @@
//
import GRPC
import NIO
+import SwiftProtobuf
/// Usage: instantiate Echo_EchoClient, then call methods of this protocol to make API calls.
/// Usage: instantiate Helloworld_GreeterClient, then call methods of this protocol to make API calls.
/// Usage: instantiate Routeguide_RouteGuideClient, then call methods of this protocol to make API calls.
@@ -90,6 +90,7 @@ class Generator {
let moduleNames = [
self.options.gRPCModuleName,
"NIO",
+ "SwiftProtobuf",
]
for moduleName in (moduleNames + self.options.extraModuleImports).sorted() {
/// Usage: instantiate A_ServiceAClient, then call methods of this protocol to make API calls.
/// Usage: instantiate B_ServiceBClient, then call methods of this protocol to make API calls.
import ModuleB
/// Usage: instantiate Codegentest_FooClient, then call methods of this protocol to make API calls.
internal final class Codegentest_FooTestClient: Codegentest_FooClientProtocol {