diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2513fd3..86278e54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.11.12', '2.12.13', '2.13.5', '3.0.0-RC3'] + scala: ['2.11.12', '2.12.13', '2.13.6', '3.0.0'] steps: - name: Checkout current branch uses: actions/checkout@v2.3.4 diff --git a/build.sbt b/build.sbt index 4f2a178e..a6ec5594 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ inThisBuild( addCommandAlias("fix", "; all compile:scalafix test:scalafix; all scalafmtSbt scalafmtAll") addCommandAlias("check", "; scalafmtSbtCheck; scalafmtCheckAll; compile:scalafix --check; test:scalafix --check") -val zioVersion = "1.0.7" +val zioVersion = "1.0.8" lazy val zioNioCore = project .in(file("nio-core")) diff --git a/examples/src/main/scala/StreamsBasedServer.scala b/examples/src/main/scala/StreamsBasedServer.scala index 20413c0d..ef93217f 100644 --- a/examples/src/main/scala/StreamsBasedServer.scala +++ b/examples/src/main/scala/StreamsBasedServer.scala @@ -8,9 +8,7 @@ import zio.stream._ object StreamsBasedServer extends App { - override def run(args: List[String]): URIO[zio.ZEnv, ExitCode] = - server(8080, 16).orDie - .as(ExitCode.success) + override def run(args: List[String]): URIO[zio.ZEnv, ExitCode] = server(8080, 16).orDie.exitCode def server(port: Int, parallelism: Int): ZIO[ZEnv, Exception, Unit] = AsynchronousServerSocketChannel() @@ -30,18 +28,19 @@ object StreamsBasedServer extends App { channel: AsynchronousSocketChannel ): ZIO[Clock with Console, Nothing, Unit] = for { - _ <- console.putStrLn("Received connection") + _ <- console.putStrLn("Received connection").ignore data <- ZStream .fromEffectOption( - channel.readChunk(64).tap(_ => console.putStrLn("Read chunk")).orElse(ZIO.fail(None)) + (channel.readChunk(64) <* console.putStrLn("Read chunk").ignore) + .orElseFail(None) ) .flattenChunks .take(4) .transduce(ZTransducer.utf8Decode) .run(Sink.foldLeft("")(_ + (_: String))) _ <- closeConn - _ <- console.putStrLn(s"Read data: ${data.mkString}") *> + _ <- console.putStrLn(s"Read data: ${data.mkString}").ignore *> clock.sleep(3.seconds) *> - console.putStrLn("Done") + console.putStrLn("Done").ignore } yield () } diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index ddd4ccb7..5680c0c8 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -99,7 +99,7 @@ object BuildHelper { ) val scalaReflectSettings = Seq( - libraryDependencies ++= Seq("dev.zio" %%% "izumi-reflect" % "1.0.0-M10") + libraryDependencies ++= Seq("dev.zio" %%% "izumi-reflect" % "1.1.2") ) // Keep this consistent with the version in .core-tests/shared/src/test/scala/REPLSpec.scala @@ -296,8 +296,8 @@ object BuildHelper { def jsSettings = Seq( - libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.2.2", - libraryDependencies += "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.2.2" + libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.3.0", + libraryDependencies += "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.3.0" ) def nativeSettings =