-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"migrate" to cats effect 3 #305
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,9 +56,9 @@ val moduleSettings = commonSettings ++ Seq( | |
scalafmtOnCompile := true | ||
) | ||
|
||
val catsVersion = "2.3.0" | ||
val catsEffectVersion = "2.3.1" | ||
val catsMtlVersion = "1.1.1" | ||
val catsVersion = "2.5.0" | ||
val catsEffectVersion = "3.0.2" | ||
val catsMtlVersion = "1.1.3" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1.2.0 if you want to be on latest There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. version updated |
||
val scalatestVersion = "3.2.3" | ||
val scalaTestPlusVersion = "3.2.2.0" | ||
val scalacheckVersion = "1.15.2" | ||
|
@@ -134,7 +134,7 @@ val docs = project | |
"org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full | ||
), | ||
libraryDependencies ++= Seq( | ||
"io.monix" %%% "monix" % "3.1.0" | ||
//"io.monix" %%% "monix" % "3.3.0" // TODO update to version compatible cats effect 3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's just drop it I think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dropped |
||
), | ||
crossScalaVersions := Nil, | ||
buildInfoPackage := "retry", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package retry | ||
|
||
import cats.effect.Timer | ||
import cats.effect.Temporal | ||
|
||
import scala.concurrent.duration.FiniteDuration | ||
|
||
trait Sleep[M[_]] { | ||
|
@@ -10,6 +11,6 @@ trait Sleep[M[_]] { | |
object Sleep { | ||
def apply[M[_]](implicit sleep: Sleep[M]): Sleep[M] = sleep | ||
|
||
implicit def sleepUsingTimer[F[_]](implicit timer: Timer[F]): Sleep[F] = | ||
(delay: FiniteDuration) => timer.sleep(delay) | ||
implicit def sleepUsingTemporal[F[_]](implicit t: Temporal[F]): Sleep[F] = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm starting to think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From what I see, replacing Sleep by Temporal has a bigger impact: You end up with MonadError[F, Throwable] following the hierarchy GenTemporal[F, E] ... GenConcurrent[F, E] ... GenSpawn[F, E] ... MonadCancel[F, E] ... MonadError[F, E] Then Temporal[F] will clash with internals based on MonadError[F, E], though it seems that GenTemporal[F, E] solves it but the change propagates up to public function.. not sure if that's desired.. I think it's probably better to try it in a separate PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough, these are good points :) |
||
(delay: FiniteDuration) => t.sleep(delay) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.2.1") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") | ||
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") | ||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.4.0") | ||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") | ||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") | ||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use 3.1.0 now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version updated