From 10601d61449c8e75348f711e40faf1b76decb2a6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 4 Sep 2021 10:26:29 +0200 Subject: [PATCH 1/2] Applied Scalafix rule(s) github:typelevel/cats-effect/v3_0_0?sha=series/3.x --- .../avast/grpc/jsonbridge/scalapb/ScalaPBServiceHandlers.scala | 2 +- .../scala/com/avast/grpc/jsonbridge/JavaServiceHandlers.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core-scalapb/src/main/scala/com/avast/grpc/jsonbridge/scalapb/ScalaPBServiceHandlers.scala b/core-scalapb/src/main/scala/com/avast/grpc/jsonbridge/scalapb/ScalaPBServiceHandlers.scala index 5b659a18..645b14b8 100644 --- a/core-scalapb/src/main/scala/com/avast/grpc/jsonbridge/scalapb/ScalaPBServiceHandlers.scala +++ b/core-scalapb/src/main/scala/com/avast/grpc/jsonbridge/scalapb/ScalaPBServiceHandlers.scala @@ -159,7 +159,7 @@ private[jsonbridge] object ScalaPBServiceHandlers extends ServiceHandlers with S private def fromScalaFuture[F[_], A](ec: ExecutionContext)(fsf: F[Future[A]])(implicit F: Async[F]): F[A] = fsf.flatMap { sf => - F.async { cb => + F.async_ { cb => sf.onComplete { case Success(r) => cb(Right(r)) case Failure(e) => cb(Left(BridgeError.Unknown(e))) diff --git a/core/src/main/scala/com/avast/grpc/jsonbridge/JavaServiceHandlers.scala b/core/src/main/scala/com/avast/grpc/jsonbridge/JavaServiceHandlers.scala index cec0d3f6..72fed3f4 100644 --- a/core/src/main/scala/com/avast/grpc/jsonbridge/JavaServiceHandlers.scala +++ b/core/src/main/scala/com/avast/grpc/jsonbridge/JavaServiceHandlers.scala @@ -112,7 +112,7 @@ private[jsonbridge] object JavaServiceHandlers extends ServiceHandlers with Stri private def fromListenableFuture[F[_], A](ec: ExecutionContext)(flf: F[ListenableFuture[A]])(implicit F: Async[F]): F[A] = flf.flatMap { lf => - F.async { cb => + F.async_ { cb => Futures.addCallback( lf, new FutureCallback[A] { From b33d82f674d64b4e16027bb3734c09e595b79924 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 4 Sep 2021 10:26:29 +0200 Subject: [PATCH 2/2] Update cats-effect to 3.2.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index e736b3b8..e5db0ea9 100644 --- a/build.sbt +++ b/build.sbt @@ -135,7 +135,7 @@ lazy val core = (project in file("core")).settings( "io.grpc" % "grpc-protobuf" % Versions.grpcVersion, "io.grpc" % "grpc-stub" % Versions.grpcVersion, "org.typelevel" %% "cats-core" % "2.6.1", - "org.typelevel" %% "cats-effect" % "2.5.3", + "org.typelevel" %% "cats-effect" % "3.2.7", "com.typesafe.scala-logging" %% "scala-logging" % "3.9.4", "org.slf4j" % "jul-to-slf4j" % "1.7.32", "org.slf4j" % "jcl-over-slf4j" % "1.7.32",