@@ -94,10 +94,65 @@ function generate_health_service {
9494 generate_grpc " $proto " " $( dirname " $proto " ) " " $output " " Visibility=Package" " Client=true" " Server=true" " UseAccessLevelOnImports=true"
9595}
9696
97+ function generate_reflection_service {
98+ local proto=" $here /upstream/grpc/reflection/v1/reflection.proto"
99+ local output=" $root /Sources/GRPCReflectionService/Generated"
100+
101+ # Messages were accidentally leaked into public API, they shouldn't be but we
102+ # can't undo that change until the next major version.
103+ generate_message " $proto " " $( dirname " $proto " ) " " $output " " Visibility=Package" " UseAccessLevelOnImports=true"
104+ generate_grpc " $proto " " $( dirname " $proto " ) " " $output " " Visibility=Package" " UseAccessLevelOnImports=true"
105+ }
106+
107+ # - TEST DATA ------------------------------------------------------------------
108+
109+ function generate_reflection_service_descriptor_set {
110+ local proto=" $here /upstream/grpc/reflection/v1/reflection.proto"
111+ local proto_path=" $here /upstream"
112+ local output=" $root /Tests/GRPCReflectionServiceTests/Generated/DescriptorSets/reflection.pb"
113+
114+ invoke_protoc --descriptor_set_out=" $output " " $proto " -I " $proto_path " \
115+ --include_source_info \
116+ --include_imports
117+ }
118+
119+ function generate_health_service_descriptor_set {
120+ local proto=" $here /upstream/grpc/health/v1/health.proto"
121+ local proto_path=" $here /upstream"
122+ local output=" $root /Tests/GRPCReflectionServiceTests/Generated/DescriptorSets/health.pb"
123+
124+ invoke_protoc --descriptor_set_out=" $output " " $proto " -I " $proto_path " \
125+ --include_source_info \
126+ --include_imports
127+ }
128+
129+ function generate_extended_message_descriptor_set {
130+ local proto=" $here /tests/reflection/base_message.proto"
131+ local proto_path=" $here /tests/reflection"
132+ local output=" $root /Tests/GRPCReflectionServiceTests/Generated/DescriptorSets/base_message.pb"
133+
134+ invoke_protoc --descriptor_set_out=" $output " " $proto " -I " $proto_path " \
135+ --include_source_info \
136+ --include_imports
137+ }
138+
139+ function generate_message_with_dependency_descriptor_set {
140+ local proto=" $here /tests/reflection/message_with_dependency.proto"
141+ local proto_path=" $here /tests/reflection"
142+ local output=" $root /Tests/GRPCReflectionServiceTests/Generated/DescriptorSets/message_with_dependency.pb"
143+
144+ invoke_protoc --descriptor_set_out=" $output " " $proto " -I " $proto_path " \
145+ --include_source_info \
146+ --include_imports
147+ }
148+
97149# ------------------------------------------------------------------------------
98150
99- # Interoperability tests
100151generate_interop_test_service
101-
102- # Health service
103152generate_health_service
153+ generate_reflection_service
154+
155+ generate_reflection_service_descriptor_set
156+ generate_health_service_descriptor_set
157+ generate_extended_message_descriptor_set
158+ generate_message_with_dependency_descriptor_set
0 commit comments