You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current @service macro is requiring the Marshallers with the implicitly identifier, this is preventing to provide other marshallers externally of the macro, since the generated companion object is not able to find them.
A potential solution would be changing the current macro, where instead of a val, we implement them as a def, requiring them as part of the method definition. Example:
I've this WIP #279 with all the macros and server module migrated (including tests). The problem is I'm getting this weird error:
[error] Caused by: sbt.ForkMain$ForkError: java.lang.NullPointerException: requestMarshaller
[error] at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787)
[error] at io.grpc.MethodDescriptor.<init>(MethodDescriptor.java:230)
[error] at io.grpc.MethodDescriptor.<init>(MethodDescriptor.java:40)
[error] at io.grpc.MethodDescriptor$Builder.build(MethodDescriptor.java:567)
[error] at freestyle.rpc.protocol.Utils$service$RPCAvroService$.unaryMethodDescriptor(Utils.scala:19)
[error] at freestyle.rpc.protocol.Utils$service$RPCAvroService$.bindService(Utils.scala:54)
[error] at freestyle.rpc.protocol.Utils$FreesRuntime.$init$(Utils.scala:550)
[error] at freestyle.rpc.protocol.Utils$implicits$.<init>(Utils.scala:572)
[error] at freestyle.rpc.protocol.Utils$implicits$.<clinit>(Utils.scala)
[error] at freestyle.rpc.protocol.RPCTests.$anonfun$new$4(RPCTests.scala:73)
The current
@service
macro is requiring the Marshallers with theimplicitly
identifier, this is preventing to provide other marshallers externally of the macro, since the generated companion object is not able to find them.https://github.com/frees-io/freestyle-rpc/blob/9f898c9/modules/internal/src/main/scala/service.scala#L205-L206
A potential solution would be changing the current macro, where instead of a
val
, we implement them as adef
, requiring them as part of the method definition. Example:The text was updated successfully, but these errors were encountered: