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

grpc-protoc addService -> addBlockingService #2143

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

Scottmitch
Copy link
Member

Motivation:
The generated code to build a service has two methods
with the same name:

  • addService(X)
  • addService(BlockingX)

The method overloading approach requires that folks cast their
services if they are implemented as lambdas. We can avoid
this ambiguity by qualifying the method name to:

  • addBlockingService(BlockingX)

Motivation:
The generated code to build a service has two methods
with the same name:

* `addService(X)`
* `addService(BlockingX)`

The method overloading approach requires that folks cast their
services if they are implemented as lambdas. We can avoid
this ambiguity by qualifying the method name to:

* `addBlockingService(BlockingX)`
@Scottmitch Scottmitch requested a review from tkountis March 10, 2022 17:38
@Scottmitch Scottmitch merged commit 9c3ed5a into apple:main Mar 10, 2022
@Scottmitch Scottmitch deleted the grpc_add_blocking branch March 10, 2022 17:52
serviceBuilderSpecBuilder.addMethod(methodBuilder(addService)
.addModifiers(PUBLIC)
.addAnnotation(Deprecated.class)
.addJavadoc(JAVADOC_DEPRECATED + "Use {@link #$L($T)}." + lineSeparator(), addBlockingService,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to add a full javadoc. Otherwise, there are other warnings, like missing @param that break the build with Xwerror flag.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will submit a followup

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what I meant about javadoc generation not reliably detecting issues. hopefully #2140 will help but there are protobuf issues.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants