From 8bbaa665f5b6aaa2343a40f79f7d109830376ef9 Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 5 Dec 2024 16:29:23 +0100 Subject: [PATCH] Upgrade dependencies --- build.sbt | 14 +++++++------- .../main/scala/io/bullet/borer/Decoder.scala | 18 ++++++------------ .../borer/internal/BasicProductCodec.scala | 5 ++++- project/build.properties | 2 +- project/plugins.sbt | 2 +- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/build.sbt b/build.sbt index 3c14070d..9c60faab 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ import sbt.* import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType} -def scala3 = "3.3.3" +def scala3 = "3.3.4" inThisBuild( List( @@ -108,18 +108,18 @@ lazy val releaseSettings = { /////////////////////// DEPENDENCIES ///////////////////////// // format: OFF -val `akka-actor` = Def.setting("com.typesafe.akka" %% "akka-actor-typed" % "2.8.6") -val `akka-stream` = Def.setting("com.typesafe.akka" %% "akka-stream" % "2.8.6") +val `akka-actor` = Def.setting("com.typesafe.akka" %% "akka-actor-typed" % "2.8.8") +val `akka-stream` = Def.setting("com.typesafe.akka" %% "akka-stream" % "2.8.8") val `akka-http` = Def.setting("com.typesafe.akka" %% "akka-http" % "10.5.3") -val `pekko-actor` = Def.setting("org.apache.pekko" %% "pekko-actor-typed" % "1.1.1") -val `pekko-stream` = Def.setting("org.apache.pekko" %% "pekko-stream" % "1.1.1") -val `pekko-http` = Def.setting("org.apache.pekko" %% "pekko-http" % "1.0.1") +val `pekko-actor` = Def.setting("org.apache.pekko" %% "pekko-actor-typed" % "1.1.2") +val `pekko-stream` = Def.setting("org.apache.pekko" %% "pekko-stream" % "1.1.2") +val `pekko-http` = Def.setting("org.apache.pekko" %% "pekko-http" % "1.1.0") val `cats-core` = Def.setting("org.typelevel" %%% "cats-core" % "2.12.0") val `circe-core` = Def.setting("io.circe" %%% "circe-core" % "0.14.10") val `circe-parser` = Def.setting("io.circe" %%% "circe-parser" % "0.14.10") val `circe-generic` = Def.setting("io.circe" %%% "circe-generic" % "0.14.10") val `scodec-bits` = Def.setting("org.scodec" %%% "scodec-bits" % "1.2.1") -val munit = Def.setting("org.scalameta" %%% "munit" % "1.0.2" % Test) +val munit = Def.setting("org.scalameta" %%% "munit" % "1.0.3" % Test) val macrolizer = Def.setting("io.bullet" %%% "macrolizer" % "0.6.2" % "compile-internal, test-internal") // format: ON diff --git a/core/src/main/scala/io/bullet/borer/Decoder.scala b/core/src/main/scala/io/bullet/borer/Decoder.scala index bfc3cf84..93b9138c 100644 --- a/core/src/main/scala/io/bullet/borer/Decoder.scala +++ b/core/src/main/scala/io/bullet/borer/Decoder.scala @@ -8,21 +8,14 @@ package io.bullet.borer -import java.lang.{ - Boolean as JBoolean, - Byte as JByte, - Double as JDouble, - Float as JFloat, - Long as JLong, - Short as JShort -} -import java.math.{BigDecimal as JBigDecimal, BigInteger as JBigInteger} import io.bullet.borer.encodings.BaseEncoding import io.bullet.borer.internal.Util -import scala.annotation.{tailrec, threadUnsafe} -import scala.collection.immutable.{HashMap, ListMap, TreeMap} +import java.lang.{Boolean as JBoolean, Byte as JByte, Double as JDouble, Float as JFloat, Long as JLong, Short as JShort} +import java.math.{BigDecimal as JBigDecimal, BigInteger as JBigInteger} +import scala.annotation.{nowarn, tailrec, threadUnsafe} import scala.collection.{mutable, Factory} +import scala.collection.immutable.{HashMap, ListMap, TreeMap} import scala.deriving.Mirror import scala.reflect.ClassTag @@ -33,7 +26,7 @@ trait Decoder[T]: def read(r: Reader): T object Decoder extends LowPrioDecoders: - import io.bullet.borer.{DataItem => DI} + import io.bullet.borer.DataItem as DI /** * A [[Decoder]] that might change its encoding strategy if [[T]] has a default value. @@ -88,6 +81,7 @@ object Decoder extends LowPrioDecoders: * Maps the result of the underlying [[Decoder]] with the given function. * If the function returns `None` decoding will fail with a [[Borer.Error.ValidationFailure]]. */ + @nowarn("msg=anonymous class definition will be duplicated at each inline site") inline def mapOption[B: Mirror.Of](f: A => Option[B]): Decoder[B] = Decoder(r => f(underlying.read(r)).getOrElse(r.unexpectedDataItem(Util.typeName[B]))) diff --git a/core/src/main/scala/io/bullet/borer/internal/BasicProductCodec.scala b/core/src/main/scala/io/bullet/borer/internal/BasicProductCodec.scala index 40911991..70e662c3 100644 --- a/core/src/main/scala/io/bullet/borer/internal/BasicProductCodec.scala +++ b/core/src/main/scala/io/bullet/borer/internal/BasicProductCodec.scala @@ -10,12 +10,14 @@ package io.bullet.borer.internal import io.bullet.borer.* -import scala.deriving.* import scala.compiletime.* +import scala.deriving.* import scala.Tuple.Size +import scala.annotation.nowarn private[borer] object BasicProductCodec: + @nowarn("msg=anonymous class definition will be duplicated at each inline site") inline def encoder[T <: Product](using m: Mirror.ProductOf[T]): Encoder[T] = type Fields = m.MirroredElemTypes inline erasedValue[Fields] match @@ -32,6 +34,7 @@ private[borer] object BasicProductCodec: case _: (t *: ts) => encRec[T, ts](w.write(x.productElement(n).asInstanceOf[t])(using summonInline[Encoder[t]]), x, n + 1) + @nowarn("msg=anonymous class definition will be duplicated at each inline site") inline def decoder[T <: Product](using m: Mirror.ProductOf[T]): Decoder[T] = type Fields = m.MirroredElemTypes inline erasedValue[Fields] match diff --git a/project/build.properties b/project/build.properties index 0b699c30..e88a0d81 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.2 +sbt.version=1.10.6 diff --git a/project/plugins.sbt b/project/plugins.sbt index 60b0dc1d..acc46971 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.2") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") addSbtPlugin("com.github.sbt" % "sbt-boilerplate" % "0.7.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7") addSbtPlugin("io.bullet" % "sbt-paradox-material-theme" % "0.7.0")