From 6503de134d3577e912c02b40cfd4a301460dec75 Mon Sep 17 00:00:00 2001 From: Miles Sabin Date: Mon, 6 Feb 2023 16:37:11 +0000 Subject: [PATCH] Dependency updates --- .github/workflows/ci.yml | 34 ++++++++++----------- build.sbt | 11 ++++--- modules/sql/src/main/scala/SqlMapping.scala | 8 ++--- project/build.properties | 2 +- project/plugins.sbt | 6 ++-- 5 files changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abad510f..9ee0c00e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,33 +28,33 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.10, 3.2.1] + scala: [2.13.10, 3.2.2] java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Download Java (temurin@11) id: download-java-temurin-11 if: matrix.java == 'temurin@11' - uses: typelevel/download-java@v1 + uses: typelevel/download-java@v2 with: distribution: temurin java-version: 11 - name: Setup Java (temurin@11) if: matrix.java == 'temurin@11' - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: jdkfile java-version: 11 jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }} - name: Cache sbt - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.sbt @@ -75,11 +75,11 @@ jobs: run: sbt '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@11' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@11' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' doc - name: Make target directories @@ -92,7 +92,7 @@ jobs: - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }} path: targets.tar @@ -109,28 +109,28 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Download Java (temurin@11) id: download-java-temurin-11 if: matrix.java == 'temurin@11' - uses: typelevel/download-java@v1 + uses: typelevel/download-java@v2 with: distribution: temurin java-version: 11 - name: Setup Java (temurin@11) if: matrix.java == 'temurin@11' - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: jdkfile java-version: 11 jdkFile: ${{ steps.download-java-temurin-11.outputs.jdkFile }} - name: Cache sbt - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.sbt @@ -142,7 +142,7 @@ jobs: key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Download target directories (2.13.10) - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10 @@ -151,12 +151,12 @@ jobs: tar xf targets.tar rm targets.tar - - name: Download target directories (3.2.1) - uses: actions/download-artifact@v2 + - name: Download target directories (3.2.2) + uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.1 + name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2 - - name: Inflate target directories (3.2.1) + - name: Inflate target directories (3.2.2) run: | tar xf targets.tar rm targets.tar diff --git a/build.sbt b/build.sbt index 2d154852..38c118de 100644 --- a/build.sbt +++ b/build.sbt @@ -2,14 +2,14 @@ import nl.zolotko.sbt.jfr.{JfrRecording, JfrRecorderOptions} import scala.concurrent.duration.DurationInt val catsVersion = "2.9.0" -val catsParseVersion = "0.3.8" +val catsParseVersion = "0.3.9" val catsEffectVersion = "3.1.1" val catsTestkitScalaTestVersion = "2.1.5" val circeVersion = "0.14.3" val doobieVersion = "1.0.0-RC2" -val flywayVersion = "9.10.2" -val fs2Version = "3.4.0" -val http4sVersion = "0.23.16" +val flywayVersion = "9.14.1" +val fs2Version = "3.5.0" +val http4sVersion = "0.23.18" val http4sBlazeVersion = "0.23.13" val kindProjectorVersion = "0.13.2" val literallyVersion = "1.1.0" @@ -23,7 +23,7 @@ val testContainersVersion = "0.40.12" val typenameVersion = "1.0.0" val Scala2 = "2.13.10" -val Scala3 = "3.2.1" +val Scala3 = "3.2.2" ThisBuild / scalaVersion := Scala2 ThisBuild / crossScalaVersions := Seq(Scala2, Scala3) @@ -49,6 +49,7 @@ ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11")) lazy val commonSettings = Seq( //scalacOptions --= Seq("-Wunused:params", "-Wunused:imports", "-Wunused:patvars", "-Wdead-code", "-Wunused:locals", "-Wunused:privates", "-Wunused:implicits"), + scalacOptions += "-Wconf:msg=unused value of type org.scalatest.Assertion:silent", libraryDependencies ++= Seq( "org.typelevel" %% "cats-testkit" % catsVersion % "test", "org.typelevel" %% "cats-testkit-scalatest" % catsTestkitScalaTestVersion % "test" diff --git a/modules/sql/src/main/scala/SqlMapping.scala b/modules/sql/src/main/scala/SqlMapping.scala index 091084ab..ae21b2a3 100644 --- a/modules/sql/src/main/scala/SqlMapping.scala +++ b/modules/sql/src/main/scala/SqlMapping.scala @@ -1877,7 +1877,7 @@ trait SqlMappingLike[F[_]] extends CirceMappingLike[F] with SqlModule[F] { self predicate = false ) - case _ => None + case _ => sys.error(s"Non-subobject mapping for field '$fieldName' of type ${parentContext.tpe}") } @@ -2332,7 +2332,7 @@ trait SqlMappingLike[F[_]] extends CirceMappingLike[F] with SqlModule[F] { self val pred1 = pred0.map(p => contextualiseWhereTerms(context, baseRef, p)) val distOrders = - keyCols.map(col => OrderSelection(col.derive(baseRef).toTerm, true, true)) + keyCols.map(col => OrderSelection(col.derive(baseRef).toTerm, true, true)) ++ oss.filterNot(os => keyCols.contains(columnForSqlTerm(context, os.term).getOrElse(sys.error(s"No column for term ${os.term}")))) val distOrderCols = orderCols.diff(keyCols).map(_.derive(baseRef)) @@ -2867,7 +2867,7 @@ trait SqlMappingLike[F[_]] extends CirceMappingLike[F] with SqlModule[F] { self val subtpes = narrows.map(_.subtpe) val supertpe = context.tpe.underlying assert(supertpe.underlying.isInterface || supertpe.underlying.isUnion) - subtpes.map(subtpe => assert(subtpe <:< supertpe)) + subtpes.foreach(subtpe => assert(subtpe <:< supertpe)) val discriminator = discriminatorForType(context) val narrowPredicates = subtpes.map { subtpe => @@ -3120,7 +3120,7 @@ trait SqlMappingLike[F[_]] extends CirceMappingLike[F] with SqlModule[F] { self case Some(cols) => cols case None => val keys = SqlMappingLike.this.keyColumnsForType(context).map(index) - keyColumnsMemo.put(key, keys) + keyColumnsMemo.put(key, keys): Unit keys } } diff --git a/project/build.properties b/project/build.properties index 8b9a0b0a..46e43a97 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.0 +sbt.version=1.8.2 diff --git a/project/plugins.sbt b/project/plugins.sbt index b8306c3d..4cb5c403 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,9 +1,9 @@ -addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.4.17") +addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.4.18") addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.1") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.2") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.4") addSbtPlugin("nl.zolotko.sbt" % "sbt-jfr" % "0.0.1")