From f0157569ee4271923bbaa627f1d2eb57e61fbdd1 Mon Sep 17 00:00:00 2001 From: Lucas Satabin Date: Sun, 3 Dec 2023 17:49:08 +0100 Subject: [PATCH 1/7] Bunch update dependencies --- build.sbt | 18 ++++++++---------- project/build.properties | 2 +- project/plugins.sbt | 9 ++++----- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/build.sbt b/build.sbt index 8fb87831..e4bdd329 100644 --- a/build.sbt +++ b/build.sbt @@ -1,17 +1,15 @@ import com.typesafe.tools.mima.core._ val scala212 = "2.12.18" -val scala213 = "2.13.10" -val scala3 = "3.2.2" +val scala213 = "2.13.12" +val scala3 = "3.3.1" -val scalatestVersion = "3.2.15" +val scalatestVersion = "3.2.17" val scalacheckVersion = "1.17.0" +ThisBuild / tlJdkRelease := Some(11) ThisBuild / scalaVersion := scala213 -ThisBuild / crossScalaVersions := Seq(scala212, scala213, scala3) -ThisBuild / tlSkipIrrelevantScalas := true - -ThisBuild / tlSonatypeUseLegacyHost := true +ThisBuild / crossScalaVersions := Seq(elems = scala212, scala213, scala3) ThisBuild / tlFatalWarnings := false @@ -41,7 +39,7 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform) name := "diffson-core", libraryDependencies ++= Seq( "org.scala-lang.modules" %%% "scala-collection-compat" % "2.11.0", - "org.typelevel" %%% "cats-core" % "2.9.0", + "org.typelevel" %%% "cats-core" % "2.10.0", "org.scalatest" %%% "scalatest" % scalatestVersion % Test, "org.scalacheck" %%% "scalacheck" % scalacheckVersion % Test ), @@ -73,11 +71,11 @@ lazy val playJson = crossProject(JSPlatform, JVMPlatform) .in(file("playJson")) .settings(commonSettings: _*) .settings(name := "diffson-play-json", - libraryDependencies += "com.typesafe.play" %%% "play-json" % "2.10.0-RC6", + libraryDependencies += "org.playframework" %%% "play-json" % "3.0.1", tlVersionIntroduced := Map("3" -> "4.3.0")) .dependsOn(core, testkit % Test) -val circeVersion = "0.14.5" +val circeVersion = "0.14.6" lazy val circe = crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Full) .in(file("circe")) diff --git a/project/build.properties b/project/build.properties index 72413de1..e8a1e246 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.3 +sbt.version=1.9.7 diff --git a/project/plugins.sbt b/project/plugins.sbt index 011cf5ce..8dba3b67 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,4 @@ -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.20") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.12") -addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.1") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.4") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.6.3") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.16") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") From b9fed116db631ac2670e5947ae786e569ddcd51c Mon Sep 17 00:00:00 2001 From: Lucas Satabin Date: Sun, 3 Dec 2023 17:50:06 +0100 Subject: [PATCH 2/7] Update workflow --- .github/workflows/ci.yml | 207 +++++++++++++++++++++------------------ 1 file changed, 110 insertions(+), 97 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d51843e8..3da3817f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,90 +15,76 @@ on: tags: [v*] env: - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }} - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - PGP_SECRET: ${{ secrets.PGP_SECRET }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +concurrency: + group: ${{ github.workflow }} @ ${{ github.ref }} + cancel-in-progress: true + jobs: build: name: Build and Test strategy: matrix: os: [ubuntu-latest] - scala: [2.12.18, 2.13.10, 3.2.2] - java: [temurin@8] - project: [rootJS, rootJVM, rootNative] + scala: [2.12, 2.13, 3] + java: [temurin@11] + project: [diffsonJVM, diffsonJS, diffsonNative] runs-on: ${{ matrix.os }} + timeout-minutes: 60 steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Download Java (temurin@8) - id: download-java-temurin-8 - if: matrix.java == 'temurin@8' - uses: typelevel/download-java@v2 + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v4 with: distribution: temurin - java-version: 8 - - - name: Setup Java (temurin@8) - if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 - with: - distribution: jdkfile - java-version: 8 - jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} + java-version: 11 + cache: sbt - - name: Cache sbt - uses: actions/cache@v3 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: sbt update + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' + run: sbt +update - name: Check that workflows are up to date run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: scalaJSLink - if: matrix.project == 'rootJS' + if: matrix.project == 'diffsonJS' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult - name: nativeLink - if: matrix.project == 'rootNative' + if: matrix.project == 'diffsonNative' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink - name: Test run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: mkdir -p circe/jvm/target testkit/native/target target testkit/js/target .js/target core/.native/target playJson/jvm/target benchmarks/.jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target .jvm/target .native/target circe/native/target playJson/js/target testkit/jvm/target project/target + run: mkdir -p circe/jvm/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: tar cf targets.tar circe/jvm/target testkit/native/target target testkit/js/target .js/target core/.native/target playJson/jvm/target benchmarks/.jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target .jvm/target .native/target circe/native/target playJson/js/target testkit/jvm/target project/target + run: tar cf targets.tar circe/jvm/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') @@ -114,143 +100,170 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.10] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Download Java (temurin@8) - id: download-java-temurin-8 - if: matrix.java == 'temurin@8' - uses: typelevel/download-java@v2 + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v4 with: distribution: temurin - java-version: 8 + java-version: 11 + cache: sbt - - name: Setup Java (temurin@8) - if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 - with: - distribution: jdkfile - java-version: 8 - jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} + - name: sbt update + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' + run: sbt +update - - name: Cache sbt - uses: actions/cache@v3 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - - name: Download target directories (2.12.18, rootJS) + - name: Download target directories (2.12, diffsonJVM) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-diffsonJVM - - name: Inflate target directories (2.12.18, rootJS) + - name: Inflate target directories (2.12, diffsonJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.18, rootJVM) + - name: Download target directories (2.12, diffsonJS) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-diffsonJS - - name: Inflate target directories (2.12.18, rootJVM) + - name: Inflate target directories (2.12, diffsonJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.18, rootNative) + - name: Download target directories (2.12, diffsonNative) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-diffsonNative - - name: Inflate target directories (2.12.18, rootNative) + - name: Inflate target directories (2.12, diffsonNative) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.10, rootJS) + - name: Download target directories (2.13, diffsonJVM) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-diffsonJVM - - name: Inflate target directories (2.13.10, rootJS) + - name: Inflate target directories (2.13, diffsonJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.10, rootJVM) + - name: Download target directories (2.13, diffsonJS) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-diffsonJS - - name: Inflate target directories (2.13.10, rootJVM) + - name: Inflate target directories (2.13, diffsonJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.10, rootNative) + - name: Download target directories (2.13, diffsonNative) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-diffsonNative - - name: Inflate target directories (2.13.10, rootNative) + - name: Inflate target directories (2.13, diffsonNative) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.2.2, rootJS) + - name: Download target directories (3, diffsonJVM) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-3-diffsonJVM - - name: Inflate target directories (3.2.2, rootJS) + - name: Inflate target directories (3, diffsonJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.2.2, rootJVM) + - name: Download target directories (3, diffsonJS) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-3-diffsonJS - - name: Inflate target directories (3.2.2, rootJVM) + - name: Inflate target directories (3, diffsonJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.2.2, rootNative) + - name: Download target directories (3, diffsonNative) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-3-diffsonNative - - name: Inflate target directories (3.2.2, rootNative) + - name: Inflate target directories (3, diffsonNative) run: | tar xf targets.tar rm targets.tar - name: Import signing key if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' - run: echo $PGP_SECRET | base64 -di | gpg --import + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + run: echo $PGP_SECRET | base64 -d -i - | gpg --import - name: Import signing key and strip passphrase if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != '' + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} run: | - echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg + echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg (echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1) - name: Publish - run: sbt '++ ${{ matrix.scala }}' tlCiRelease + env: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }} + run: sbt tlCiRelease + + dependency-submission: + name: Submit Dependencies + if: github.event_name != 'pull_request' + strategy: + matrix: + os: [ubuntu-latest] + java: [temurin@11] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Java (temurin@11) + id: setup-java-temurin-11 + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 11 + cache: sbt + + - name: sbt update + if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' + run: sbt +update + + - name: Submit Dependencies + uses: scalacenter/sbt-dependency-submission@v2 + with: + modules-ignore: diffsonjvm_2.12 diffsonjvm_2.13 diffsonjvm_3 diffsonjs_2.12 diffsonjs_2.13 diffsonjs_3 diffson-benchmarks_2.12 diffson-benchmarks_2.13 diffson-benchmarks_3 diffsonnative_2.12 diffsonnative_2.13 diffsonnative_3 + configs-ignore: test scala-tool scala-doc-tool test-internal From 05362d47c62743ef17b27ee478b7e5ded4f03a31 Mon Sep 17 00:00:00 2001 From: Lucas Satabin Date: Sun, 3 Dec 2023 17:52:56 +0100 Subject: [PATCH 3/7] Add native build for play-json module --- .github/workflows/ci.yml | 4 ++-- build.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3da3817f..2752d1f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,11 +80,11 @@ jobs: - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: mkdir -p circe/jvm/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target + run: mkdir -p circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: tar cf targets.tar circe/jvm/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target + run: tar cf targets.tar circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') diff --git a/build.sbt b/build.sbt index e4bdd329..991ce3df 100644 --- a/build.sbt +++ b/build.sbt @@ -66,7 +66,7 @@ lazy val sprayJson = project libraryDependencies += "io.spray" %% "spray-json" % "1.3.6") .dependsOn(core.jvm, testkit.jvm % Test) -lazy val playJson = crossProject(JSPlatform, JVMPlatform) +lazy val playJson = crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Full) .in(file("playJson")) .settings(commonSettings: _*) From 445d792d395e4d5c6804bebdee816ffad63517b8 Mon Sep 17 00:00:00 2001 From: Lucas Satabin Date: Sun, 3 Dec 2023 18:11:04 +0100 Subject: [PATCH 4/7] Make it build with scala 3 --- .../src/main/scala/diffson/playJson/DiffsonProtocol.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playJson/shared/src/main/scala/diffson/playJson/DiffsonProtocol.scala b/playJson/shared/src/main/scala/diffson/playJson/DiffsonProtocol.scala index 0aae0438..6d6fad42 100644 --- a/playJson/shared/src/main/scala/diffson/playJson/DiffsonProtocol.scala +++ b/playJson/shared/src/main/scala/diffson/playJson/DiffsonProtocol.scala @@ -32,8 +32,8 @@ object DiffsonProtocol { private def errorToException(error: JsError): Exception = JsError.toFlatForm(error) match { - case Seq((_, Seq(e, _*)), _*) => PatchException(e.message) - case _ => PatchException("Empty json error") + case Seq((_, Seq(e: JsonValidationError, _*)), _*) => PatchException(e.message) + case _ => PatchException("Empty json error") } implicit object JsResultInstances extends MonadError[JsResult, Throwable] { From 2870cffaa91bb1af220ce97d28b7ca5d307cce2a Mon Sep 17 00:00:00 2001 From: Lucas Satabin Date: Sun, 3 Dec 2023 18:25:04 +0100 Subject: [PATCH 5/7] Introduce scala 3 build for spray-json --- .github/workflows/ci.yml | 4 ++-- build.sbt | 12 +++++++----- core/src/main/scala/diffson/lcs/HashedLcs.scala | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2752d1f5..96c592c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,11 +80,11 @@ jobs: - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: mkdir -p circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target + run: mkdir -p circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target sprayJson/.jvm/target project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: tar cf targets.tar circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target sprayJson/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target project/target + run: tar cf targets.tar circe/jvm/target playJson/native/target testkit/native/target testkit/js/target core/.native/target playJson/jvm/target core/.js/target circe/js/target core/.jvm/target circe/native/target playJson/js/target testkit/jvm/target sprayJson/.jvm/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') diff --git a/build.sbt b/build.sbt index 991ce3df..d8447eea 100644 --- a/build.sbt +++ b/build.sbt @@ -45,7 +45,8 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform) ), mimaBinaryIssueFilters ++= List( ProblemFilters.exclude[DirectMissingMethodProblem]( - "diffson.jsonpatch.package#simplediff#remembering.JsonDiffDiff") + "diffson.jsonpatch.package#simplediff#remembering.JsonDiffDiff"), + ProblemFilters.exclude[DirectAbstractMethodProblem]("diffson.lcs.Lcs.savedHashes") ) ) @@ -58,13 +59,14 @@ lazy val testkit = crossProject(JSPlatform, JVMPlatform, NativePlatform) "org.scalacheck" %%% "scalacheck" % scalacheckVersion)) .dependsOn(core) -lazy val sprayJson = project +lazy val sprayJson = crossProject(JVMPlatform) + .crossType(CrossType.Pure) .in(file("sprayJson")) .settings(commonSettings: _*) .settings(name := "diffson-spray-json", - crossScalaVersions := Seq(scala212, scala213), - libraryDependencies += "io.spray" %% "spray-json" % "1.3.6") - .dependsOn(core.jvm, testkit.jvm % Test) + libraryDependencies += "io.spray" %% "spray-json" % "1.3.6", + tlVersionIntroduced := Map("3" -> "4.4.1")) + .dependsOn(core, testkit % Test) lazy val playJson = crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Full) diff --git a/core/src/main/scala/diffson/lcs/HashedLcs.scala b/core/src/main/scala/diffson/lcs/HashedLcs.scala index d925c25c..e32d0fba 100644 --- a/core/src/main/scala/diffson/lcs/HashedLcs.scala +++ b/core/src/main/scala/diffson/lcs/HashedLcs.scala @@ -26,7 +26,7 @@ import cats.implicits._ */ class HashedLcs[T: Eq](delegate: Lcs[Hashed[T]]) extends Lcs[T] { - def savedHashes = this + override def savedHashes: HashedLcs[T] = this override def lcs(seq1: List[T], seq2: List[T], low1: Int, high1: Int, low2: Int, high2: Int): List[(Int, Int)] = { // wrap all values and delegate to proper implementation From e0bfae492cdfac1891bc6e271e98467aba67ea74 Mon Sep 17 00:00:00 2001 From: Lucas Satabin Date: Sun, 3 Dec 2023 18:47:50 +0100 Subject: [PATCH 6/7] Remove bincompat check before 4.4.1 for play json native --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index d8447eea..8d67a5de 100644 --- a/build.sbt +++ b/build.sbt @@ -75,6 +75,7 @@ lazy val playJson = crossProject(JSPlatform, JVMPlatform, NativePlatform) .settings(name := "diffson-play-json", libraryDependencies += "org.playframework" %%% "play-json" % "3.0.1", tlVersionIntroduced := Map("3" -> "4.3.0")) + .nativeSettings(tlVersionIntroduced := Map("2.12" -> "4.4.1", "2.13" -> "4.4.1", "3" -> "4.4.1")) .dependsOn(core, testkit % Test) val circeVersion = "0.14.6" From 9ee1504606d3ba317745d328f8699ed660e7cd3b Mon Sep 17 00:00:00 2001 From: Lucas Satabin Date: Sun, 3 Dec 2023 18:52:21 +0100 Subject: [PATCH 7/7] Make this release 4.5.0 --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 8d67a5de..43aaf350 100644 --- a/build.sbt +++ b/build.sbt @@ -65,7 +65,7 @@ lazy val sprayJson = crossProject(JVMPlatform) .settings(commonSettings: _*) .settings(name := "diffson-spray-json", libraryDependencies += "io.spray" %% "spray-json" % "1.3.6", - tlVersionIntroduced := Map("3" -> "4.4.1")) + tlVersionIntroduced := Map("3" -> "4.5.0")) .dependsOn(core, testkit % Test) lazy val playJson = crossProject(JSPlatform, JVMPlatform, NativePlatform) @@ -75,7 +75,7 @@ lazy val playJson = crossProject(JSPlatform, JVMPlatform, NativePlatform) .settings(name := "diffson-play-json", libraryDependencies += "org.playframework" %%% "play-json" % "3.0.1", tlVersionIntroduced := Map("3" -> "4.3.0")) - .nativeSettings(tlVersionIntroduced := Map("2.12" -> "4.4.1", "2.13" -> "4.4.1", "3" -> "4.4.1")) + .nativeSettings(tlVersionIntroduced := Map("2.12" -> "4.5.0", "2.13" -> "4.5.0", "3" -> "4.5.0")) .dependsOn(core, testkit % Test) val circeVersion = "0.14.6"