Skip to content

Commit

Permalink
Merge pull request #701 from kczulko/main
Browse files Browse the repository at this point in the history
Use scala3 compatible wildcard import
  • Loading branch information
ahjohannessen authored Jan 30, 2024
2 parents e186a10 + 85f5b10 commit 18f1406
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ object Fs2CodeGenerator extends CodeGenApp {
di: DescriptorImplicits
): Seq[PluginProtos.CodeGeneratorResponse.File] = {
file.getServices.asScala.map { service =>
val p = new Fs2GrpcServicePrinter(service, fs2params.serviceSuffix, di)

import di.{ExtendedServiceDescriptor, ExtendedFileDescriptor}

val p = new Fs2GrpcServicePrinter(service, fs2params.serviceSuffix, di)
val code = p.printService(FunctionalPrinter()).result()
val b = PluginProtos.CodeGeneratorResponse.File.newBuilder()
b.setName(file.scalaDirectory + "/" + service.name + s"${fs2params.serviceSuffix}.scala")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Fs2GrpcServicePrinter(service: ServiceDescriptor, serviceSuffix: String, d

def printService(printer: FunctionalPrinter): FunctionalPrinter = {
printer
.add(s"package $servicePkgName", "", "import _root_.cats.syntax.all._", "")
.add(s"package $servicePkgName", "", s"import _root_.cats.syntax.all.${service.getFile.V.WildcardImport}", "")
.call(serviceTrait)
.newline
.call(serviceObject)
Expand Down

0 comments on commit 18f1406

Please sign in to comment.