-
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
Conversation
fix doc > pending Error: Monix with CE3 version required..
What was the monix dependency for? The build seems fine without it. |
If we could get this released I would be immensely grateful :) Let me know if I can help in any way |
it was used as example in the doc : policies.md |
ah, I see it now. If we want to show another effect being used, we can use a monad transformer or ZIO (zio-interop-cats has been released for CE3) |
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.
LGTM
Wanna merge? :D Edit: noticed the todos. |
build.sbt
Outdated
@@ -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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
dropped
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
I'm starting to think Sleep
should just be replaced with Temporal
altogether.
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.
From what I see, replacing Sleep by Temporal has a bigger impact:
given that Temporal[F[_]] = GenTemporal[F, Throwable]
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, these are good points :)
build.sbt
Outdated
val catsEffectVersion = "2.3.1" | ||
val catsMtlVersion = "1.1.1" | ||
val catsVersion = "2.5.0" | ||
val catsEffectVersion = "3.0.2" |
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
build.sbt
Outdated
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
version updated
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.
LGTM
Thanks a bunch! |
Can we have a milestone for this? |
The build is failing on a test based on Future.. could be a sporadic failure as it passed on the PR (also locally), can we retry the build ? If it fails again maybe increasing that test timeout will help |
I'm late to the party but LGTM 😄 Thanks for the PR. Thanks to @LukaJCB this has just been released as v3.0.0. |
removed dependency to io.monix which is not yet available for CE3..