From c7c6169f2ea1867894dd533cb68c851e4fb3db4d Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Mon, 23 Oct 2023 09:28:46 +0000 Subject: [PATCH] Don't prefix `_root_` when referring to scala type --- .../http4s/grpc/generator/Http4sGrpcServicePrinter.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codegen/generator/src/main/scala/org/http4s/grpc/generator/Http4sGrpcServicePrinter.scala b/codegen/generator/src/main/scala/org/http4s/grpc/generator/Http4sGrpcServicePrinter.scala index 316b87f..3045560 100644 --- a/codegen/generator/src/main/scala/org/http4s/grpc/generator/Http4sGrpcServicePrinter.scala +++ b/codegen/generator/src/main/scala/org/http4s/grpc/generator/Http4sGrpcServicePrinter.scala @@ -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 { @@ -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)"""