Skip to content

Commit

Permalink
Don't prefix _root_ when referring to scala type
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Oct 23, 2023
1 parent 305ea92 commit c7c6169
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Http4sGrpcServicePrinter(service: ServiceDescriptor, di: DescriptorImplici

private[this] def serviceMethodSignature(method: MethodDescriptor) = {

val scalaInType = "_root_."+method.inputType.scalaType
val scalaOutType = "_root_."+method.outputType.scalaType
val scalaInType = method.inputType.scalaType
val scalaOutType = method.outputType.scalaType
val ctx = s"ctx: $Ctx"

s"def ${method.name}" + (method.streamType match {
Expand All @@ -62,8 +62,8 @@ class Http4sGrpcServicePrinter(service: ServiceDescriptor, di: DescriptorImplici
}

private[this] def createClientCall(method: MethodDescriptor) = {
val encode = s"$Codec.codecForGenerated(_root_.${method.inputType.scalaType})"
val decode = s"$Codec.codecForGenerated(_root_.${method.outputType.scalaType})"
val encode = s"$Codec.codecForGenerated(${method.inputType.scalaType})"
val decode = s"$Codec.codecForGenerated(${method.outputType.scalaType})"
val serviceName = method.getService.getFullName
val methodName = method.getName
s"""$ClientGrpc.${handleMethod(method)}($encode, $decode, "$serviceName", "$methodName")(client, baseUri)(request, ctx)"""
Expand Down

0 comments on commit c7c6169

Please sign in to comment.