From 94b1dc385310cc56562e235d446d77c02665f61a Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 12 Sep 2023 20:54:05 +0000 Subject: [PATCH 01/66] Update scala3-library to 3.3.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d197d0c..b11fac3 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ name := "pekko-streams-circe" val scala213Version = "2.13.11" val scala212Version = "2.12.18" -val scala3Version = "3.3.0" +val scala3Version = "3.3.1" val circeVersion = "0.14.5" val pekkoVersion = "1.0.1" From e09894ca82f2af577639aaa794dc4683c7f4fca5 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 12 Sep 2023 20:54:41 +0000 Subject: [PATCH 02/66] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45bcaa9..734fb41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.18, 2.13.11, 3.3.0] + scala: [2.12.18, 2.13.11, 3.3.1] java: [temurin@8, temurin@11, temurin@17] runs-on: ${{ matrix.os }} steps: @@ -140,12 +140,12 @@ jobs: tar xf targets.tar rm targets.tar - - name: Download target directories (3.3.0) + - name: Download target directories (3.3.1) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-3.3.0-${{ matrix.java }} + name: target-${{ matrix.os }}-3.3.1-${{ matrix.java }} - - name: Inflate target directories (3.3.0) + - name: Inflate target directories (3.3.1) run: | tar xf targets.tar rm targets.tar From 1cad1e6f8f6025ed05927f56360300926470c14c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 12 Sep 2023 20:54:51 +0000 Subject: [PATCH 03/66] Update scalatest to 3.2.17 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index b11fac3..5da0590 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ val circeVersion = "0.14.5" val pekkoVersion = "1.0.1" val pekkoHttpVersion = "1.0.0" val jawnVersion = "1.5.1" -val scalaTestVersion = "3.2.16" +val scalaTestVersion = "3.2.17" ThisBuild / crossScalaVersions := Seq(scala212Version, scala213Version, scala3Version) ThisBuild / scalaVersion := scala213Version From b500805b9a0b96ebbe9810483f47201d31790463 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 12 Sep 2023 20:55:00 +0000 Subject: [PATCH 04/66] Update sbt-scoverage to 2.0.9 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index c8a8188..f8d8f63 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.2 addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.15.0") From bda5e5a13aae908d3f8e6fca29dfef2f8aefd223 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Sep 2023 00:38:48 +0000 Subject: [PATCH 05/66] Update circe-generic, circe-jawn to 0.14.6 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5da0590..530a6f1 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ val scala213Version = "2.13.11" val scala212Version = "2.12.18" val scala3Version = "3.3.1" -val circeVersion = "0.14.5" +val circeVersion = "0.14.6" val pekkoVersion = "1.0.1" val pekkoHttpVersion = "1.0.0" val jawnVersion = "1.5.1" From 394d2f62d1d43d44ca674bed6cf730ed29f83c1f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Sep 2023 00:37:34 +0000 Subject: [PATCH 06/66] Update sbt-github-actions to 0.16.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index f8d8f63..d6612e0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0 addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.15.0") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.16.0") From fa7ac37ca97925f466a2bb40ad7f3924c8fc2753 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 7 Sep 2023 00:38:37 +0000 Subject: [PATCH 07/66] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 734fb41..051b5bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -92,7 +92,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 From 88fb1e5122ac065c5f58f469c675036c66413a00 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 20 Sep 2023 16:49:04 +0000 Subject: [PATCH 08/66] Update sbt to 1.9.6 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 3040987..2743082 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.4 +sbt.version=1.9.6 From 8a3ed493cc28e754f899f59615e5006b0babf7c2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 4 Oct 2023 16:09:53 +0000 Subject: [PATCH 09/66] Update sbt-github-actions to 0.17.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index d6612e0..ff2547f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0 addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.16.0") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.17.0") From ff20002b5afc09eb76291e80f190857fd1d792f5 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 4 Oct 2023 18:53:57 +0200 Subject: [PATCH 10/66] Update scala-library to 2.13.12 --- .github/workflows/ci.yml | 10 +++++----- build.sbt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 051b5bc..7883b18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.18, 2.13.11, 3.3.1] + scala: [2.12.18, 2.13.12, 3.3.1] java: [temurin@8, temurin@11, temurin@17] runs-on: ${{ matrix.os }} steps: @@ -87,7 +87,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.11] + scala: [2.13.12] java: [temurin@8] runs-on: ${{ matrix.os }} steps: @@ -130,12 +130,12 @@ jobs: tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.11) + - name: Download target directories (2.13.12) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-2.13.11-${{ matrix.java }} + name: target-${{ matrix.os }}-2.13.12-${{ matrix.java }} - - name: Inflate target directories (2.13.11) + - name: Inflate target directories (2.13.12) run: | tar xf targets.tar rm targets.tar diff --git a/build.sbt b/build.sbt index 530a6f1..4fbcdd8 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import com.jsuereth.sbtpgp.PgpKeys.publishSigned name := "pekko-streams-circe" -val scala213Version = "2.13.11" +val scala213Version = "2.13.12" val scala212Version = "2.12.18" val scala3Version = "3.3.1" From d75c673ca428233a8f9d7e36dbdb5baac3d7e1e8 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 4 Oct 2023 18:54:18 +0200 Subject: [PATCH 11/66] Update sbt-scalafmt to 2.5.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index ff2547f..d0eccdd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,7 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1 addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") From 2e827d89fdbcf5900744a4871f239c3128432c22 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 18 Oct 2023 22:26:13 +0200 Subject: [PATCH 12/66] Update sbt-github-actions to 0.18.0 --- .github/workflows/clean.yml | 3 ++- project/plugins.sbt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index 547aaa4..bfc865d 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -17,6 +17,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Delete artifacts + shell: bash {0} run: | # Customize those three lines with your repository and credentials: REPO=${GITHUB_API_URL}/repos/${{ github.repository }} @@ -25,7 +26,7 @@ jobs: ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; } # A temporary file which receives HTTP response headers. - TMPFILE=/tmp/tmp.$$ + TMPFILE=$(mktemp) # An associative array, key: artifact name, value: number of artifacts of that name. declare -A ARTCOUNT diff --git a/project/plugins.sbt b/project/plugins.sbt index d0eccdd..d531f62 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2 addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.17.0") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.18.0") From 40682a01d1b84b1ff682746439bb533a66667417 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 24 Oct 2023 21:36:58 +0000 Subject: [PATCH 13/66] Update sbt-github-actions to 0.19.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index d531f62..a123f65 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2 addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.18.0") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.19.0") From 36fa0cc2766e5b4868b5e02143bddd1f7b6788f5 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 26 Oct 2023 19:55:21 +0000 Subject: [PATCH 14/66] Update sbt to 1.9.7 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 2743082..e8a1e24 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.6 +sbt.version=1.9.7 From 8e9cd03da143eb9f8a89757d31d6c5fe1bd45308 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Sat, 4 Nov 2023 09:26:53 +0100 Subject: [PATCH 15/66] Update scalafmt --- .github/workflows/format.yml | 2 +- .scalafmt.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 8618318..9a79a33 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -20,5 +20,5 @@ jobs: - name: Check project is formatted uses: jrouly/scalafmt-native-action@v2 with: - version: '3.7.11' + version: '3.7.15' arguments: '--list --mode diff-ref=origin/main' diff --git a/.scalafmt.conf b/.scalafmt.conf index bba3586..8d7e3f6 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.7.11 +version = 3.7.15 runner.dialect = scala213 preset = default align.preset = more From bf6feac8777d5ae24911d3841d0d3b4635a78e41 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 1 Dec 2023 17:56:11 +0000 Subject: [PATCH 16/66] Update pekko-stream to 1.0.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 4fbcdd8..6badefa 100644 --- a/build.sbt +++ b/build.sbt @@ -7,7 +7,7 @@ val scala212Version = "2.12.18" val scala3Version = "3.3.1" val circeVersion = "0.14.6" -val pekkoVersion = "1.0.1" +val pekkoVersion = "1.0.2" val pekkoHttpVersion = "1.0.0" val jawnVersion = "1.5.1" val scalaTestVersion = "3.2.17" From 7e68f136d5da26c25df682c9b5d992ac31d52901 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 17 Nov 2023 20:52:41 +0000 Subject: [PATCH 17/66] Update sbt-sonatype to 3.10.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index a123f65..56b5417 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") From 06977e4bb1b29c5ca6fbda1664341bcb61c5ae0b Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Tue, 26 Dec 2023 14:23:11 +1100 Subject: [PATCH 18/66] Update scalafmt --- .github/workflows/format.yml | 2 +- .scalafmt.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 9a79a33..7559471 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -20,5 +20,5 @@ jobs: - name: Check project is formatted uses: jrouly/scalafmt-native-action@v2 with: - version: '3.7.15' + version: '3.7.17' arguments: '--list --mode diff-ref=origin/main' diff --git a/.scalafmt.conf b/.scalafmt.conf index 8d7e3f6..3092d42 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.7.15 +version = 3.7.17 runner.dialect = scala213 preset = default align.preset = more From 9b26197912d887d477f580838917860e396208f6 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Wed, 3 Jan 2024 21:06:04 +1100 Subject: [PATCH 19/66] Update scalafmt native github action --- .github/workflows/format.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 7559471..4442d87 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -18,7 +18,6 @@ jobs: persist-credentials: false - name: Check project is formatted - uses: jrouly/scalafmt-native-action@v2 + uses: jrouly/scalafmt-native-action@v3 with: - version: '3.7.17' arguments: '--list --mode diff-ref=origin/main' From 06c44bb8eced2cabc9055845b86d3aeca5a60f2e Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 14 Jan 2024 19:21:20 +0000 Subject: [PATCH 20/66] Update sbt to 1.9.8 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index e8a1e24..abbbce5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.7 +sbt.version=1.9.8 From 8e4caecef702be5e6a58315d9581cc31b79d126c Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 17 Jan 2024 07:33:23 +0100 Subject: [PATCH 21/66] Update sbt-github-actions to 0.22.0 --- .github/workflows/ci.yml | 20 ++++++++++---------- project/plugins.sbt | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7883b18..e44a440 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - name: Setup Java (temurin@8) if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 8 @@ -42,7 +42,7 @@ jobs: - name: Setup Java (temurin@11) if: matrix.java == 'temurin@11' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -50,7 +50,7 @@ jobs: - name: Setup Java (temurin@17) if: matrix.java == 'temurin@17' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 @@ -75,7 +75,7 @@ jobs: run: tar cf targets.tar target support/stream-circe/target http-json/target tests/target stream-json/target support/http-circe/target project/target - name: Upload target directories - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} path: targets.tar @@ -98,7 +98,7 @@ jobs: - name: Setup Java (temurin@8) if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 8 @@ -106,7 +106,7 @@ jobs: - name: Setup Java (temurin@11) if: matrix.java == 'temurin@11' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -114,14 +114,14 @@ jobs: - name: Setup Java (temurin@17) if: matrix.java == 'temurin@17' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 cache: sbt - name: Download target directories (2.12.18) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }} @@ -131,7 +131,7 @@ jobs: rm targets.tar - name: Download target directories (2.13.12) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: target-${{ matrix.os }}-2.13.12-${{ matrix.java }} @@ -141,7 +141,7 @@ jobs: rm targets.tar - name: Download target directories (3.3.1) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: target-${{ matrix.os }}-3.3.1-${{ matrix.java }} diff --git a/project/plugins.sbt b/project/plugins.sbt index 56b5417..b0f2e64 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2 addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.19.0") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.22.0") From 5fa73f5304e4244d062261b20cf5dc22f794fd3b Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Wed, 17 Jan 2024 18:31:24 +1100 Subject: [PATCH 22/66] Fix typo's, grammar and spelling --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4e8ecb1..a060e91 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ # Pekko Streams Circe Support This library provides Json support for stream based applications using [jawn](https://github.com/non/jawn) -as a parser. It supports all backends that jawn supports with support for [circe](https://github.com/travisbrown/circe) provided as a example. +as a parser. It supports all backends that jawn supports with support for [circe](https://github.com/travisbrown/circe) provided as an example. It is a fork of [akka-streams-json](https://github.com/mdedetrich/akka-streams-json) built with [Apache Pekko](https://pekko.apache.org/). [akka-streams-json](https://github.com/mdedetrich/akka-streams-json) which is in itself a fork of @@ -36,13 +36,13 @@ The parser lives at `org.mdedetrich.pekko.json.stream.JsonStreamParser` Use one of the constructor methods in the companion object to create the parser at various levels of abstraction, either a Stage, a Flow, or a Sink. You just add the [jawn support facade](https://github.com/non/jawn#supporting-external-asts-with-jawn) -of your choice and you will can parsed into their respective Json AST. +of your choice, and you will can parsed into their respective Json AST. For Http support, either `import org.mdedetrich.pekko.http.JsonSupport._` or mixin `... with org.mdedetrich.pekko.http.JsonSupport`. -Given an implicit jawn facade, this enable you to decode into the respective Json AST +Given an implicit jawn facade, this enables you to decode into the respective Json AST using the Pekko HTTP marshalling framework. As jawn is only about parsing and does not abstract over rendering, you'll only get an Unmarshaller. @@ -63,7 +63,7 @@ Adding support for a specific framework is [easy](support/http-circe/src/main/scala/org/mdedetrich/pekko/http/support/CirceHttpSupport.scala). These support modules allow you to directly marshall from/unmarshall into your data types -using circes `Decoder` and `Encoder` type classes. +using circe's `Decoder` and `Encoder` type classes. Just mixin or import `org.mdedetrich.pekko.http.support.CirceHttpSupport` for Http or pipe your `Source[ByteString, _].via(org.mdedetrich.pekko.stream.CirceStreamSupport.decode[A])` @@ -77,11 +77,9 @@ The exception provides Circe cursor history, current cursor and the type hint of ## Why jawn? -Jawn provides a nice interface for asynchronous parsing. -Most other Json marshalling provider will consume the complete entity -at first, convert it to a string and then start to parse. -With jawn, the json is incrementally parsed with each arriving data chunk, -using directly the underlying ByteBuffers without conversion. +Jawn provides a nice interface for asynchronous parsing. Most other Json marshalling provider will consume the complete +entity at first, convert it to a string and then start to parse. With jawn, the json is incrementally parsed with +each arriving data chunk, using directly the underlying ByteBuffers without conversion. ## License From 3df401e84b4809a6094686bcdb24f196c9162bf9 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Tue, 23 Jan 2024 12:45:38 +1100 Subject: [PATCH 23/66] Add JDK21 and macos-latest to CI --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- build.sbt | 5 ++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e44a440..2202b96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,9 @@ jobs: name: Build and Test strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest] scala: [2.12.18, 2.13.12, 3.3.1] - java: [temurin@8, temurin@11, temurin@17] + java: [temurin@8, temurin@11, temurin@17, temurin@21] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -56,6 +56,14 @@ jobs: java-version: 17 cache: sbt + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + - name: Check that workflows are up to date run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck @@ -120,6 +128,14 @@ jobs: java-version: 17 cache: sbt + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + - name: Download target directories (2.12.18) uses: actions/download-artifact@v4 with: diff --git a/build.sbt b/build.sbt index 6badefa..307b9b1 100644 --- a/build.sbt +++ b/build.sbt @@ -200,8 +200,11 @@ ThisBuild / githubWorkflowPublishTargetBranches := RefPredicate.Equals(Ref.Branch("main")) ) +ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest") + ThisBuild / githubWorkflowJavaVersions := List( JavaSpec.temurin("8"), JavaSpec.temurin("11"), - JavaSpec.temurin("17") + JavaSpec.temurin("17"), + JavaSpec.temurin("21") ) From c0f16384a6828d8cd426466e6fd68e3955cbcf2e Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Mon, 29 Jan 2024 21:54:52 +1100 Subject: [PATCH 24/66] Only run inliner in CI --- build.sbt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/build.sbt b/build.sbt index 307b9b1..2e00787 100644 --- a/build.sbt +++ b/build.sbt @@ -145,14 +145,18 @@ val flagsFor13 = Seq( val flagsFor3 = Seq.empty ThisBuild / scalacOptions ++= { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n == 13 => - flagsFor13 - case Some((2, n)) if n == 12 => - flagsFor12 - case Some((3, _)) => - Seq.empty - } + if (insideCI.value) { + val log = sLog.value + log.info("Running in CI, enabling Scala2 optimizer") + CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, n)) if n == 13 => + flagsFor13 + case Some((2, n)) if n == 12 => + flagsFor12 + case Some((3, _)) => + Seq.empty + } + } else Seq.empty } IntegrationTest / parallelExecution := false From cce323c96f46990ceeb530eb2c78fb08f3fd6dd7 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Sun, 4 Feb 2024 23:03:10 +1100 Subject: [PATCH 25/66] Remove redundant integration test --- build.sbt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build.sbt b/build.sbt index 2e00787..9d9a090 100644 --- a/build.sbt +++ b/build.sbt @@ -98,10 +98,6 @@ ThisBuild / scalacOptions ++= Seq( "-language:postfixOps" ) -Defaults.itSettings - -configs(IntegrationTest) - ThisBuild / homepage := Some(url("https://github.com/mdedetrich/pekko-streams-circe")) ThisBuild / scmInfo := Some( @@ -159,8 +155,6 @@ ThisBuild / scalacOptions ++= { } else Seq.empty } -IntegrationTest / parallelExecution := false - ThisBuild / githubWorkflowTargetBranches := Seq("main") // Once we have branches per version, add the pattern here ThisBuild / githubWorkflowBuild := Seq( From 9386c484f8860f3bca5285074283dd4f6398ce66 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 19 Feb 2024 23:54:22 +0000 Subject: [PATCH 26/66] Update sbt-scoverage to 2.0.10 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index b0f2e64..d9fd08c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10. addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.10") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.22.0") From 946894f1bdf194260005106936bf986eee1c1930 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 19 Feb 2024 23:54:17 +0000 Subject: [PATCH 27/66] Update scalatest to 3.2.18 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9d9a090..8b485db 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ val circeVersion = "0.14.6" val pekkoVersion = "1.0.2" val pekkoHttpVersion = "1.0.0" val jawnVersion = "1.5.1" -val scalaTestVersion = "3.2.17" +val scalaTestVersion = "3.2.18" ThisBuild / crossScalaVersions := Seq(scala212Version, scala213Version, scala3Version) ThisBuild / scalaVersion := scala213Version From 13ae33c56c5e3d83101a10d4b1066b47eb074263 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 19 Feb 2024 23:53:59 +0000 Subject: [PATCH 28/66] Update scalafmt-core to 3.8.0 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 3092d42..8199be2 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.7.17 +version = 3.8.0 runner.dialect = scala213 preset = default align.preset = more From 40a3c555939a283a5c2e883e4a2bec2f92bfbd2f Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 19 Feb 2024 23:53:44 +0000 Subject: [PATCH 29/66] Update pekko-http to 1.0.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 8b485db..3795a00 100644 --- a/build.sbt +++ b/build.sbt @@ -8,7 +8,7 @@ val scala3Version = "3.3.1" val circeVersion = "0.14.6" val pekkoVersion = "1.0.2" -val pekkoHttpVersion = "1.0.0" +val pekkoHttpVersion = "1.0.1" val jawnVersion = "1.5.1" val scalaTestVersion = "3.2.18" From a57edf3577a0407e5cb282b00c74fd118c723657 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 19 Feb 2024 23:52:39 +0000 Subject: [PATCH 30/66] Update sbt-github-actions to 0.23.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index d9fd08c..9e30fa2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2 addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.10") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.22.0") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0") From ea6620672277bb7b54775d14a8e1843d3de8f857 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 23 Feb 2024 20:00:03 +0000 Subject: [PATCH 31/66] Update sbt to 1.9.9 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index abbbce5..04267b1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.8 +sbt.version=1.9.9 From c75b62e731e415b5c00fc631bcaa90884963c012 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 25 Feb 2024 19:49:35 +0000 Subject: [PATCH 32/66] Update sbt-scoverage to 2.0.11 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 9e30fa2..d43efc5 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10. addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.10") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0") From 1d17398dac3b01f078656683114a0fd9a3b14c6b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 2 Mar 2024 19:12:39 +0000 Subject: [PATCH 33/66] Update scala3-library to 3.3.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 3795a00..62e0ae5 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ name := "pekko-streams-circe" val scala213Version = "2.13.12" val scala212Version = "2.12.18" -val scala3Version = "3.3.1" +val scala3Version = "3.3.3" val circeVersion = "0.14.6" val pekkoVersion = "1.0.2" From 732056303e43afec19f5817e927dc6253b848532 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 2 Mar 2024 19:13:32 +0000 Subject: [PATCH 34/66] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2202b96..8af9744 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - scala: [2.12.18, 2.13.12, 3.3.1] + scala: [2.12.18, 2.13.12, 3.3.3] java: [temurin@8, temurin@11, temurin@17, temurin@21] runs-on: ${{ matrix.os }} steps: @@ -156,12 +156,12 @@ jobs: tar xf targets.tar rm targets.tar - - name: Download target directories (3.3.1) + - name: Download target directories (3.3.3) uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-3.3.1-${{ matrix.java }} + name: target-${{ matrix.os }}-3.3.3-${{ matrix.java }} - - name: Inflate target directories (3.3.1) + - name: Inflate target directories (3.3.3) run: | tar xf targets.tar rm targets.tar From e9609c9a07901650d28ddcca81ce2085280b354d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 20 Mar 2024 17:50:00 +0000 Subject: [PATCH 35/66] Update scala-library to 2.13.13 --- .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 8af9744..781eef4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - scala: [2.12.18, 2.13.12, 3.3.3] + scala: [2.12.18, 2.13.13, 3.3.3] java: [temurin@8, temurin@11, temurin@17, temurin@21] runs-on: ${{ matrix.os }} steps: @@ -95,7 +95,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.12] + scala: [2.13.13] java: [temurin@8] runs-on: ${{ matrix.os }} steps: diff --git a/build.sbt b/build.sbt index 62e0ae5..f24e2df 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import com.jsuereth.sbtpgp.PgpKeys.publishSigned name := "pekko-streams-circe" -val scala213Version = "2.13.12" +val scala213Version = "2.13.13" val scala212Version = "2.12.18" val scala3Version = "3.3.3" From c0df2e46dac771971472666bb4ee74cceee49fc4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 20 Mar 2024 17:50:23 +0000 Subject: [PATCH 36/66] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 781eef4..dc8b0ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,12 +146,12 @@ jobs: tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.12) + - name: Download target directories (2.13.13) uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-2.13.12-${{ matrix.java }} + name: target-${{ matrix.os }}-2.13.13-${{ matrix.java }} - - name: Inflate target directories (2.13.12) + - name: Inflate target directories (2.13.13) run: | tar xf targets.tar rm targets.tar From b6780111a0051fdc2ec79bcf862e3810aa3a5170 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 30 Mar 2024 19:34:05 +0000 Subject: [PATCH 37/66] Update scalafmt-core to 3.8.1 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 8199be2..ba1990a 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.8.0 +version = 3.8.1 runner.dialect = scala213 preset = default align.preset = more From 1fb5780b2af9ad8afa26deebd50a7de1b70f1ceb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 24 Mar 2024 16:25:37 +0000 Subject: [PATCH 38/66] Update scala-library to 2.12.19 --- .github/workflows/ci.yml | 2 +- build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc8b0ac..b2fcdd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - scala: [2.12.18, 2.13.13, 3.3.3] + scala: [2.12.19, 2.13.13, 3.3.3] java: [temurin@8, temurin@11, temurin@17, temurin@21] runs-on: ${{ matrix.os }} steps: diff --git a/build.sbt b/build.sbt index f24e2df..f3471cc 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import com.jsuereth.sbtpgp.PgpKeys.publishSigned name := "pekko-streams-circe" val scala213Version = "2.13.13" -val scala212Version = "2.12.18" +val scala212Version = "2.12.19" val scala3Version = "3.3.3" val circeVersion = "0.14.6" From 931d3df21c24c8b89ba0e43c55b80ae2b151fd02 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 24 Mar 2024 16:26:25 +0000 Subject: [PATCH 39/66] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2fcdd2..45fc1fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,12 +136,12 @@ jobs: java-version: 21 cache: sbt - - name: Download target directories (2.12.18) + - name: Download target directories (2.12.19) uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }} + name: target-${{ matrix.os }}-2.12.19-${{ matrix.java }} - - name: Inflate target directories (2.12.18) + - name: Inflate target directories (2.12.19) run: | tar xf targets.tar rm targets.tar From 2a57287f4c34f79a5c766b9068497db828d1cae9 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Fri, 5 Apr 2024 17:49:46 +0200 Subject: [PATCH 40/66] Pin to Scala 3.3.x --- .scala-steward.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.scala-steward.conf b/.scala-steward.conf index 1808933..ef6e721 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -1 +1,5 @@ updatePullRequests = "always" + +updates.pin = [ + { groupId = "org.scala-lang", artifactId = "scala3-library", version = "3.3." } +] From adc3fb4726daec76203dc129d2e6dca54b2469f6 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Wed, 8 May 2024 10:27:07 +0200 Subject: [PATCH 41/66] Use macos-12 instead of macos-latest --- .github/workflows/ci.yml | 2 +- build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45fc1fd..1ff50f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: name: Build and Test strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-12] scala: [2.12.19, 2.13.13, 3.3.3] java: [temurin@8, temurin@11, temurin@17, temurin@21] runs-on: ${{ matrix.os }} diff --git a/build.sbt b/build.sbt index f3471cc..9b4912a 100644 --- a/build.sbt +++ b/build.sbt @@ -198,7 +198,7 @@ ThisBuild / githubWorkflowPublishTargetBranches := RefPredicate.Equals(Ref.Branch("main")) ) -ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest") +ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-12") ThisBuild / githubWorkflowJavaVersions := List( JavaSpec.temurin("8"), From a33e559b6c3041546d48fd6edec0cf2c8df2dffa Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 13 May 2024 16:39:43 +0000 Subject: [PATCH 42/66] Update sbt to 1.10.0 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 04267b1..081fdbb 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.9 +sbt.version=1.10.0 From 8675b7f9058e179f19a790e191697ba5ab89c297 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 13 May 2024 16:40:43 +0000 Subject: [PATCH 43/66] Update sbt-scoverage to 2.0.12 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index d43efc5..1481e8a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10. addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0") From 7efc5b122d4387a15e4d162ad4345195c59bd2b2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 13 May 2024 16:38:33 +0000 Subject: [PATCH 44/66] Update circe-generic, circe-jawn to 0.14.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9b4912a..ab08400 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ val scala213Version = "2.13.13" val scala212Version = "2.12.19" val scala3Version = "3.3.3" -val circeVersion = "0.14.6" +val circeVersion = "0.14.7" val pekkoVersion = "1.0.2" val pekkoHttpVersion = "1.0.1" val jawnVersion = "1.5.1" From a6c07e0c21efd53021fe25fe87c5d7f05cc687fb Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Fri, 17 May 2024 16:10:18 +0200 Subject: [PATCH 45/66] Add macos-latest to workflow --- .github/workflows/ci.yml | 9 ++++++++- build.sbt | 16 +++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ff50f5..3be244e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,12 @@ jobs: name: Build and Test strategy: matrix: - os: [ubuntu-latest, macos-12] + os: [ubuntu-latest, macos-12, macos-latest] scala: [2.12.19, 2.13.13, 3.3.3] java: [temurin@8, temurin@11, temurin@17, temurin@21] + exclude: + - java: temurin@8 + os: macos-latest runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -64,6 +67,10 @@ jobs: java-version: 21 cache: sbt + - name: Install sbt + if: matrix.os == 'macos-latest' + run: brew install sbt + - name: Check that workflows are up to date run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck diff --git a/build.sbt b/build.sbt index ab08400..262e36e 100644 --- a/build.sbt +++ b/build.sbt @@ -198,7 +198,7 @@ ThisBuild / githubWorkflowPublishTargetBranches := RefPredicate.Equals(Ref.Branch("main")) ) -ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-12") +ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-12", "macos-latest") ThisBuild / githubWorkflowJavaVersions := List( JavaSpec.temurin("8"), @@ -206,3 +206,17 @@ ThisBuild / githubWorkflowJavaVersions := List( JavaSpec.temurin("17"), JavaSpec.temurin("21") ) + +ThisBuild / githubWorkflowBuildMatrixExclusions += + MatrixExclude(Map("java" -> "temurin@8", "os" -> "macos-latest")) + +// GitHub Actions macOS 13+ runner images do not come with sbt preinstalled anymore +ThisBuild / githubWorkflowBuildPreamble ++= Seq( + WorkflowStep.Run( + commands = List( + "brew install sbt" + ), + cond = Some("matrix.os == 'macos-latest'"), + name = Some("Install sbt") + ) +) From 8b3954a0f7658fad52ce9133ca14ad1a81242b64 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 17 May 2024 16:40:35 +0000 Subject: [PATCH 46/66] Update scala-library to 2.13.14 --- .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 3be244e..078d41d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-12, macos-latest] - scala: [2.12.19, 2.13.13, 3.3.3] + scala: [2.12.19, 2.13.14, 3.3.3] java: [temurin@8, temurin@11, temurin@17, temurin@21] exclude: - java: temurin@8 @@ -102,7 +102,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.13] + scala: [2.13.14] java: [temurin@8] runs-on: ${{ matrix.os }} steps: diff --git a/build.sbt b/build.sbt index 262e36e..cc09545 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import com.jsuereth.sbtpgp.PgpKeys.publishSigned name := "pekko-streams-circe" -val scala213Version = "2.13.13" +val scala213Version = "2.13.14" val scala212Version = "2.12.19" val scala3Version = "3.3.3" From 22abeab87666af9cc64553e9c73f3fcf1dce523d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 17 May 2024 16:41:22 +0000 Subject: [PATCH 47/66] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 078d41d..b6bf4ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,12 +153,12 @@ jobs: tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.13) + - name: Download target directories (2.13.14) uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-2.13.13-${{ matrix.java }} + name: target-${{ matrix.os }}-2.13.14-${{ matrix.java }} - - name: Inflate target directories (2.13.13) + - name: Inflate target directories (2.13.14) run: | tar xf targets.tar rm targets.tar From f24ac18ea45adc3cb8c2b5768528c4979c90a10c Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 6 Sep 2024 15:54:24 +0000 Subject: [PATCH 48/66] Update sbt-scoverage to 2.2.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 1481e8a..76a7cbf 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10. addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0") From 6bf90d9131d39a3ed6fef1b29f6603b1fb612ccf Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 21 Aug 2024 17:27:03 +0000 Subject: [PATCH 49/66] Update sbt-sonatype to 3.11.3 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 76a7cbf..f708af1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.3") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") From 74732696989a49062752218092132a5ee137a462 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 31 May 2024 18:17:36 +0000 Subject: [PATCH 50/66] Update jawn-parser to 1.6.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index cc09545..69867e2 100644 --- a/build.sbt +++ b/build.sbt @@ -9,7 +9,7 @@ val scala3Version = "3.3.3" val circeVersion = "0.14.7" val pekkoVersion = "1.0.2" val pekkoHttpVersion = "1.0.1" -val jawnVersion = "1.5.1" +val jawnVersion = "1.6.0" val scalaTestVersion = "3.2.18" ThisBuild / crossScalaVersions := Seq(scala212Version, scala213Version, scala3Version) From 591c2c405a5bae2677be163ea3bfd4ebf2ede3c3 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 14 Jul 2024 16:44:17 +0000 Subject: [PATCH 51/66] Update sbt to 1.10.1 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 081fdbb..ee4c672 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.0 +sbt.version=1.10.1 From e3cc16984f220b03b80d3b0ff0c985d8427247d6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 24 Jun 2024 18:55:55 +0000 Subject: [PATCH 52/66] Update pekko-stream to 1.0.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 69867e2..8a6101c 100644 --- a/build.sbt +++ b/build.sbt @@ -7,7 +7,7 @@ val scala212Version = "2.12.19" val scala3Version = "3.3.3" val circeVersion = "0.14.7" -val pekkoVersion = "1.0.2" +val pekkoVersion = "1.0.3" val pekkoHttpVersion = "1.0.1" val jawnVersion = "1.6.0" val scalaTestVersion = "3.2.18" From 1da8b7624e8fffccb58a036508ed08e666fbc952 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 24 Jun 2024 18:54:40 +0000 Subject: [PATCH 53/66] Update sbt-github-actions to 0.24.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index f708af1..228d52a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2 addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") -addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") From edfe4d74895b8137228dd54b0c369a8f7e86b8dd Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 24 Jun 2024 18:55:33 +0000 Subject: [PATCH 54/66] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6bf4ef..6e270e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,9 @@ jobs: java-version: 21 cache: sbt + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Install sbt if: matrix.os == 'macos-latest' run: brew install sbt @@ -143,6 +146,9 @@ jobs: java-version: 21 cache: sbt + - name: Setup sbt + uses: sbt/setup-sbt@v1 + - name: Download target directories (2.12.19) uses: actions/download-artifact@v4 with: From 7d27c0978930f200a8e4abab18282a289252c090 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 29 Jul 2024 19:04:30 +0000 Subject: [PATCH 55/66] Update scalafmt-core to 3.8.3 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index ba1990a..83580ee 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.8.1 +version = 3.8.3 runner.dialect = scala213 preset = default align.preset = more From fc50953b52c747d5a1fae71e5a14bc6f4f9c2880 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 21 Aug 2024 17:26:50 +0000 Subject: [PATCH 56/66] Update sbt-ci-release to 1.6.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 228d52a..d5da075 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.3") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") From b5e04448e9b19f5265a6760dac1836d131577503 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:02:55 +0200 Subject: [PATCH 57/66] Update scala-library to 2.12.20 --- .github/workflows/ci.yml | 8 ++++---- build.sbt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e270e8..1f07698 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-12, macos-latest] - scala: [2.12.19, 2.13.14, 3.3.3] + scala: [2.12.20, 2.13.14, 3.3.3] java: [temurin@8, temurin@11, temurin@17, temurin@21] exclude: - java: temurin@8 @@ -149,12 +149,12 @@ jobs: - name: Setup sbt uses: sbt/setup-sbt@v1 - - name: Download target directories (2.12.19) + - name: Download target directories (2.12.20) uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-2.12.19-${{ matrix.java }} + name: target-${{ matrix.os }}-2.12.20-${{ matrix.java }} - - name: Inflate target directories (2.12.19) + - name: Inflate target directories (2.12.20) run: | tar xf targets.tar rm targets.tar diff --git a/build.sbt b/build.sbt index 8a6101c..6ffac65 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import com.jsuereth.sbtpgp.PgpKeys.publishSigned name := "pekko-streams-circe" val scala213Version = "2.13.14" -val scala212Version = "2.12.19" +val scala212Version = "2.12.20" val scala3Version = "3.3.3" val circeVersion = "0.14.7" From 1e058dee639cb870dd48b0a4e95a73b6f6f0e9db Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:03:17 +0200 Subject: [PATCH 58/66] Update scalatest to 3.2.19 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6ffac65..105e1ab 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ val circeVersion = "0.14.7" val pekkoVersion = "1.0.3" val pekkoHttpVersion = "1.0.1" val jawnVersion = "1.6.0" -val scalaTestVersion = "3.2.18" +val scalaTestVersion = "3.2.19" ThisBuild / crossScalaVersions := Seq(scala212Version, scala213Version, scala3Version) ThisBuild / scalaVersion := scala213Version From d83b98a409c3dfa54fae9823d0cc39ec89b4434f Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:03:32 +0200 Subject: [PATCH 59/66] Update sbt-coveralls to 1.3.13 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index d5da075..68eb508 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,6 +4,6 @@ addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2 addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0") -addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") +addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.13") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") From 2030f74842122091bfff93e49286ce6416e4a7c4 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:03:57 +0200 Subject: [PATCH 60/66] Update circe-generic, circe-jawn to 0.14.10 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 105e1ab..e0943a0 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ val scala213Version = "2.13.14" val scala212Version = "2.12.20" val scala3Version = "3.3.3" -val circeVersion = "0.14.7" +val circeVersion = "0.14.10" val pekkoVersion = "1.0.3" val pekkoHttpVersion = "1.0.1" val jawnVersion = "1.6.0" From 3c19fcfaa7877b01e09beb0573a0001dbbb69387 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Thu, 12 Sep 2024 11:18:39 +0200 Subject: [PATCH 61/66] Fix .head causing JsonSupport sink to terminate --- .../mdedetrich/pekko/http/JsonSupport.scala | 65 ++++++++++++++++++- .../pekko/http/JsonSupportSpec.scala | 2 +- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/http-json/src/main/scala/org/mdedetrich/pekko/http/JsonSupport.scala b/http-json/src/main/scala/org/mdedetrich/pekko/http/JsonSupport.scala index d36a729..b0fc4eb 100644 --- a/http-json/src/main/scala/org/mdedetrich/pekko/http/JsonSupport.scala +++ b/http-json/src/main/scala/org/mdedetrich/pekko/http/JsonSupport.scala @@ -22,21 +22,80 @@ import pekko.http.scaladsl.model.HttpEntity import pekko.http.scaladsl.model.MediaTypes.`application/json` import pekko.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller} import pekko.http.scaladsl.util.FastFuture +import pekko.stream._ +import pekko.stream.scaladsl.Sink +import pekko.stream.stage._ import org.mdedetrich.pekko.json.stream.JsonStreamParser import org.typelevel.jawn.Facade +import scala.concurrent.{Future, Promise} + trait JsonSupport { - implicit def jsonUnmarshaller[J: Facade]: FromEntityUnmarshaller[J] = + implicit def jsonUnmarshaller[J <: AnyRef: Facade]: FromEntityUnmarshaller[J] = Unmarshaller .withMaterializer[HttpEntity, J](_ => implicit mat => { case HttpEntity.Strict(_, data) => FastFuture(JsonStreamParser.parse[J](data)) - case entity => entity.dataBytes.runWith(JsonStreamParser.head[J]) + case entity => entity.dataBytes.via(JsonStreamParser[J]).runWith(JsonSupport.firstElementSink[J]) } ) .forContentTypes(`application/json`) } -object JsonSupport extends JsonSupport +object JsonSupport extends JsonSupport { + private def firstElementSink[J <: AnyRef]: Sink[J, Future[J]] = + Sink.fromGraph(new FirstElementSinkStage[J]) + + private final class FirstElementSinkStage[J <: AnyRef] + extends GraphStageWithMaterializedValue[SinkShape[J], Future[J]] { + private[this] val in: Inlet[J] = Inlet("firstElement.in") + + override val shape: SinkShape[J] = SinkShape.of(in) + override protected def initialAttributes: Attributes = Attributes.name("firstElement") + + override def createLogicAndMaterializedValue(inheritedAttributes: Attributes): (GraphStageLogic, Future[J]) = { + val p: Promise[J] = Promise() + (new GraphStageLogic(shape) with InHandler { + private[this] var element: J = null.asInstanceOf[J] + + override def preStart(): Unit = pull(in) + + def onPush(): Unit = { + if (element eq null) + element = grab(in) + pull(in) + } + + override def onUpstreamFinish(): Unit = { + val el = element + element = null.asInstanceOf[J] + if (el ne null) + p.trySuccess(el) + else + p.tryFailure(new NoSuchElementException("No complete json entity consumed")) + completeStage() + } + + override def onUpstreamFailure(ex: Throwable): Unit = { + element = null.asInstanceOf[J] + p.tryFailure(ex) + failStage(ex) + } + + override def postStop(): Unit = + if (!p.isCompleted) { + p.failure(new AbruptStageTerminationException(this)) + () + } + + setHandler(in, this) + }, + p.future + ) + } + + override def toString: String = "FirstElementSinkStage" + } +} diff --git a/tests/src/test/scala/org/mdedetrich/pekko/http/JsonSupportSpec.scala b/tests/src/test/scala/org/mdedetrich/pekko/http/JsonSupportSpec.scala index bbdb783..84ec67b 100644 --- a/tests/src/test/scala/org/mdedetrich/pekko/http/JsonSupportSpec.scala +++ b/tests/src/test/scala/org/mdedetrich/pekko/http/JsonSupportSpec.scala @@ -249,7 +249,7 @@ class JsonSupportSpec ) futureException.map { - _.getMessage shouldBe "head of empty stream" + _.getMessage shouldBe "No complete json entity consumed" } } From 1e94eaa00de454c8ebaeb29f630fb9e81297cc12 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Thu, 12 Sep 2024 12:18:34 +0200 Subject: [PATCH 62/66] Add sbt-version-policy --- .github/workflows/ci.yml | 4 ++-- build.sbt | 11 ++++++----- project/plugins.sbt | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f07698..b62427b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,8 +77,8 @@ jobs: - name: Check that workflows are up to date run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck - - name: Report binary compatibility issues - run: sbt '++ ${{ matrix.scala }}' mimaReportBinaryIssues + - name: Report version policy issues + run: sbt '++ ${{ matrix.scala }}' versionPolicyCheck - name: Build project run: sbt '++ ${{ matrix.scala }}' clean coverage test diff --git a/build.sbt b/build.sbt index e0943a0..676d763 100644 --- a/build.sbt +++ b/build.sbt @@ -12,10 +12,11 @@ val pekkoHttpVersion = "1.0.1" val jawnVersion = "1.6.0" val scalaTestVersion = "3.2.19" -ThisBuild / crossScalaVersions := Seq(scala212Version, scala213Version, scala3Version) -ThisBuild / scalaVersion := scala213Version -ThisBuild / organization := "org.mdedetrich" -ThisBuild / versionScheme := Some(VersionScheme.EarlySemVer) +ThisBuild / crossScalaVersions := Seq(scala212Version, scala213Version, scala3Version) +ThisBuild / scalaVersion := scala213Version +ThisBuild / organization := "org.mdedetrich" +ThisBuild / versionScheme := Some(VersionScheme.EarlySemVer) +ThisBuild / versionPolicyIntention := Compatibility.BinaryCompatible lazy val streamJson = project .in(file("stream-json")) @@ -158,7 +159,7 @@ ThisBuild / scalacOptions ++= { ThisBuild / githubWorkflowTargetBranches := Seq("main") // Once we have branches per version, add the pattern here ThisBuild / githubWorkflowBuild := Seq( - WorkflowStep.Sbt(List("mimaReportBinaryIssues"), name = Some("Report binary compatibility issues")), + WorkflowStep.Sbt(List("versionPolicyCheck"), name = Some("Report version policy issues")), WorkflowStep.Sbt(List("clean", "coverage", "test"), name = Some("Build project")) ) diff --git a/project/plugins.sbt b/project/plugins.sbt index 68eb508..fb4e550 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,3 +7,4 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0 addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.13") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") +addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1") From 461826cb0df818abcd5e614a73bd1212cab9a8c1 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 12 Sep 2024 17:26:30 +0000 Subject: [PATCH 63/66] Update sbt-mima-plugin to 1.1.4 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index fb4e550..cb56030 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,6 +5,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1 addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.13") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1") From c42610e849891799f36e670a439ae1e04bdcd8b2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 16 Sep 2024 16:27:08 +0000 Subject: [PATCH 64/66] Update sbt to 1.10.2 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index ee4c672..0b699c3 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 From 62e051868ea0b9dd1dc21d88aacf8d6b9ae40830 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 26 Sep 2024 16:32:49 +0000 Subject: [PATCH 65/66] Update scala-library to 2.13.15 --- .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 b62427b..bf4a06f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-12, macos-latest] - scala: [2.12.20, 2.13.14, 3.3.3] + scala: [2.12.20, 2.13.15, 3.3.3] java: [temurin@8, temurin@11, temurin@17, temurin@21] exclude: - java: temurin@8 @@ -105,7 +105,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.14] + scala: [2.13.15] java: [temurin@8] runs-on: ${{ matrix.os }} steps: diff --git a/build.sbt b/build.sbt index 676d763..52c18ab 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import com.jsuereth.sbtpgp.PgpKeys.publishSigned name := "pekko-streams-circe" -val scala213Version = "2.13.14" +val scala213Version = "2.13.15" val scala212Version = "2.12.20" val scala3Version = "3.3.3" From 144250758f21ef92542e3fb2eb567767fcc5bd31 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 26 Sep 2024 16:33:22 +0000 Subject: [PATCH 66/66] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf4a06f..b75251e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,12 +159,12 @@ jobs: tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.14) + - name: Download target directories (2.13.15) uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-2.13.14-${{ matrix.java }} + name: target-${{ matrix.os }}-2.13.15-${{ matrix.java }} - - name: Inflate target directories (2.13.14) + - name: Inflate target directories (2.13.15) run: | tar xf targets.tar rm targets.tar