diff --git a/Package.swift b/Package.swift index 0931529c5..5ce8a2b29 100644 --- a/Package.swift +++ b/Package.swift @@ -48,7 +48,7 @@ let packageDependencies: [Package.Dependency] = [ ), .package( url: "https://github.com/apple/swift-protobuf.git", - from: "1.20.1" + from: "1.20.2" ), .package( url: "https://github.com/apple/swift-log.git", diff --git a/Package@swift-5.5.swift b/Package@swift-5.5.swift index a6806791f..116070a64 100644 --- a/Package@swift-5.5.swift +++ b/Package@swift-5.5.swift @@ -49,7 +49,7 @@ let packageDependencies: [Package.Dependency] = [ .package( name: "SwiftProtobuf", url: "https://github.com/apple/swift-protobuf.git", - from: "1.19.0" + from: "1.20.2" ), .package( url: "https://github.com/apple/swift-log.git", diff --git a/Sources/protoc-gen-grpc-swift/StreamingType.swift b/Sources/protoc-gen-grpc-swift/StreamingType.swift index c6f108d3f..bb22f4464 100644 --- a/Sources/protoc-gen-grpc-swift/StreamingType.swift +++ b/Sources/protoc-gen-grpc-swift/StreamingType.swift @@ -38,14 +38,14 @@ extension StreamingType { } internal func streamingType(_ method: MethodDescriptor) -> StreamingType { - if method.proto.clientStreaming { - if method.proto.serverStreaming { + if method.clientStreaming { + if method.serverStreaming { return .bidirectionalStreaming } else { return .clientStreaming } } else { - if method.proto.serverStreaming { + if method.serverStreaming { return .serverStreaming } else { return .unary diff --git a/Sources/protoc-gen-grpc-swift/main.swift b/Sources/protoc-gen-grpc-swift/main.swift index 76387fba2..091428a97 100644 --- a/Sources/protoc-gen-grpc-swift/main.swift +++ b/Sources/protoc-gen-grpc-swift/main.swift @@ -125,8 +125,8 @@ func main() throws { // Only generate output for services. for name in request.fileToGenerate { - let fileDescriptor = descriptorSet.lookupFileDescriptor(protoName: name) - if !fileDescriptor.services.isEmpty { + if let fileDescriptor = descriptorSet.fileDescriptor(named: name), + !fileDescriptor.services.isEmpty { let grpcFileName = uniqueOutputFileName( component: "grpc", fileDescriptor: fileDescriptor,