Skip to content

Commit

Permalink
Merge pull request #359 from vigoo/zio2-rc2
Browse files Browse the repository at this point in the history
Update to ZIO 2.0.0-RC2
  • Loading branch information
vigoo authored Feb 6, 2022
2 parents 3c3579c + 587d402 commit e3e5e20
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scala: ['2.12.14', '2.13.6', '3.1.0']
scala: ['2.12.15', '2.13.8', '3.1.0']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
val scala212 = "2.12.15"
val scala213 = "2.13.7"
val scala213 = "2.13.8"
val scala3 = "3.1.0"

val zioVersion = "1.0.13"
val zio2Version = "2.0.0-RC1"
val zio2Version = "2.0.0-RC2"

val scalacOptions212 = Seq("-Ypartial-unification", "-deprecation", "-target:jvm-1.8")
val scalacOptions213 = Seq("-deprecation", "-target:jvm-1.8")
Expand Down Expand Up @@ -125,7 +125,7 @@ lazy val proxZStream2 = Project("prox-zstream-2", file("prox-zstream-2")).settin
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zio2Version,
"dev.zio" %% "zio-streams" % zio2Version,
"dev.zio" %% "zio-prelude" % "1.0.0-RC9",
"dev.zio" %% "zio-prelude" % "1.0.0-RC10",

"dev.zio" %% "zio-test" % zio2Version % "test",
"dev.zio" %% "zio-test-sbt" % zio2Version % "test",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ object ProcessGroupSpecs extends DefaultRunnableSpec with ProxSpecHelpers {
val p1 = Process("perl", List("-e", """print STDERR "Hello""""))
val p2 = Process("perl", List("-e", """print STDERR "world!""""))

val stream = ZPipeline.utf8Decode >>> ZPipeline.splitLines >>> ZPipeline.map(_.length)
val stream = ZPipeline.utf8Decode >>> ZPipeline.splitLines >>> ZPipeline.map[String, Int](_.length)

val processGroup = (p1 | p2) !>? stream
val program = processGroup.run()
Expand Down Expand Up @@ -299,7 +299,7 @@ object ProcessGroupSpecs extends DefaultRunnableSpec with ProxSpecHelpers {
val p1 = Process("perl", List("-e", """print STDERR "Hello""""))
val p2 = Process("perl", List("-e", """print STDERR "world!""""))

val stream = ZPipeline.utf8Decode >>> ZPipeline.splitLines >>> ZPipeline.map(_.length)
val stream = ZPipeline.utf8Decode >>> ZPipeline.splitLines >>> ZPipeline.map[String, Int](_.length)

val processGroup = (p1 | p2).customizedPerProcess.errorsToVector {
case p if p == p1 => stream >>> ZPipeline.map(l => (1, l))
Expand Down Expand Up @@ -339,7 +339,7 @@ object ProcessGroupSpecs extends DefaultRunnableSpec with ProxSpecHelpers {
val processGroup = (p1 | p2).customizedPerProcess.foldErrors(
{
case p if p == p1 => ZPipeline.utf8Decode >>> ZPipeline.splitLines
case p if p == p2 => ZPipeline.utf8Decode >>> ZPipeline.splitLines >>> ZPipeline.map(_.reverse)
case p if p == p2 => ZPipeline.utf8Decode >>> ZPipeline.splitLines >>> ZPipeline.map[String, String](_.reverse)
},
Vector.empty,
(l: Vector[Option[Char]], s: String) => l :+ s.headOption
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ object ProcessSpecs extends DefaultRunnableSpec with ProxSpecHelpers {
val stream =
ZPipeline.utf8Decode >>>
ZPipeline.splitLines >>>
ZPipeline.map(s => StringLength(s.length))
ZPipeline.map[String, StringLength](s => StringLength(s.length))

val process = Process("echo", List("Hello\nworld!")) >? stream
val program = process.run().map(_.output)
Expand Down Expand Up @@ -156,7 +156,7 @@ object ProcessSpecs extends DefaultRunnableSpec with ProxSpecHelpers {
val stream =
ZPipeline.utf8Decode >>>
ZPipeline.splitLines >>>
ZPipeline.map(s => StringLength(s.length))
ZPipeline.map[String, StringLength](s => StringLength(s.length))

val process = Process("perl", List("-e", "print STDERR 'Hello\nworld!'")) !>? stream
val program = process.run().map(_.error)
Expand Down

0 comments on commit e3e5e20

Please sign in to comment.