Skip to content

Commit

Permalink
Generate code file for protos with no definitions
Browse files Browse the repository at this point in the history
Motivation

To prepare for use in a SwiftPM build plugin which requires
deterministic output files and to match the behavior of
`proto-gen-swift` we should generate a source file even if no
definitions are found.

Modifications:

We no longer return early in the case of no definitions being found.

Result:

We will generate a Swift source file even if no definitions are found.
  • Loading branch information
rnro committed Jan 6, 2025
1 parent 3ed26da commit 9f07522
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Sources/protoc-gen-grpc-swift/GenerateGRPC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ final class GenerateGRPC: CodeGenerator {
)
}

if descriptor.services.isEmpty {
continue
}

try self.generateV2Stubs(descriptor, options: options, outputs: outputs)
}
}
Expand Down

0 comments on commit 9f07522

Please sign in to comment.