Skip to content

Commit

Permalink
Bumped zio to 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry Lin authored and ithinkicancode committed May 21, 2021
1 parent 22e726a commit 1b6a159
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
12 changes: 6 additions & 6 deletions examples/src/main/scala/StreamsBasedServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,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)
server(8080, 16).orDie.exitCode

def server(port: Int, parallelism: Int): ZIO[ZEnv, Exception, Unit] =
AsynchronousServerSocketChannel()
Expand All @@ -30,18 +29,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 ()
}
6 changes: 3 additions & 3 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 1b6a159

Please sign in to comment.