diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 894d395a..2f3c2224 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.15', '2.13.6', '3.0.2'] + scala: ['2.11.12', '2.12.17', '2.13.10', '3.2.2'] platform: ['JVM', 'JS'] steps: - name: Checkout current branch @@ -62,13 +62,13 @@ jobs: - name: Cache scala dependencies uses: coursier/cache-action@v6 - name: Run tests - if: ${{ !startsWith(matrix.scala, '3.0.') }} + if: ${{ !startsWith(matrix.scala, '3.') }} run: sbt ++${{ matrix.scala }}! test${{ matrix.platform }} - name: Run dotty tests - if: ${{ startsWith(matrix.scala, '3.0.') && matrix.platform == 'JVM' }} - run: sbt ++${{ matrix.scala }}! testJVM + if: ${{ startsWith(matrix.scala, '3.') }} + run: sbt ++${{ matrix.scala }} test${{ matrix.platform }} - name: Compile additional subprojects - if: ${{ !startsWith(matrix.scala, '3.0.') }} + if: ${{ !startsWith(matrix.scala, '3.') }} run: sbt ++${{ matrix.scala }}! examples/compile docs/compile benchmarks/compile ci: diff --git a/build.sbt b/build.sbt index 3004cb69..1f87a98d 100644 --- a/build.sbt +++ b/build.sbt @@ -20,7 +20,7 @@ inThisBuild( ) ) -val ZioVersion = "1.0.12" +val ZioVersion = "1.0.18" val scalaJavaTimeVersion = "2.3.0" val slf4jVersion = "1.7.33" @@ -50,11 +50,11 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) .settings(stdSettings("zio-logging")) .settings( libraryDependencies ++= Seq( - "dev.zio" %%% "zio" % ZioVersion, - "dev.zio" %%% "zio-streams" % ZioVersion, - "org.scala-lang.modules" %%% "scala-collection-compat" % "2.5.0", - "dev.zio" %%% "zio-test" % ZioVersion % Test, - "dev.zio" %%% "zio-test-sbt" % ZioVersion % Test + "dev.zio" %%% "zio" % ZioVersion, + "dev.zio" %%% "zio-streams" % ZioVersion, + ("org.scala-lang.modules" %%% "scala-collection-compat" % "2.9.0").cross(CrossVersion.for3Use2_13), + "dev.zio" %%% "zio-test" % ZioVersion % Test, + "dev.zio" %%% "zio-test-sbt" % ZioVersion % Test ), testFrameworks := Seq(new TestFramework("zio.test.sbt.ZTestFramework")) ) @@ -65,7 +65,10 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) lazy val coreJVM = core.jvm .settings(dottySettings) lazy val coreJS = core.js.settings( - libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.3.0" % Test + libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.3.0" % Test, + libraryDependencies += ("org.scala-js" %%% "scalajs-java-securerandom" % "1.0.0").cross( + CrossVersion.for3Use2_13 + ) % Test ) lazy val slf4j = project diff --git a/core/shared/src/main/scala/zio/logging/LogAnnotation.scala b/core/shared/src/main/scala/zio/logging/LogAnnotation.scala index 1ef79218..0af2e3dc 100644 --- a/core/shared/src/main/scala/zio/logging/LogAnnotation.scala +++ b/core/shared/src/main/scala/zio/logging/LogAnnotation.scala @@ -1,5 +1,6 @@ package zio.logging +import com.github.ghik.silencer.silent import zio.Cause import java.time.OffsetDateTime @@ -40,6 +41,7 @@ object LogAnnotation { * If a value for the annotation is present, it will be rendered using the provided function. When * absent, it will be rendered as an empty string. */ + @silent("evidence") def optional[A: ClassTag](name: String, render: A => String): LogAnnotation[Option[A]] = LogAnnotation( name = name, diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index ebf40f83..4547c4d2 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -24,9 +24,9 @@ object BuildHelper { val Scala211: String = versions("2.11") val Scala212: String = versions("2.12") val Scala213: String = versions("2.13") - val ScalaDotty: String = versions("3.0") + val ScalaDotty: String = versions("3.2") - val SilencerVersion = "1.7.8" + val SilencerVersion = "1.7.12" private val stdOptions = Seq( "-deprecation", diff --git a/project/build.properties b/project/build.properties index 7a7e80d6..f344c148 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.5.5 +sbt.version = 1.8.2 diff --git a/project/plugins.sbt b/project/plugins.sbt index ff29ab34..2a599a00 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.4.12") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.33") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.4") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") @@ -9,7 +9,7 @@ addSbtPlugin("com.typesafe" % "sbt-mima-plugin" addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.1") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")