eclipse-vertx / eclipse-vertx/vertx-grpc

Regress in minor version

Open
#223 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
53
Forks
36
Avg merge
5h 49m
Merged PRs (30d)
60

Description

### Version

5.0.1+

### Context

Im using scalapb (https://github.com/scalapb/ScalaPB/blob/master/scalapb-runtime-grpc/src/main/scala/scalapb/grpc/Marshaller.scala) with vertx-grpc since 4.+ version.
After updating to 5.0.1, vertx casting Marshaller into `this.messageLite = (MessageLite) ((MethodDescriptor.PrototypeMarshaller) marshaller).getMessagePrototype();` which is breaking change.
Can messageLite be optional? If yes, I'll make PR for that.

```
java.lang.ClassCastException: class scalapb.grpc.Marshaller cannot be cast to class io.grpc.MethodDescriptor$PrototypeMarshaller (scalapb.grpc.Marshaller and io.grpc.MethodDescriptor$PrototypeMarshaller are in unnamed module of loader rules_scala3.common.sbt_testing.ClassLoaders$$anon$1 @551bdc27)
at io.vertx.grpcio.common.impl.BridgeMessageDecoder.(BridgeMessageDecoder.java:40)
at io.vertx.grpcio.server.impl.GrpcIoServerImpl.callHandler(GrpcIoServerImpl.java:44)
at io.vertx.grpcio.server.impl.GrpcIoServerImpl.callHandler(GrpcIoServerImpl.java:28)
at io.vertx.grpcio.server.impl.GrpcIoServiceBridgeImpl.bind(GrpcIoServiceBridgeImpl.java:97)
at io.vertx.grpcio.server.impl.GrpcIoServiceBridgeImpl.lambda$bind$1(GrpcIoServiceBridgeImpl.java:93)
at java.base/java.util.HashMap$Values.forEach(HashMap.java:1074)
at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1118)
at io.vertx.grpcio.server.impl.GrpcIoServiceBridgeImpl.bind(GrpcIoServiceBridgeImpl.java:93)
at twl.api.services.bot.grpc.GrpcBotService$.bind(GrpcBotService.scala:214)
at twl.api.server.ApiServer$.start$$anonfun$3$$anonfun$1$$anonfun$1(ApiServer.scala:256)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:503)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1750)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1742)
at java.base/java.util.concurrent.ForkJoinTask$InterruptibleTask.exec(ForkJoinTask.java:1659)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
```

### Steps to reproduce

_No response_

### Do you have a reproducer?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.