-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to generate gRPC descriptor set #36897
Comments
/cc @alesj (grpc), @cescoffier (grpc), @geoand (knative,kubernetes,minikube,openshift), @iocanel (knative,kubernetes,openshift) |
@cescoffier and I discussed this on https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/gRPC.20generate.20descriptor.20set.20at.20build.20time.3F as well. |
Maybe a good enhancement would be to add the ability to generate the descriptor set (& customize its name/location) when running Essentially this configuration: <writeDescriptorSet>true</writeDescriptorSet>
<descriptorSetFileName>locationservice-v1.dsc</descriptorSetFileName>
<descriptorSetOutputDirectory>src/test/resources/wiremock/grpc</descriptorSetOutputDirectory> |
Why do you need this? |
For now, because WireMock requires it in order to mock gRPC endpoints. |
Seems easy enough to add. The target directory should be configurable, but not the name as you may have several protos. For the name, we should use the proto name. |
If you both don't mind, maybe I'll take a stab at it this week. |
Also @cescoffier
There is ever only 1 descriptor set file that describes all the .proto files that were part of the generation, so therefore the name should be configurable. See https://docs.streamsets.com/portal/platform-datacollector/latest/datacollector/UserGuide/Data_Formats/Protobuf-Prerequisites.html |
Go ahead @edeandrea |
@cescoffier Within When I try to reference There's |
I don't believe we can access the module root dir. However protoc generally requires absolute paths, so might be a way to deal with the problem. |
I have a way to do it that i'm working on. I had to add something to both the maven & gradle plugins to pass it in. I'll create a draft PR in a bit once i finish some tests and you can take a look. |
Describe the bug
I would like to be able to generate the Protobuf descriptor set alongside the source code. Generally this is done as an additional flag to the
protoc
compiler process.This can be done in Maven by configuring the
protobuf-maven-plugin
(see the Output Of Binary File Descriptor Sets at the bottom of that link).I'm having a hard time being able to do that in Quarkus. I've followed the steps in https://quarkus.io/version/main/guides/grpc-generation-reference#skipping-code-generation but it seems to clash with Quarkus' code generation.
When I disable Quarkus' code generation by doing either
-Dgrpc.codegen.skip=true
or settingquarkus.grpc.codegen.skip=true
inapplication.properties
, the application no longer compiles. It seems the Mutiny classes generated by Quarkus are no longer generated and therefore my application no longer compiles.Expected behavior
No response
Actual behavior
No response
How to Reproduce?
cd
intoquarkus-super-heroes/rest-fights
pom.xml
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: