From 44ff828bca20ee2be78b6b38a45a831e925c1bfa Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 08:10:36 +0000 Subject: [PATCH 01/13] Update sbt-scalajs, scalajs-compiler, ... to 1.13.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8f9c034..994b87a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.21") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.12") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.1") From c6d4bc7269d7ec8458a9c03dbb3e82af7f45b921 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 00:24:33 +0000 Subject: [PATCH 02/13] Update sbt-scala-native-crossproject to 1.3.2 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8f9c034..4a22c6a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.21") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.12") -addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.1") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") From 76e1ff8e5e12e35558b6d390f19f7427bb7e0444 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 08:12:18 +0000 Subject: [PATCH 03/13] Update cats-core to 2.10.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 271e7be..c5ac41e 100644 --- a/build.sbt +++ b/build.sbt @@ -16,7 +16,7 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform) .settings( libraryDependencies ++= List( "org.scalacheck" %%% "scalacheck" % "1.17.0", - "org.typelevel" %%% "cats-core" % "2.9.0" + "org.typelevel" %%% "cats-core" % "2.10.0" ) ) From 5ac80be38d6f394e337984267c96cd15dec22789 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 20:15:01 +0000 Subject: [PATCH 04/13] Update scalafmt-core to 3.7.17 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index f807c25..1ff9751 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.3" +version = "3.7.17" runner.dialect = Scala213Source3 From 686dc4de1b1a2773835de4a978ea8ff245d3f8cf Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 00:21:03 +0000 Subject: [PATCH 05/13] Update sbt-scalajs to 1.15.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8f9c034..61451c0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.21") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.12") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.1") From 11db4757699e6ff0f6007c74278358982f273e1d Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:11:32 +0000 Subject: [PATCH 06/13] Update nscplugin, sbt-scala-native, ... to 0.4.17 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8f9c034..e1e86c1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.21") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.12") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.1") From c20cf11316e65f0c70517a3b79fac671cdc645b2 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 08:21:26 +0000 Subject: [PATCH 07/13] 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 52413ab..04267b1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.3 +sbt.version=1.9.9 From 60687abb004055979a00b2cb163cf9a1f6a6236f Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:16:45 +0000 Subject: [PATCH 08/13] Update sbt-typelevel to 0.6.7 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 8f9c034..cd89ca9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1") -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.21") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.6.7") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.12") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.1") From 540272eaf4cf13bd7a64f035364dcc1fd0351dae Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:17:09 +0000 Subject: [PATCH 09/13] Run prePR with sbt-typelevel Executed command: sbt tlPrePrBotHook --- .github/workflows/ci.yml | 200 +++++++++++++++++++++------------------ 1 file changed, 107 insertions(+), 93 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf8266b..4cfde04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,56 +15,42 @@ 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: [3.2.2, 2.12.17, 2.13.10] + scala: [3, 2.12, 2.13] java: [temurin@8] project: [rootJS, rootJVM, rootNative] 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 - with: - distribution: temurin - java-version: 8 - - name: Setup Java (temurin@8) + id: setup-java-temurin-8 if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: - distribution: jdkfile + distribution: temurin java-version: 8 - jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} + 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@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + run: sbt +update - name: Check that workflows are up to date run: sbt githubWorkflowCheck @@ -94,15 +80,15 @@ 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 target .js/target munit/jvm/target core/native/target core/js/target munit/native/target core/jvm/target .jvm/target .native/target munit/js/target project/target + run: mkdir -p munit/jvm/target core/native/target core/js/target munit/native/target core/jvm/target munit/js/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 target .js/target munit/jvm/target core/native/target core/js/target munit/native/target core/jvm/target .jvm/target .native/target munit/js/target project/target + run: tar cf targets.tar munit/jvm/target core/native/target core/js/target munit/native/target core/jvm/target munit/js/target project/target - 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@v3 + uses: actions/upload-artifact@v4 with: name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }} path: targets.tar @@ -118,138 +104,166 @@ jobs: 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 - with: - distribution: temurin - java-version: 8 - - name: Setup Java (temurin@8) + id: setup-java-temurin-8 if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: - distribution: jdkfile + distribution: temurin java-version: 8 - jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} + 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@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + run: sbt +update - - name: Download target directories (3.2.2, rootJS) - uses: actions/download-artifact@v3 + - name: Download target directories (3, rootJS) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS - - name: Inflate target directories (3.2.2, rootJS) + - name: Inflate target directories (3, rootJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.2.2, rootJVM) - uses: actions/download-artifact@v3 + - name: Download target directories (3, rootJVM) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM - - name: Inflate target directories (3.2.2, rootJVM) + - name: Inflate target directories (3, rootJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.2.2, rootNative) - uses: actions/download-artifact@v3 + - name: Download target directories (3, rootNative) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative - - name: Inflate target directories (3.2.2, rootNative) + - name: Inflate target directories (3, rootNative) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.17, rootJS) - uses: actions/download-artifact@v3 + - name: Download target directories (2.12, rootJS) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS - - name: Inflate target directories (2.12.17, rootJS) + - name: Inflate target directories (2.12, rootJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.17, rootJVM) - uses: actions/download-artifact@v3 + - name: Download target directories (2.12, rootJVM) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM - - name: Inflate target directories (2.12.17, rootJVM) + - name: Inflate target directories (2.12, rootJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.17, rootNative) - uses: actions/download-artifact@v3 + - name: Download target directories (2.12, rootNative) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative - - name: Inflate target directories (2.12.17, rootNative) + - name: Inflate target directories (2.12, rootNative) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.10, rootJS) - uses: actions/download-artifact@v3 + - name: Download target directories (2.13, rootJS) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS - - name: Inflate target directories (2.13.10, rootJS) + - name: Inflate target directories (2.13, rootJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.10, rootJVM) - uses: actions/download-artifact@v3 + - name: Download target directories (2.13, rootJVM) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM - - name: Inflate target directories (2.13.10, rootJVM) + - name: Inflate target directories (2.13, rootJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.10, rootNative) - uses: actions/download-artifact@v3 + - name: Download target directories (2.13, rootNative) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative - - name: Inflate target directories (2.13.10, rootNative) + - name: Inflate target directories (2.13, rootNative) 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 + 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@8] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Java (temurin@8) + id: setup-java-temurin-8 + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 8 + cache: sbt + + - name: sbt update + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + run: sbt +update + + - name: Submit Dependencies + uses: scalacenter/sbt-dependency-submission@v2 + with: + modules-ignore: rootjs_3 rootjs_2.12 rootjs_2.13 rootjvm_3 rootjvm_2.12 rootjvm_2.13 rootnative_3 rootnative_2.12 rootnative_2.13 + configs-ignore: test scala-tool scala-doc-tool test-internal From 339d7ba6e3f2ef60c25de053c352632aecb14177 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 20:26:05 +0000 Subject: [PATCH 10/13] Update scala3-library, ... to 3.3.3 --- .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 cf8266b..2620d44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [3.2.2, 2.12.17, 2.13.10] + scala: [3.3.3, 2.12.17, 2.13.10] java: [temurin@8] project: [rootJS, rootJVM, rootNative] runs-on: ${{ matrix.os }} diff --git a/build.sbt b/build.sbt index 271e7be..c766b49 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ ThisBuild / tlBaseVersion := "2.0" ThisBuild / developers += tlGitHubDev("mpilquist", "Michael Pilquist") ThisBuild / startYear := Some(2021) -ThisBuild / crossScalaVersions := List("3.2.2", "2.12.17", "2.13.10") +ThisBuild / crossScalaVersions := List("3.3.3", "2.12.17", "2.13.10") ThisBuild / tlVersionIntroduced := Map("3" -> "1.0.2") lazy val root = tlCrossRootProject.aggregate(core, munit) From 478ad0ad85ec6ca3bf3082fc7648f1d83a007006 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 20:26:20 +0000 Subject: [PATCH 11/13] Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2620d44..9682eb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,32 +150,32 @@ jobs: ~/Library/Caches/Coursier/v1 key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Download target directories (3.2.2, rootJS) + - name: Download target directories (3.3.3, rootJS) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.3-rootJS - - name: Inflate target directories (3.2.2, rootJS) + - name: Inflate target directories (3.3.3, rootJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.2.2, rootJVM) + - name: Download target directories (3.3.3, rootJVM) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.3-rootJVM - - name: Inflate target directories (3.2.2, rootJVM) + - name: Inflate target directories (3.3.3, rootJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.2.2, rootNative) + - name: Download target directories (3.3.3, rootNative) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.3-rootNative - - name: Inflate target directories (3.2.2, rootNative) + - name: Inflate target directories (3.3.3, rootNative) run: | tar xf targets.tar rm targets.tar From 4d27e1ef033dcb8d2d79a815164fbc056c8e3a0b Mon Sep 17 00:00:00 2001 From: Tim Spence Date: Fri, 1 Mar 2024 16:08:03 +0000 Subject: [PATCH 12/13] Fix a bug where we don't slide the seed properly for multi-arg forAllF What previously happened was that if you had ``` PropF.forAllF { (x, y) => ??? } ``` then the generated x would always be equal to the generated y from the previous iteration --- .../scala/org/scalacheck/effect/PropF.scala | 2 +- .../munit/ScalaCheckEffectSuiteSuite.scala | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 munit/shared/src/test/scala/munit/ScalaCheckEffectSuiteSuite.scala diff --git a/core/shared/src/main/scala/org/scalacheck/effect/PropF.scala b/core/shared/src/main/scala/org/scalacheck/effect/PropF.scala index b894672..e6a01c3 100644 --- a/core/shared/src/main/scala/org/scalacheck/effect/PropF.scala +++ b/core/shared/src/main/scala/org/scalacheck/effect/PropF.scala @@ -66,7 +66,7 @@ sealed trait PropF[F[_]] { next.checkOne(Prop.slideSeed(params)) } case PropF.Parameterized(next) => - next(params).checkOne(Prop.slideSeed(params)) + next(Prop.slideSeed(params)).checkOne(Prop.slideSeed(params)) } } diff --git a/munit/shared/src/test/scala/munit/ScalaCheckEffectSuiteSuite.scala b/munit/shared/src/test/scala/munit/ScalaCheckEffectSuiteSuite.scala new file mode 100644 index 0000000..caf9409 --- /dev/null +++ b/munit/shared/src/test/scala/munit/ScalaCheckEffectSuiteSuite.scala @@ -0,0 +1,38 @@ +package munit + +import cats.effect.IO +import cats.effect.unsafe.implicits.global +import org.scalacheck.effect.PropF +import org.scalacheck.Shrink + +// Who tests the tests? +class ScalaCheckEffectSuiteSuite extends ScalaCheckEffectSuite { + + implicit def noShrink[T]: Shrink[T] = Shrink.shrinkAny[T] + + override def munitValueTransforms: List[ValueTransform] = + super.munitValueTransforms ++ List(munitIOTransform) + + // From https://github.com/scalameta/munit/pull/134 + private val munitIOTransform: ValueTransform = + new ValueTransform("IO", { case e: IO[_] => e.unsafeToFuture() }) + + test("Correctly slides seed for multi-arg PropF") { + var last: Option[Int] = None + var duplicates = 0 + + PropF.forAllF { (x: Int, y: Int) => + if (Some(x) == last) { + duplicates = duplicates + 1 + } + last = Some(y) + + // This is a bit of a heuristic as the generator may genuinely produce identical consecutive values + // The bug was that it wasn't sliding so the first generated value was _always_ equal to the second + // generated value from the previous iteration + IO { assert(clue(duplicates) < 10) } + } + + } + +} From 4f1b896db3f70e44241fba2e6de7327dd1d519a4 Mon Sep 17 00:00:00 2001 From: Tim Spence Date: Fri, 1 Mar 2024 16:11:36 +0000 Subject: [PATCH 13/13] Add header --- .../scala/munit/ScalaCheckEffectSuiteSuite.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/munit/shared/src/test/scala/munit/ScalaCheckEffectSuiteSuite.scala b/munit/shared/src/test/scala/munit/ScalaCheckEffectSuiteSuite.scala index caf9409..7a82d72 100644 --- a/munit/shared/src/test/scala/munit/ScalaCheckEffectSuiteSuite.scala +++ b/munit/shared/src/test/scala/munit/ScalaCheckEffectSuiteSuite.scala @@ -1,3 +1,19 @@ +/* + * Copyright 2021 Typelevel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package munit import cats.effect.IO