-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Quarkus gRPC generator tries to write the same file twice #25275
Comments
Find out that it fails when the proto file contains
I guess it is because the mutiny generator is producing its own implementation and it collides. I don't know if it can be disable from command line but this is an issue for me as I don't have ownership of those proto files and can be an issue when generating from jar file. |
Did you try maven or gradle plugin as a workaround? |
maven plugin alone works but all I got is the |
Worked if the MutinyGrpcGenerator is run in a second step alone. |
I need to check what |
@cescoffier it generates a Greeter.java file with an abstract service class. It has been deprecated since plug-ins has been introduced and should not be used anymore. |
Thanks @scrocquesel. @alesj WDYT? |
@cescoffier pre-process them how? Or about which files are we talking exactly? |
Actually, files that are added to src/proto can be modified by the developer maybe we can intercept the output and provide a meaningful message if it happens. Let me know what could be the best solution and I'll try to implement it. |
@alesj Have a look to the draft PR. It work in my case but there is a branch in the quarkus/extensions/grpc/codegen/src/main/java/io/quarkus/grpc/deployment/GrpcCodeGen.java Line 233 in 647dfdc
Also, intercepting the output would add boilerplate complexity. Maybe just add a note in the documentation would be enough as it should not be common nowadays. |
Force java_generic_services to false for protos gathered from dependencies
Describe the bug
Trying to generate service/message definition from https://github.com/envoyproxy/java-control-plane/tree/main/api produces "Tried to write the same file twice" errors.
Expected behavior
Should compile
Actual behavior
Error
How to Reproduce?
copy/pasting the proto folder from the given repo or using dependency :
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.8.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Removing
--q-grpc_out=/grpc/target/generated-sources/grpc
from the generated command line works.The text was updated successfully, but these errors were encountered: