-
Notifications
You must be signed in to change notification settings - Fork 48
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
gapic-generator-java exits with IllegalStateException
when there's no service in protos
#2050
Comments
I would implement the script in a way that it would not call gapic-generator-java if there's no need to call it. |
I'm currently working on this feature. However, The grpc java plugin is implemented in a way that if there's no service to generate, it will exit normally without generating any code. I think the generator (which is also a protoc plugin) should do the same. |
We discussed this in the project meeting and I agree with Joe. In addition, we have other use cases that can benefit from this change. For example, as @mpeddada1 mentioned in #2048, we may need the generator to generate reflect-config.json for proto-only modules. |
This is working as intended, changing the type from |
cc: @lqiu96 @JoeWang1127 @alicejli Some considerations:
|
The generator should return normally with no-op when there's no service in protos.
For example: when generating from
google/cloud/alloydb/connectors/v1alpha
, the generator exited with the following error:The text was updated successfully, but these errors were encountered: