Commit be41136
authored
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.1 parent 3ed26da commit be41136
File tree
8 files changed
+874
-817
lines changed- Sources
- GRPCProtobufCodeGen
- protoc-gen-grpc-swift
- Tests/GRPCProtobufCodeGenTests
- Generated
- dev/protos
- local
8 files changed
+874
-817
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | | - | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 66 | | |
71 | 67 | | |
72 | 68 | | |
| |||
Binary file not shown.
Binary file not shown.
Lines changed: 856 additions & 811 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
122 | 133 | | |
123 | 134 | | |
124 | 135 | | |
| |||
152 | 163 | | |
153 | 164 | | |
154 | 165 | | |
| 166 | + | |
155 | 167 | | |
156 | 168 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
0 commit comments