From 474147aea1c13093c9a30dcc4cdf43fd911e8316 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 07:13:12 -0400 Subject: [PATCH 01/20] Update scalafmt-core to 3.7.10 (#518) Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 999f89e8..a3c1c9e7 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.8" +version = "3.7.10" runner.dialect = scala213 From df15b6354c9a31df9c071c6ad3e7928dc056a997 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 07:13:34 -0400 Subject: [PATCH 02/20] Update sbt to 1.9.3 (#520) Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 875b706a..52413ab7 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.2 +sbt.version=1.9.3 From 08060c714bb3e24352ce80652718493af670b99e Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 28 Jul 2023 15:46:27 +0100 Subject: [PATCH 03/20] Update scalafmt-core to 3.7.11 (#521) Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index a3c1c9e7..dfc8f59e 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.10" +version = "3.7.11" runner.dialect = scala213 From 5c7296bf92ac5b39eea9955a91f14a3894b17755 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:17:43 -0400 Subject: [PATCH 04/20] Update scalafmt-core to 3.7.12 (#522) Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index dfc8f59e..b134dd04 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.11" +version = "3.7.12" runner.dialect = scala213 From 149faebfc2fbc09e0e62ea11c70efa68d5101cff Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 9 Aug 2023 13:27:00 -0700 Subject: [PATCH 05/20] Update to sbt-typelevel 0.5.0 (#524) --- .github/workflows/ci.yml | 208 +++++++----------- build.sbt | 51 +++-- .../test/scala/cats/parse/ErrorShowTest.scala | 4 +- .../test/scala/cats/parse/ParserTest.scala | 2 +- project/plugins.sbt | 4 +- 5 files changed, 117 insertions(+), 152 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06f34f62..5c35ba9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,61 +15,47 @@ 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.3.0, 2.11.12, 2.12.18, 2.13.11] + scala: [2.11, 2.12, 2.13, 3] java: [temurin@8] project: [rootJS, rootJVM, rootNative] exclude: - project: rootJS - scala: 2.11.12 + scala: 2.11 - project: rootNative - scala: 2.11.12 + scala: 2.11 runs-on: ${{ matrix.os }} + timeout-minutes: 60 steps: - name: Checkout current branch (full) uses: actions/checkout@v3 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 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 @@ -99,11 +85,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 target .js/target core/native/target site/target core/js/target core/jvm/target .jvm/target .native/target project/target + run: mkdir -p core/native/target core/js/target core/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 target .js/target core/native/target site/target core/js/target core/jvm/target .jvm/target .native/target project/target + run: tar cf targets.tar core/native/target core/js/target core/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') @@ -127,146 +113,141 @@ jobs: 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 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: Download target directories (3.3.0, rootJS) + - name: sbt update + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + run: sbt +update + + - name: Download target directories (2.11, rootJVM) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.0-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-2.11-rootJVM - - name: Inflate target directories (3.3.0, rootJS) + - name: Inflate target directories (2.11, rootJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.3.0, rootJVM) + - name: Download target directories (2.12, rootJS) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.0-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS - - name: Inflate target directories (3.3.0, rootJVM) + - name: Inflate target directories (2.12, rootJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (3.3.0, rootNative) + - name: Download target directories (2.12, rootJVM) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.0-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM - - name: Inflate target directories (3.3.0, rootNative) + - name: Inflate target directories (2.12, rootJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.11.12, rootJVM) + - name: Download target directories (2.12, rootNative) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.11.12-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative - - name: Inflate target directories (2.11.12, rootJVM) + - name: Inflate target directories (2.12, rootNative) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.18, rootJS) + - name: Download target directories (2.13, rootJS) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS - - name: Inflate target directories (2.12.18, rootJS) + - name: Inflate target directories (2.13, rootJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.18, rootJVM) + - name: Download target directories (2.13, rootJVM) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM - - name: Inflate target directories (2.12.18, rootJVM) + - name: Inflate target directories (2.13, rootJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.12.18, rootNative) + - name: Download target directories (2.13, rootNative) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.18-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative - - name: Inflate target directories (2.12.18, rootNative) + - name: Inflate target directories (2.13, rootNative) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.11, rootJS) + - name: Download target directories (3, rootJS) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11-rootJS + name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS - - name: Inflate target directories (2.13.11, rootJS) + - name: Inflate target directories (3, rootJS) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.11, rootJVM) + - name: Download target directories (3, rootJVM) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11-rootJVM + name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM - - name: Inflate target directories (2.13.11, rootJVM) + - name: Inflate target directories (3, rootJVM) run: | tar xf targets.tar rm targets.tar - - name: Download target directories (2.13.11, rootNative) + - name: Download target directories (3, rootNative) uses: actions/download-artifact@v3 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.11-rootNative + name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative - - name: Inflate target directories (2.13.11, rootNative) + - name: Inflate target directories (3, rootNative) run: | tar xf targets.tar rm targets.tar - name: Import signing key if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' + env: + PGP_SECRET: ${{ secrets.PGP_SECRET }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} run: echo $PGP_SECRET | base64 -di | 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_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 coverage: @@ -274,44 +255,28 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.11] java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (fast) uses: actions/checkout@v3 - - 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 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 - - run: sbt '++ ${{ matrix.scala }}' coverage rootJVM/test coverageAggregate + - run: sbt coverage rootJVM/test coverageAggregate - - run: 'bash <(curl -s https://codecov.io/bash)' + - uses: codecov/codecov-action@v3 site: name: Generate Site @@ -326,40 +291,25 @@ jobs: 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 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: Generate site run: sbt docs/tlSite - name: Publish site if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v3.9.0 + uses: peaceiris/actions-gh-pages@v3.9.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: site/target/docs/site diff --git a/build.sbt b/build.sbt index 19790199..a3f415ce 100644 --- a/build.sbt +++ b/build.sbt @@ -14,27 +14,35 @@ ThisBuild / tlBaseVersion := "0.3" ThisBuild / startYear := Some(2021) ThisBuild / developers += tlGitHubDev("johnynek", "P. Oscar Boykin") -ThisBuild / crossScalaVersions := List(scala3, scala211, scala212, scala213) +ThisBuild / crossScalaVersions := List(scala211, scala212, scala213, scala3) +ThisBuild / scalaVersion := scala213 ThisBuild / tlVersionIntroduced := Map("3" -> "0.3.4") -ThisBuild / tlSkipIrrelevantScalas := true +ThisBuild / tlCiDependencyGraphJob := false // omit after dropping scala 2.11 ThisBuild / githubWorkflowBuildMatrixExclusions ++= Seq( - MatrixExclude(Map("project" -> "rootJS", "scala" -> scala211)), - MatrixExclude(Map("project" -> "rootNative", "scala" -> scala211)) + MatrixExclude(Map("project" -> "rootJS", "scala" -> "2.11")), + MatrixExclude(Map("project" -> "rootNative", "scala" -> "2.11")) ) ThisBuild / githubWorkflowAddedJobs ++= Seq( WorkflowJob( id = "coverage", name = "Generate coverage report", - scalas = List(scala213), + scalas = Nil, + sbtStepPreamble = Nil, steps = List(WorkflowStep.Checkout) ++ WorkflowStep.SetupJava( githubWorkflowJavaVersions.value.toList ) ++ githubWorkflowGeneratedCacheSteps.value ++ List( WorkflowStep.Sbt(List("coverage", "rootJVM/test", "coverageAggregate")), - WorkflowStep.Run(List("bash <(curl -s https://codecov.io/bash)")) + WorkflowStep.Use( + UseRef.Public( + "codecov", + "codecov-action", + "v3" + ) + ) ) ) ) @@ -54,7 +62,6 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Full) .settings( name := "cats-parse", - tlFatalWarningsInCi := !tlIsScala3.value, libraryDependencies ++= { Seq( if (isScala211.value) cats211.value else cats.value, @@ -69,6 +76,10 @@ lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform) // this code seems to trigger a bug in 2.11 pattern analysis if (isScala211.value) List("-Xno-patmat-analysis") else Nil }, + tlFatalWarnings := { + if (isScala211.value) false + else tlFatalWarnings.value + }, mimaPreviousArtifacts := { if (isScala211.value) Set.empty else mimaPreviousArtifacts.value }, @@ -107,17 +118,21 @@ lazy val bench = project .settings( name := "bench", coverageEnabled := false, - crossScalaVersions := (ThisBuild / crossScalaVersions).value.filter { v => - v.startsWith("2.12") || v.startsWith("2.13") + Compile / unmanagedSources := { + if (Set("2.12", "2.13").contains(scalaBinaryVersion.value)) { + (Compile / unmanagedSources).value + } else Nil }, - libraryDependencies ++= - Seq( - fastParse, - parsley, - jawnAst.value, - parboiled, - attoCore - ), - githubWorkflowArtifactUpload := false + libraryDependencies ++= { + if (Set("2.12", "2.13").contains(scalaBinaryVersion.value)) + Seq( + fastParse, + parsley, + jawnAst.value, + parboiled, + attoCore + ) + else Nil + } ) .dependsOn(core.jvm) diff --git a/core/shared/src/test/scala/cats/parse/ErrorShowTest.scala b/core/shared/src/test/scala/cats/parse/ErrorShowTest.scala index dd4226d3..4a79ad49 100644 --- a/core/shared/src/test/scala/cats/parse/ErrorShowTest.scala +++ b/core/shared/src/test/scala/cats/parse/ErrorShowTest.scala @@ -43,9 +43,9 @@ class ErrorShowTest extends munit.ScalaCheckSuite { } } - val ok = string("ok") + val ok = string("ok").void val nl = string("\n") - val lx = string("l") ~ digits + val lx = (string("l") ~ digits).void val lxOk = ((lx | ok) ~ nl) // # Expectations: diff --git a/core/shared/src/test/scala/cats/parse/ParserTest.scala b/core/shared/src/test/scala/cats/parse/ParserTest.scala index 662ce951..777fd601 100644 --- a/core/shared/src/test/scala/cats/parse/ParserTest.scala +++ b/core/shared/src/test/scala/cats/parse/ParserTest.scala @@ -2967,7 +2967,7 @@ class ParserTest extends munit.ScalaCheckSuite { val p2 = Parser.char('z') val p = p1.? ~ p2 - val q = (p1 ~ p2) | p2 + val q = (p1 ~ p2).void | p2.void val err1 = p.parse("") val err2 = q.parse("") diff --git a/project/plugins.sbt b/project/plugins.sbt index a8b1f962..76181779 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,5 +3,5 @@ addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.14") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.22") -addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.4.22") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0-RC11") +addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.0-RC11") From 445148319fc24cf59264e2a734572deca00ae7c1 Mon Sep 17 00:00:00 2001 From: Colin <63986022+colin-m-davis@users.noreply.github.com> Date: Fri, 11 Aug 2023 19:08:30 -0700 Subject: [PATCH 06/20] clean up 'recursive' parser description (#523) --- core/shared/src/main/scala/cats/parse/Parser.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/shared/src/main/scala/cats/parse/Parser.scala b/core/shared/src/main/scala/cats/parse/Parser.scala index 35e5e4a7..2225baee 100644 --- a/core/shared/src/main/scala/cats/parse/Parser.scala +++ b/core/shared/src/main/scala/cats/parse/Parser.scala @@ -1706,8 +1706,8 @@ object Parser { def defer0[A](pa: => Parser0[A]): Parser0[A] = Impl.Defer0(() => pa) - /** Build a recursive parser by assuming you have it Useful for parsing recurive structures, like - * for instance JSON. + /** Build a recursive parser by assuming you have it Useful for parsing recursive structures like + * JSON. */ def recursive[A](fn: Parser[A] => Parser[A]): Parser[A] = { lazy val result: Parser[A] = fn(defer(result)) From ca42e44a2665aa57b6b7e39cf23e5acd4c14b94b Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:01:46 -1000 Subject: [PATCH 07/20] Update sbt-typelevel, sbt-typelevel-site to 0.5.0-RC12 (#525) --- project/plugins.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 76181779..b16e9e80 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,5 +3,5 @@ addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.14") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0-RC11") -addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.0-RC11") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0-RC12") +addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.0-RC12") From 47c9c2029f60bb91a4e657650a9c7c007230fa9b Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 09:41:00 +0100 Subject: [PATCH 08/20] Update cats-core to 2.10.0 (#527) Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- project/Dependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 5edf79e2..d59f6424 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -2,7 +2,7 @@ import sbt._ import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._ object Dependencies { - lazy val cats = Def.setting("org.typelevel" %%% "cats-core" % "2.9.0") + lazy val cats = Def.setting("org.typelevel" %%% "cats-core" % "2.10.0") lazy val cats211 = Def.setting("org.typelevel" %%% "cats-core" % "2.0.0") lazy val munit = Def.setting("org.scalameta" %%% "munit" % "1.0.0-M8") lazy val munitScalacheck = Def.setting("org.scalameta" %%% "munit-scalacheck" % "1.0.0-M8") From 551e69069b20a7be3b8a6f0a53420c3c50bb5d1a Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 17:44:10 +0100 Subject: [PATCH 09/20] Update sbt to 1.9.4 (#530) Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 52413ab7..30409871 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.3 +sbt.version=1.9.4 From 8fa9db246d0254d38928aaecfe4a7210261fb147 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 17:44:24 +0100 Subject: [PATCH 10/20] Update sbt-typelevel, sbt-typelevel-site to 0.5.0 (#528) Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- project/plugins.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index b16e9e80..4b1c8c2a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,5 +3,5 @@ addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.14") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0-RC12") -addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.0-RC12") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0") +addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.0") From 52e1b76db68115cc48c2d79ec8d0decd927a2b7a Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 19:14:05 -1000 Subject: [PATCH 11/20] Update scalafmt-core to 3.7.13 (#531) --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index b134dd04..b48be908 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.12" +version = "3.7.13" runner.dialect = scala213 From a75c4a84f1070830eb5829ace08e3ab057546d92 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Sat, 2 Sep 2023 11:25:19 +0100 Subject: [PATCH 12/20] Update scalafmt-core to 3.7.14 (#532) Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index b48be908..9280e8e2 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.7.13" +version = "3.7.14" runner.dialect = scala213 From 6c441f6d757e06178834a1062bd10b32f287ebd0 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 05:11:47 -1000 Subject: [PATCH 13/20] Update sbt-scoverage to 2.0.9 (#536) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4b1c8c2a..d5da8fde 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.14") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0") addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.0") From 1b126ac3de1bb993ed8a585dfbffccf1dbffb87b Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 06:42:00 -1000 Subject: [PATCH 14/20] Update sbt-jmh to 0.4.6 (#534) * Update sbt-jmh to 0.4.6 * Revert commit(s) b5af547 * Update sbt-jmh to 0.4.6 --------- Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index d5da8fde..f1c78b81 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,6 +2,6 @@ addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.14") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0") addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.0") From ff71a7a8f30d84845f6dd4748d85e7ba3ff56ede Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Sun, 10 Sep 2023 17:00:24 +0900 Subject: [PATCH 15/20] add explicit type (#537) --- .../main/scala/cats/parse/Accumulator.scala | 4 ++-- .../src/main/scala/cats/parse/Parser.scala | 20 +++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/core/shared/src/main/scala/cats/parse/Accumulator.scala b/core/shared/src/main/scala/cats/parse/Accumulator.scala index eb352edb..ce87801b 100644 --- a/core/shared/src/main/scala/cats/parse/Accumulator.scala +++ b/core/shared/src/main/scala/cats/parse/Accumulator.scala @@ -135,7 +135,7 @@ object Accumulator0 { object Accumulator extends Priority0Accumulator { implicit def nonEmptyListAccumulator0[A]: Accumulator[A, NonEmptyList[A]] = new Accumulator[A, NonEmptyList[A]] { - def newAppender(first: A) = + def newAppender(first: A): Appender[A, NonEmptyList[A]] = new Appender[A, NonEmptyList[A]] { val bldr = List.newBuilder[A] def append(item: A) = { @@ -149,7 +149,7 @@ object Accumulator extends Priority0Accumulator { implicit def nonEmptyVectorAccumulator0[A]: Accumulator[A, NonEmptyVector[A]] = new Accumulator[A, NonEmptyVector[A]] { - def newAppender(first: A) = + def newAppender(first: A): Appender[A, NonEmptyVector[A]] = new Appender[A, NonEmptyVector[A]] { val bldr = Vector.newBuilder[A] bldr += first diff --git a/core/shared/src/main/scala/cats/parse/Parser.scala b/core/shared/src/main/scala/cats/parse/Parser.scala index 2225baee..656596ed 100644 --- a/core/shared/src/main/scala/cats/parse/Parser.scala +++ b/core/shared/src/main/scala/cats/parse/Parser.scala @@ -21,7 +21,19 @@ package cats.parse -import cats.{Eval, FunctorFilter, Monad, Defer, Alternative, FlatMap, Now, MonoidK, Order, Show} +import cats.{ + Eval, + Functor, + FunctorFilter, + Monad, + Defer, + Alternative, + FlatMap, + Now, + MonoidK, + Order, + Show +} import cats.data.{AndThen, Chain, NonEmptyList} import cats.implicits._ @@ -2063,12 +2075,12 @@ object Parser { implicit val catsInstancesParser : FlatMap[Parser] with Defer[Parser] with MonoidK[Parser] with FunctorFilter[Parser] = new FlatMap[Parser] with Defer[Parser] with MonoidK[Parser] with FunctorFilter[Parser] { - override def empty[A] = Fail + override def empty[A]: Parser[A] = Fail override def defer[A](pa: => Parser[A]): Parser[A] = Parser.this.defer(pa) - override def functor = this + override def functor: Functor[Parser] = this override def map[A, B](fa: Parser[A])(fn: A => B): Parser[B] = Parser.this.map(fa)(fn) @@ -3596,7 +3608,7 @@ object Parser0 { override def empty[A]: Parser0[A] = Parser.Fail - override def functor = this + override def functor: Functor[Parser0] = this override def map[A, B](fa: Parser0[A])(fn: A => B): Parser0[B] = Parser.map0(fa)(fn) From c01928a4b78a98ee05fec7845eaf52302d928ee9 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 22:00:44 -1000 Subject: [PATCH 16/20] Update scala3-library, ... to 3.3.1 (#535) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a3f415ce..9bc0099a 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import Dependencies._ val scala211 = "2.11.12" val scala212 = "2.12.18" val scala213 = "2.13.11" -val scala3 = "3.3.0" +val scala3 = "3.3.1" addCommandAlias("fmt", "; scalafmtAll; scalafmtSbt") addCommandAlias("fmtCheck", "; scalafmtCheckAll; scalafmtSbtCheck") From ae2a67c47c720941c79254b17b713b0bfbedef38 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 22:01:00 -1000 Subject: [PATCH 17/20] Update nscplugin, sbt-scala-native, ... to 0.4.15 (#533) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index f1c78b81..f6322b8f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.14") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.15") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") From f4edfbea49bf587452a93c12ec9a108a0505494d Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 07:48:25 -1000 Subject: [PATCH 18/20] Update sbt-typelevel, sbt-typelevel-site to 0.5.1 (#538) * Update sbt-typelevel, sbt-typelevel-site to 0.5.1 * Run prePR with sbt-typelevel Executed command: sbt tlPrePrBotHook --------- Co-authored-by: typelevel-steward[bot] <106827141+typelevel-steward[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 8 ++++---- project/plugins.sbt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c35ba9b..62a3decd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: timeout-minutes: 60 steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -109,7 +109,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -259,7 +259,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (fast) - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java (temurin@8) id: setup-java-temurin-8 @@ -287,7 +287,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/project/plugins.sbt b/project/plugins.sbt index f6322b8f..0776ea57 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,5 +3,5 @@ addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.15") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") -addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0") -addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.0") +addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.1") +addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.5.1") From 1293581a0e659453ee0343233b7c718d1b882516 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 06:09:24 -1000 Subject: [PATCH 19/20] Update sbt to 1.9.5 (#541) --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 30409871..51b51fce 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.4 +sbt.version=1.9.5 From bd8b323896dd057d0bd66940ab10fe60496638e4 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 06:16:16 -1000 Subject: [PATCH 20/20] Update munit, munit-scalacheck to 1.0.0-M9 (#542) --- project/Dependencies.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index d59f6424..b981fc68 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -4,8 +4,8 @@ import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._ object Dependencies { lazy val cats = Def.setting("org.typelevel" %%% "cats-core" % "2.10.0") lazy val cats211 = Def.setting("org.typelevel" %%% "cats-core" % "2.0.0") - lazy val munit = Def.setting("org.scalameta" %%% "munit" % "1.0.0-M8") - lazy val munitScalacheck = Def.setting("org.scalameta" %%% "munit-scalacheck" % "1.0.0-M8") + lazy val munit = Def.setting("org.scalameta" %%% "munit" % "1.0.0-M9") + lazy val munitScalacheck = Def.setting("org.scalameta" %%% "munit-scalacheck" % "1.0.0-M9") lazy val fastParse = "com.lihaoyi" %% "fastparse" % "2.3.3" lazy val parsley = "org.http4s" %% "parsley" % "1.5.0-M3" lazy val jawnAst = Def.setting("org.typelevel" %% "jawn-ast" % "1.5.1")