From 0af3a41c20b406ea42d23451b80e91772c0d16c1 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Sun, 16 Oct 2022 15:53:35 -0400 Subject: [PATCH] update versions --- build.sbt | 6 ++-- .../test/scala/parallelfor/ParallelSpec.scala | 4 +-- .../parallelfor/ParallelizationDebug.scala | 31 ------------------- project/build.properties | 2 +- .../parallelfor/interop/zio/package.scala | 15 +-------- 5 files changed, 7 insertions(+), 51 deletions(-) diff --git a/build.sbt b/build.sbt index 0dcf131..e43c9fd 100644 --- a/build.sbt +++ b/build.sbt @@ -32,9 +32,9 @@ val sharedSettings = Seq( } ) -val zio1Version = "1.0.13" -val zio2Version = "2.0.0-RC6" -val zioQueryVersion = "0.3.0-RC2" +val zio1Version = "1.0.17" +val zio2Version = "2.0.2" +val zioQueryVersion = "0.3.1" val catsEffect3Version = "3.3.5" lazy val root = (project in file(".")) diff --git a/core/shared/src/test/scala/parallelfor/ParallelSpec.scala b/core/shared/src/test/scala/parallelfor/ParallelSpec.scala index 8f084ef..7eb938a 100644 --- a/core/shared/src/test/scala/parallelfor/ParallelSpec.scala +++ b/core/shared/src/test/scala/parallelfor/ParallelSpec.scala @@ -2,9 +2,9 @@ package parallelfor import parallelfor.FreeParallel.{effect, parallelizable} import parallelfor.ParTrace.zipped -import zio.test.{Trace => _, _} +import zio.test._ -object ParallelSpec extends DefaultRunnableSpec { +object ParallelSpec extends ZIOSpecDefault { def spec = suite("ParallelFor")( test("map only") { diff --git a/core/shared/src/test/scala/parallelfor/ParallelizationDebug.scala b/core/shared/src/test/scala/parallelfor/ParallelizationDebug.scala index 9a87de6..5a43b73 100644 --- a/core/shared/src/test/scala/parallelfor/ParallelizationDebug.scala +++ b/core/shared/src/test/scala/parallelfor/ParallelizationDebug.scala @@ -28,37 +28,6 @@ object ParallelizationDebug extends ZIOAppDefault { val run = program.timed.debug("RESULT") - val nice = ZIO - .ZIOWithFilterOps(stringZIO) - .withFilter( - ( - (check$ifrefutable$1: String) => - (check$ifrefutable$1: String @unchecked) match { - case s"lo and$word" => true - case _ => false - } - ) - ) - .flatMap( - ( - (x$1: String) => - (x$1: String @unchecked) match { - case s"lo and $word" => - intZIO.map[String](((int: Int) => word.+(int))) - } - ) - ) - - ZIO - .ZIOWithFilterOps[zio.Clock, NoSuchElementException, String](stringZIO) - .withFilter { - case s"cool$string" => true - case _ => false - } - .map[String] { case s"cool$string" => - string - } - def delayedEffect[A](name: String)(a: => A) = ZIO.debug(s"STARTING $name") *> ZIO.sleep(2.seconds).as(a).debug(s"COMPLETED $name with result") diff --git a/project/build.properties b/project/build.properties index d5409ad..ff6e0dd 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.7.0 \ No newline at end of file +sbt.version = 1.7.2 \ No newline at end of file diff --git a/zio/shared/src/main/scala/parallelfor/interop/zio/package.scala b/zio/shared/src/main/scala/parallelfor/interop/zio/package.scala index a4c6be5..58563b3 100644 --- a/zio/shared/src/main/scala/parallelfor/interop/zio/package.scala +++ b/zio/shared/src/main/scala/parallelfor/interop/zio/package.scala @@ -4,6 +4,7 @@ import _root_.zio._ import parallelfor.Parallelizable package object zio { + implicit val zioPar: Parallelizable[ZIO] = new Parallelizable[ZIO] { override def zipPar[R, E, A, B](left: ZIO[R, E, A], right: ZIO[R, E, B]): ZIO[R, E, (A, B)] = @@ -16,18 +17,4 @@ package object zio { fa.map(f) } - implicit val zManagedPar: Parallelizable[ZManaged] = - new Parallelizable[ZManaged] { - - override def flatMap[R, E, A, B](fa: ZManaged[R, E, A], f: A => ZManaged[R, E, B]): ZManaged[R, E, B] = - fa.flatMap(f) - - override def map[R, E, A, B](fa: ZManaged[R, E, A], f: A => B): ZManaged[R, E, B] = - fa.map(f) - - override def zipPar[R, E, A, B](left: ZManaged[R, E, A], right: ZManaged[R, E, B]): ZManaged[R, E, (A, B)] = - left.zipWithPar(right)((_, _)) - - } - }