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: fail code generation gracefully on default java package #17577

Merged

Conversation

michalszynkiewicz
Copy link
Member

fixes #17485

@quarkus-bot quarkus-bot bot added the area/grpc gRPC label Jun 1, 2021
@michalszynkiewicz
Copy link
Member Author

For the user, the error looks as follows:

Using default java package is not supported for gRPC code generation. Please specify `option java_package = "your.package"` in my-new.proto
java.lang.IllegalArgumentException: Code generation failed. Please check the log above for details.
        at io.quarkus.grpc.protoc.plugin.MutinyGrpcGenerator.validateServices(MutinyGrpcGenerator.java:59)
        at io.quarkus.grpc.protoc.plugin.MutinyGrpcGenerator.generateFiles(MutinyGrpcGenerator.java:44)
        at com.salesforce.jprotoc.ProtocPlugin.lambda$generate$1(ProtocPlugin.java:191)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
        at java.base/java.util.Collections$2.tryAdvance(Collections.java:4745)
        at java.base/java.util.Collections$2.forEachRemaining(Collections.java:4753)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
        at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at com.salesforce.jprotoc.ProtocPlugin.generate(ProtocPlugin.java:196)
        at com.salesforce.jprotoc.ProtocPlugin.generate(ProtocPlugin.java:80)
        at com.salesforce.jprotoc.ProtocPlugin.generate(ProtocPlugin.java:51)
        at com.salesforce.jprotoc.ProtocPlugin.generate(ProtocPlugin.java:43)
        at io.quarkus.grpc.protoc.plugin.MutinyGrpcGenerator.main(MutinyGrpcGenerator.java:311)
--q-grpc_out: protoc-gen-q-grpc: Plugin failed with status code 1.

@quarkus-bot
Copy link

quarkus-bot bot commented Jun 1, 2021

This workflow status is outdated as a new workflow run has been triggered.

🚫 This workflow run has been cancelled.

Failing Jobs - Building eb7d130

⚠️ Artifacts of the workflow run were not available thus the report misses some details.

Status Name Step Test failures Logs Raw logs
Gradle Tests - JDK 11 Build ⚠️ Check → Logs Raw logs
Gradle Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
Native Tests - gRPC Build ⚠️ Check → Logs Raw logs

Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

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

Just a typo in the message.

@@ -19,6 +21,8 @@
*/
public class MutinyGrpcGenerator extends Generator {

private static final Logger log = Logger.getLogger(MutinyGrpcGenerator.class.getName());
Copy link
Member

Choose a reason for hiding this comment

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

+1

@cescoffier cescoffier merged commit a48df12 into quarkusio:main Jun 1, 2021
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jun 1, 2021
@gsmet gsmet modified the milestones: 2.1 - main, 2.0.0.CR3 Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gRPC: Mutiny classes generation fails without java package definition
3 participants