From 1a21c856fd5c02ce35a34063a05382fe2f8a2f01 Mon Sep 17 00:00:00 2001 From: Matt Dziuban Date: Tue, 6 Aug 2024 09:03:47 -0400 Subject: [PATCH] Update dependencies. --- .../scala/routing/bench/Http4sBenchmark.scala | 2 +- .../scala/routing/bench/PlayBenchmark.scala | 4 +-- build.sbt | 4 +-- .../src/main/scala/routing/example/App.scala | 7 ++++ project/Build.scala | 34 +++++++++---------- project/build.properties | 2 +- project/plugins.sbt | 10 +++--- website/sidebars.json | 2 +- 8 files changed, 35 insertions(+), 30 deletions(-) diff --git a/bench/src/main/scala/routing/bench/Http4sBenchmark.scala b/bench/src/main/scala/routing/bench/Http4sBenchmark.scala index 08567ba..9048cd3 100644 --- a/bench/src/main/scala/routing/bench/Http4sBenchmark.scala +++ b/bench/src/main/scala/routing/bench/Http4sBenchmark.scala @@ -37,7 +37,7 @@ object http4sHelper extends BenchmarkHelper[Request[IO], Request[IO] => IO[Respo } class Http4sBenchmark_0_23 { // 0.23 -class Http4sBenchmark_1_0_0_M41 { // 1.0.0-M41 +class Http4sBenchmark_1_0_0_M44 { // 1.0.0-M44 import http4sHelper._ @Benchmark def http4s: String = run(http4sService) diff --git a/bench/src/main/scala/routing/bench/PlayBenchmark.scala b/bench/src/main/scala/routing/bench/PlayBenchmark.scala index dd3bcdd..011a181 100644 --- a/bench/src/main/scala/routing/bench/PlayBenchmark.scala +++ b/bench/src/main/scala/routing/bench/PlayBenchmark.scala @@ -1,4 +1,4 @@ -// ++ 1.0.0-M41 +// ++ 1.0.0-M44 package routing package bench @@ -17,4 +17,4 @@ class PlayBenchmark { @Benchmark def routing: String = run(routingService) @Benchmark def routingManual: String = run(routingManualService) } -// -- 1.0.0-M41 +// -- 1.0.0-M44 diff --git a/build.sbt b/build.sbt index 86d9efa..8213602 100644 --- a/build.sbt +++ b/build.sbt @@ -129,8 +129,8 @@ lazy val example = http4sProj(projectMatrix.in(file("example")), "example", _ => libraryDependencies ++= Seq( http4sDep("circe", axis.version).value, http4sDep("blaze-server", axis match { - case Http4sAxis.v0_23 => s"${axis.suffix}.12" - case Http4sAxis.v1_0_0_M41 => s"${axis.suffix.dropRight(2)}38" + case Http4sAxis.v0_23 => s"${axis.suffix}.17" + case Http4sAxis.v1_0_0_M44 => s"${axis.suffix.dropRight(2)}41" case _ => axis.version }).value, ), diff --git a/example/src/main/scala/routing/example/App.scala b/example/src/main/scala/routing/example/App.scala index a634c0a..e14f16e 100644 --- a/example/src/main/scala/routing/example/App.scala +++ b/example/src/main/scala/routing/example/App.scala @@ -4,6 +4,13 @@ import cats.effect.{ExitCode, IO, IOApp} import org.http4s.blaze.server.BlazeServerBuilder object App extends IOApp { + // ++ 1.0.0-M44 + import org.typelevel.log4cats.LoggerFactory + import org.typelevel.log4cats.noop.NoOpFactory + + private implicit val loggerFactory: LoggerFactory[IO] = NoOpFactory[IO] + // -- 1.0.0-M44 + override def run(args: List[String]): IO[ExitCode] = BlazeServerBuilder[IO] .bindHttp(8080, "localhost") diff --git a/project/Build.scala b/project/Build.scala index d73167d..7ba6649 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -10,7 +10,7 @@ import sbtprojectmatrix.ProjectMatrixPlugin.autoImport._ import scala.sys.process._ object Build { - lazy val scalaVersions = Seq("2.13.13", "3.3.3") + lazy val scalaVersions = Seq("2.13.15", "3.3.4") lazy val latestScalaV = scalaVersions.find(_.startsWith("3.")).get lazy val kindProjector = compilerPlugin("org.typelevel" % "kind-projector" % "0.13.3" cross CrossVersion.full) @@ -32,8 +32,8 @@ object Build { output: List[String] ) - val startVersionBlock = "// ++ " - val endVersionBlock = "// -- " + val startVersionBlock = """^\s*// \+\+ (.*)$""".r + val endVersionBlock = """^\s*// -- (.*)$""".r val versionBlockComments = List(startVersionBlock, endVersionBlock) val singleLineVersionComment = """^([^/]+) // (.*)$""".r @@ -47,17 +47,15 @@ object Build { Nil ))((acc, line) => (acc.currVersions, line) match { // Start a version block with a line matching `// ++ $version` - case (Nil, l) if l.startsWith(startVersionBlock) => - acc.copy( - currVersions = splitVersion(l.stripPrefix(startVersionBlock)), - output = (acc.output :+ "")) + case (Nil, startVersionBlock(v)) => + acc.copy(currVersions = splitVersion(v), output = (acc.output :+ "")) // End a version block with a line matching `// -- $version` - case (vs @ (_ :: _), l) if vs.exists(v => l == endVersionBlock ++ v) => + case (vs @ (_ :: _), endVersionBlock(v)) if vs.exists(_ == v) => acc.copy(currVersions = Nil, output = (acc.output :+ "")) // Fail on attempts at nested version blocks - case (_ :: _, l) if versionBlockComments.exists(l.startsWith(_)) => + case (_ :: _, startVersionBlock(_) | endVersionBlock(_)) => sys.error("Cannot nest version blocks") // Decide whether to keep a version line within a version block by checking @@ -228,10 +226,10 @@ object Build { } val defaultHttp4sPlatforms = (_: Http4sAxis.Value) match { - case Http4sAxis.v0_23 | Http4sAxis.v1_0_0_M41 => List(Platform.Jvm, Platform.Js) + case Http4sAxis.v0_23 | Http4sAxis.v1_0_0_M44 => List(Platform.Jvm, Platform.Js) } val defaultHttp4sScalaVersions = (axis: Http4sAxis.Value) => (_: Platform) => axis match { - case Http4sAxis.v0_23 | Http4sAxis.v1_0_0_M41 => identity[Seq[String]] _ + case Http4sAxis.v0_23 | Http4sAxis.v1_0_0_M44 => identity[Seq[String]] _ } lazy val http4sProj = LibAxesProj(Http4sAxis.all)( @@ -257,7 +255,7 @@ object Build { defaultPlayScalaVersions, ) - val scalacheckVersion = "1.17.0" + val scalacheckVersion = "1.18.1" val scalacheckDep = Def.setting("org.scalacheck" %%% "scalacheck" % scalacheckVersion) val testSettings = Seq( @@ -268,8 +266,8 @@ object Build { .getOrElse(Seq()) ) - val catsCore = Def.setting("org.typelevel" %%% "cats-core" % "2.10.0") - val izumiReflect = Def.setting("dev.zio" %%% "izumi-reflect" % "2.3.8") + val catsCore = Def.setting("org.typelevel" %%% "cats-core" % "2.12.0") + val izumiReflect = Def.setting("dev.zio" %%% "izumi-reflect" % "2.3.10") val http4sV1Milestone = "1.0.0-M" object Http4sAxis extends Enumeration { @@ -285,8 +283,8 @@ object Build { implicit def valueToHAVal(v: Value): HAVal = v.asInstanceOf[HAVal] implicit def valueToVirtualAxis(v: Value): VirtualAxis.WeakAxis = v.axis - val v0_23 = HAVal("0.23", "0.23.27", "latest stable on cats effect 3") - val v1_0_0_M41 = HAVal(s"${http4sV1Milestone}41", s"${http4sV1Milestone}41", "latest development on cats effect 3") + val v0_23 = HAVal("0.23", "0.23.30", "latest stable on cats effect 3") + val v1_0_0_M44 = HAVal(s"${http4sV1Milestone}44", s"${http4sV1Milestone}44", "latest development on cats effect 3") lazy val all = values.toList } @@ -306,8 +304,8 @@ object Build { implicit def valueToPAVal(v: Value): PAVal = v.asInstanceOf[PAVal] implicit def valueToVirtualAxis(v: Value): VirtualAxis.WeakAxis = v.axis - val v3_0 = PAVal("3.0", "3.0.0", proj => version => Def.setting("org.playframework" %%% proj % version)) - val v2_9 = PAVal("2.9", "2.9.0", proj => version => Def.setting("com.typesafe.play" %%% proj % version)) + val v3_0 = PAVal("3.0", "3.0.6", proj => version => Def.setting("org.playframework" %%% proj % version)) + val v2_9 = PAVal("2.9", "2.9.6", proj => version => Def.setting("com.typesafe.play" %%% proj % version)) lazy val all = values.toList } diff --git a/project/build.properties b/project/build.properties index 04267b1..e88a0d8 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.9 +sbt.version=1.10.6 diff --git a/project/plugins.sbt b/project/plugins.sbt index 9cac769..8df2d6b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,9 +1,9 @@ -addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0") -addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0") +addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.1") +addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.16") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.2" ) +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.6") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.1" ) addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7") resolvers += "bondlink-maven-repo" at "https://raw.githubusercontent.com/mblink/maven-repo/main" diff --git a/website/sidebars.json b/website/sidebars.json index 1537015..8358124 100755 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -10,7 +10,7 @@ "ids": [ "implementations", "implementations/http4s-0.23", - "implementations/http4s-1.0.0-M41", + "implementations/http4s-1.0.0-M44", "implementations/play" ] },