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
Introduce gRPC post-processing #26041
Conversation
6d9bd63
to
4e33ed6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. I added a small comment.
extensions/grpc-common/runtime/src/main/java/io/quarkus/grpc/common/runtime/Generated.java
Outdated
Show resolved
Hide resolved
Very neat! |
When using gRPC, there is a code generation phase. The generator (protoc) generates a bunch of classes used to implement and consume the services. This commit introduces a post-processing phase to that generation so we can modify the generated source files. The rationale is twofold: 1. stubs cannot be mocked because of the `final` modifier in the source. 2. the generated classes use `javax.annotation.Generated`, which blocks the migration to Jakarta. The current post-processing addresses these two issues. Each feature can be disabled individually. The whole post-processing can also be disabled.
4e33ed6
to
9c68d21
Compare
Failing Jobs - Building 9c68d21
Failures⚙️ JVM Tests - JDK 11 #- Failing: integration-tests/elasticsearch-rest-client
📦 integration-tests/elasticsearch-rest-client✖ |
The failure looks unrelated. |
Indeed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get it in and see how the Jakarta stuff reacts to it.
When using gRPC, there is a code generation phase. The generator (protoc) generates a bunch of classes used to implement and consume the services.
This commit introduces a post-processing phase to that generation so we can modify the generated source files.
The rationale is twofold:
final
modifier in the source.javax.annotation.Generated
, which blocks the migration to Jakarta.The current post-processing addresses these two issues. Each feature can be disabled individually. The whole post-processing can also be disabled.