Skip to content
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

Merged
merged 1 commit into from Jun 13, 2022
Merged

Conversation

cescoffier
Copy link
Member

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.

@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/grpc gRPC labels Jun 10, 2022
Copy link
Member

@gsmet gsmet left a 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.

@geoand
Copy link
Contributor

geoand commented Jun 10, 2022

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.
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 10, 2022

Failing Jobs - Building 9c68d21

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
✔️ JVM Tests - JDK 17

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/elasticsearch-rest-client 

📦 integration-tests/elasticsearch-rest-client

Failed to execute goal io.fabric8:docker-maven-plugin:0.40.0:start (docker-start) on project quarkus-integration-test-elasticsearch-rest-client: I/O Error

@cescoffier
Copy link
Member Author

The failure looks unrelated.

@geoand
Copy link
Contributor

geoand commented Jun 10, 2022

Indeed

Copy link
Member

@gsmet gsmet left a 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.

@gsmet gsmet merged commit e2b8581 into quarkusio:main Jun 13, 2022
@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jun 13, 2022
@cescoffier cescoffier deleted the grpc-post-processing branch June 14, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependencies Pull requests that update a dependency file area/grpc gRPC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants