Skip to content

Commit

Permalink
Bump the ZIO version to 2.1.7 (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyri-petrou authored Aug 6, 2024
1 parent e8aa54d commit bf24db5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ lazy val root = project
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library")
)

val zioVersion = "2.1.1"
val zioVersion = "2.1.7"
val catsVersion = "2.10.0"
val catsEffectVersion = "3.5.4"
val catsMtlVersion = "1.4.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ private[interop] trait ZioSpecBaseLowPriority { self: ZioSpecBase =>
}

implicit def arbitraryZIO[R: Cogen: Tag, E: CanFail: Arbitrary: Cogen, A: Arbitrary: Cogen]: Arbitrary[ZIO[R, E, A]] =
Arbitrary(Gen.function1[ZEnvironment[R], IO[E, A]](arbitraryIO[E, A].arbitrary).map(ZIO.environment[R].flatMap))
Arbitrary(Gen.function1[ZEnvironment[R], IO[E, A]](arbitraryIO[E, A].arbitrary).map { f =>
// TODO: Remove this once it's fixed in ZIO
if (Tag[R] =:= Tag[Any]) f(ZEnvironment(()).asInstanceOf[ZEnvironment[R]])
else ZIO.environment[R].flatMap(f)
})

implicit def arbitraryTask[A: Arbitrary: Cogen](implicit ticker: Ticker): Arbitrary[Task[A]] = {
val arbIO = arbitraryIO[Throwable, A]
Expand Down

0 comments on commit bf24db5

Please sign in to comment.