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
Context -
I am trying to generate a play router stub which uses Actions. (as described in this issue akka/akka-grpc#420)
Problem -
The code generated using the twirl template for RouterUsingActions has compile time errors.
/AbstractRouter.scala:22:223: type mismatch;
[error] found : PartialFunction[Throwable,akka.grpc.Trailers]
[error] required: PartialFunction[Throwable,io.grpc.Status]
[error] abstract class AbstractUserServiceRouter(mat: Materializer, system: ActorSystem, parsers: PlayBodyParsers, actionBuilder: ActionBuilder[Request, AnyContent], eHandler: ActorSystem => PartialFunction[Throwable, Status] = defaultMapper) extends PlayRouterUsingActions(mat, GreeterService.name, parsers, actionBuilder) with GreeterService {
and
/AbstractRouter.scala:31:59: type mismatch;
[error] found : akka.actor.ActorSystem => PartialFunction[Throwable,io.grpc.Status]
[error] required: akka.actor.ActorSystem => PartialFunction[Throwable,akka.grpc.Trailers]
[error] val handler = GreeterServiceHandler(this, serviceName, eHandler)(mat, system)
Solution
I was able to modify the twirl template to eliminate the compilation errors and was able to use it to serve grpc via play's EssentialActions. The injected Actions and filters are working with this RouterUsingActions.
I've added a pull request that fixes this issue on top of play-grpc version 0.8.2. Apparently fixing this on latest master will take some more effort. It appears to have another issue apart from this one. I am looking into it and will open another pull request against master if I am successful.
The text was updated successfully, but these errors were encountered:
Context -
I am trying to generate a play router stub which uses Actions. (as described in this issue akka/akka-grpc#420)
Problem -
The code generated using the twirl template for RouterUsingActions has compile time errors.
and
Solution
I was able to modify the twirl template to eliminate the compilation errors and was able to use it to serve grpc via play's EssentialActions. The injected Actions and filters are working with this RouterUsingActions.
I've added a pull request that fixes this issue on top of
play-grpc
version0.8.2
. Apparently fixing this on latest master will take some more effort. It appears to have another issue apart from this one. I am looking into it and will open another pull request against master if I am successful.The text was updated successfully, but these errors were encountered: