diff --git a/build.sbt b/build.sbt index 02c434e..ee7ddf5 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,14 @@ import sbtcrossproject.{ crossProject, CrossType } +import org.typelevel.scalacoptions.ScalacOptions -lazy val catsVersion = "2.6.1" -lazy val fs2CoreVersion = "2.5.6" -lazy val scalacheckVersion = "1.15.4" +lazy val catsVersion = "2.13.0" +lazy val fs2CoreVersion = "3.13.0-M7" +lazy val scalacheckVersion = "1.19.0" +lazy val refinedVersion = "0.11.3" -lazy val scala212 = "2.12.16" -lazy val scala213 = "2.13.6" -lazy val scala30 = "3.0.2" +lazy val scala212 = "2.12.21" +lazy val scala213 = "2.13.18" +lazy val scala3 = "3.3.6" lazy val commonSettings = Seq( organization := "org.tpolecat", @@ -19,7 +21,7 @@ lazy val commonSettings = Seq( ("BSD New", url("http://opensource.org/licenses/BSD-3-Clause")) ), scalaVersion := scala213, - crossScalaVersions := Seq(scala212, scala213, scala30), + crossScalaVersions := Seq(scala212, scala213, scala3), // dottydoc really doesn't work at all right now Compile / doc / sources := { @@ -35,13 +37,13 @@ lazy val commonSettings = Seq( lazy val atto = // defined so we can exclude docs from aggregate project .in(file(".")) - .dependsOn(core.jvm, core.js, fs2.jvm, fs2.js, refined.jvm, refined.js, tests.jvm, tests.js) - .aggregate(core.jvm, core.js, fs2.jvm, fs2.js, refined.jvm, refined.js, tests.jvm, tests.js) + .dependsOn(core.jvm, core.js, core.native, fs2.jvm, fs2.js, fs2.native, refined.jvm, refined.js, refined.native, tests.jvm, tests.js, tests.native) + .aggregate(core.jvm, core.js, core.native, fs2.jvm, fs2.js, fs2.native, refined.jvm, refined.js, refined.native, tests.jvm, tests.js, tests.native) .settings(commonSettings) .settings(publish / skip := true) lazy val core = - crossProject(JSPlatform, JVMPlatform) + crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("modules/core")) .settings(commonSettings) @@ -49,7 +51,7 @@ lazy val core = .settings(libraryDependencies += "org.typelevel" %%% "cats-core" % catsVersion) lazy val fs2 = - crossProject(JSPlatform, JVMPlatform) + crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("modules/fs2")) .dependsOn(core) @@ -59,22 +61,23 @@ lazy val fs2 = libraryDependencies ++= Seq( "co.fs2" %%% "fs2-core" % fs2CoreVersion, "org.scalacheck" %%% "scalacheck" % scalacheckVersion % Test - ) + ), + Test / tpolecatExcludeOptions ++= ScalacOptions.warnUnusedOptions ++ Seq(ScalacOptions.warnNonUnitStatement) ) lazy val refined = - crossProject(JSPlatform, JVMPlatform) + crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("modules/refined")) .dependsOn(core) .settings(commonSettings) .settings( name := "atto-refined", - libraryDependencies += "eu.timepit" %%% "refined" % "0.9.26", + libraryDependencies += "eu.timepit" %%% "refined" % refinedVersion, ) lazy val tests = - crossProject(JSPlatform, JVMPlatform) + crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("modules/tests")) .dependsOn(core, refined) @@ -82,7 +85,8 @@ lazy val tests = .settings( name := "atto-tests", publish / skip := true, - libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalacheckVersion % Test + libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalacheckVersion % Test, + Test / tpolecatExcludeOptions ++= ScalacOptions.warnUnusedOptions ++ Seq(ScalacOptions.warnNonUnitStatement) ) lazy val docs = project diff --git a/modules/fs2/src/main/scala/atto/fs2/Pipes.scala b/modules/fs2/src/main/scala/atto/fs2/Pipes.scala index 00d8411..d056022 100644 --- a/modules/fs2/src/main/scala/atto/fs2/Pipes.scala +++ b/modules/fs2/src/main/scala/atto/fs2/Pipes.scala @@ -51,8 +51,8 @@ object Pipes { case Partial(_) => (r.feed(s), Nil) } val (r1, as) = exhaust(r0, acc) - Pull.output(Chunk.seq(as.reverse)) >> go(r1)(rest) - case None => Pull.output(Chunk.seq(exhaust(r.done, Nil)._2)) + Pull.output(Chunk.from(as.reverse)) >> go(r1)(rest) + case None => Pull.output(Chunk.from(exhaust(r.done, Nil)._2)) } } @@ -78,8 +78,8 @@ object Pipes { case Partial(_) => (r.feed(s), Nil) } val (r1, as) = exhaust(r0, acc) - Pull.output(Chunk.seq(as.reverse)) >> go(r1)(rest) - case None => Pull.output(Chunk.seq(exhaust(r.done, Nil)._2)) + Pull.output(Chunk.from(as.reverse)) >> go(r1)(rest) + case None => Pull.output(Chunk.from(exhaust(r.done, Nil)._2)) } } go(p.parse(""))(s).stream diff --git a/project/build.properties b/project/build.properties index 88dc997..7be0212 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.8 \ No newline at end of file +sbt.version=1.11.7 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 02b6718..a4c337f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,9 +1,10 @@ -addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.9.2") -addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") -addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") +addSbtPlugin("com.github.sbt" % "sbt-site-paradox" % "1.5.0") +addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.9.0") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2") +addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.20.1") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.9") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.2")