Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rnro committed Jan 7, 2025
1 parent 5731604 commit 75b3e03
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Sources/GRPCProtobufCodeGen/ProtobufCodeGenParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ package struct ProtobufCodeGenParser {

extension ProtobufCodeGenParser {
fileprivate func codeDependencies(file: FileDescriptor) -> [Dependency] {
var codeDependencies: [Dependency] = []

if file.services.count > 0 {
codeDependencies.append(Dependency(module: "GRPCProtobuf", accessLevel: .internal))
guard file.services.count > 0 else {
return []
}

var codeDependencies: [Dependency] = [
Dependency(module: "GRPCProtobuf", accessLevel: .internal)
]
// If there's a dependency on a bundled proto then add the SwiftProtobuf import.
//
// Importing SwiftProtobuf unconditionally results in warnings in the generated
Expand Down

0 comments on commit 75b3e03

Please sign in to comment.