From f45e928ef8e787f150459eb9ae26984be4990787 Mon Sep 17 00:00:00 2001 From: 47erbot Date: Fri, 25 Mar 2022 05:20:46 +0000 Subject: [PATCH 1/2] Applied Scalafix rule(s) github:typelevel/cats-effect/v3_0_0?sha=v3.0.0 --- .../main/scala/org/scalaexercises/evaluator/evaluation.scala | 3 ++- .../main/scala/org/scalaexercises/evaluator/services.scala | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/src/main/scala/org/scalaexercises/evaluator/evaluation.scala b/server/src/main/scala/org/scalaexercises/evaluator/evaluation.scala index 88d5adee..4a9b5646 100644 --- a/server/src/main/scala/org/scalaexercises/evaluator/evaluation.scala +++ b/server/src/main/scala/org/scalaexercises/evaluator/evaluation.scala @@ -39,10 +39,11 @@ import scala.tools.nsc.reporters._ import scala.tools.nsc.{Global, Settings} import scala.util.{Failure, Success, Try} import scala.util.control.NonFatal +import cats.effect.Temporal class Evaluator[F[_]: Sync](timeout: FiniteDuration = 20.seconds)(implicit F: ConcurrentEffect[F], - T: Timer[F] + T: Temporal[F] ) { type Remote = String diff --git a/server/src/main/scala/org/scalaexercises/evaluator/services.scala b/server/src/main/scala/org/scalaexercises/evaluator/services.scala index 8a67c58b..2b9c44b8 100644 --- a/server/src/main/scala/org/scalaexercises/evaluator/services.scala +++ b/server/src/main/scala/org/scalaexercises/evaluator/services.scala @@ -16,7 +16,7 @@ package org.scalaexercises.evaluator -import cats.effect.{ConcurrentEffect, ContextShift, ExitCode, IO, IOApp, Timer} +import cats.effect.{ConcurrentEffect, ExitCode, IO, IOApp} import cats.implicits._ import coursier.interop.cats._ import coursier.util.Sync @@ -31,6 +31,7 @@ import org.log4s.getLogger import org.scalaexercises.evaluator.codecs._ import scala.concurrent.duration._ +import cats.effect.Temporal object services { @@ -44,7 +45,7 @@ object services { Header("Access-Control-Max-Age", 1.day.toSeconds.toString()) ) - def service[F[_]: ConcurrentEffect: ContextShift: Timer: Sync](evaluator: Evaluator[F]) = { + def service[F[_]: ConcurrentEffect: ContextShift: Temporal: Sync](evaluator: Evaluator[F]) = { object dsl extends Http4sDsl[F] From d08c2ce09c398b310866d6e1dce30bc5f8d32a1a Mon Sep 17 00:00:00 2001 From: 47erbot Date: Fri, 25 Mar 2022 05:21:21 +0000 Subject: [PATCH 2/2] Update cats-effect to 3.3.9 --- project/ProjectPlugin.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/ProjectPlugin.scala b/project/ProjectPlugin.scala index 598bfee6..eed3d74e 100644 --- a/project/ProjectPlugin.scala +++ b/project/ProjectPlugin.scala @@ -16,7 +16,7 @@ object ProjectPlugin extends AutoPlugin { object V { lazy val cats = "2.7.0" - lazy val catsEffect = "2.5.4" + lazy val catsEffect = "3.3.9" lazy val http4s = "0.21.33" lazy val circe = "0.14.1" lazy val log4s = "1.7.0"