-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate code file for protos with no definitions (#27)
This change is broken out of #26 ### 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. * Add empty proto file test * Add a preamble to `foo-messages.proto` * Don't unconditionally add a dependency on `GRPCProtobuf` if there are no services * Add the new test case code generation to `dev/protos/generate.sh` * Depend on `grpc-swift` `main` to pick up empty file generation changes. ### Result: We will generate a Swift source file even if no definitions are found.
- Loading branch information
Showing
8 changed files
with
874 additions
and
817 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
1,667 changes: 856 additions & 811 deletions
1,667
Tests/GRPCProtobufCodeGenTests/ProtobufCodeGeneratorTests.swift
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Leading trivia. | ||
syntax = "proto3"; | ||
|
||
package foo; | ||
|