From 2c60673c7e7aae55d30a687a92d6b9a529a4bc95 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 15 Feb 2022 05:34:19 +0100 Subject: [PATCH 01/38] Update sbt-scalajs, scalajs-compiler, ... to 1.9.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index bf38cb68..c6eb1437 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.9.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3") From d2e70fb4a9e377f9d963031f9061c483aec2499b Mon Sep 17 00:00:00 2001 From: Philippus Date: Sat, 19 Feb 2022 15:34:55 +0100 Subject: [PATCH 02/38] Relax versionPolicyIntention to BinaryCompatible --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 4f3153cc..3f0e1d95 100644 --- a/build.sbt +++ b/build.sbt @@ -8,7 +8,7 @@ val commonSettings = Seq( if (scalaVersion.value.startsWith("3")) Compatibility.None else - Compatibility.BinaryAndSourceCompatible + Compatibility.BinaryCompatible } ) From 2e2c4ec3c2ba112b0e45fe216189c17f809b49c4 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 3 Mar 2022 19:10:49 +0100 Subject: [PATCH 03/38] Update auxlib, javalib, junit-plugin, ... to 0.4.4 --- build.sbt | 4 ++-- project/plugins.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 3f0e1d95..8f7edebf 100644 --- a/build.sbt +++ b/build.sbt @@ -106,8 +106,8 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor versionCheck / skip := true, Test / fork := false, libraryDependencies := - libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.3", - addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.3" cross CrossVersion.full) + libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.4", + addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.4" cross CrossVersion.full) ) lazy val parserCombinatorsJVM = parserCombinators.jvm diff --git a/project/plugins.sbt b/project/plugins.sbt index c6eb1437..03c6cdde 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,4 +4,4 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.9.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.4") From c85a061a2cb9ecab22d8d9c2981605c1ac61b0c6 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 22 Mar 2022 19:22:19 +0100 Subject: [PATCH 04/38] Update sbt-scala-native-crossproject, ... to 1.2.0 --- project/plugins.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 03c6cdde..20e5856f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.1") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.9.0") -addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.4") From e1c79b1e70861181f592f3dcab74a52780a7f3cc Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 22 Mar 2022 19:22:23 +0100 Subject: [PATCH 05/38] Update scala-collection-compat to 2.7.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 8f7edebf..80199a05 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor libraryDependencies += "com.github.sbt" % "junit-interface" % "0.13.3" % Test, // so we can `@nowarn` in test code, but only in test code, so the dependency // doesn't leak downstream. can be dropped when we drop 2.11 from the crossbuild - libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.6.0" % Test, + libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.7.0" % Test, apiMappings ++= scalaInstance.value.libraryJars.collect { case file if file.getName.startsWith("scala-library") && file.getName.endsWith(".jar") => From 8ae9216b4b0f4a6ee6671c7e99a5e4a5b2ca405c Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Sat, 23 Apr 2022 03:01:38 +0200 Subject: [PATCH 06/38] Update sbt-scalajs, scalajs-compiler, ... to 1.10.0 (#454) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 20e5856f..fe5a7eda 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.9.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.4") From 3a1f26c40634908c018c60dd69dbddb82dca8b56 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Sat, 23 Apr 2022 03:01:47 +0200 Subject: [PATCH 07/38] Update scala3-library, ... to 3.1.2 (#456) --- .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 53702b42..cfd98706 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: java: [8, 11, 17] - scala: [2.11.12, 2.12.15, 2.13.8, 3.1.1] + scala: [2.11.12, 2.12.15, 2.13.8, 3.1.2] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/build.sbt b/build.sbt index 80199a05..69d0d205 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor name := "scala-parser-combinators", scalaModuleAutomaticModuleName := Some("scala.util.parsing"), - crossScalaVersions := Seq("2.13.8", "2.12.15", "2.11.12", "3.1.1"), + crossScalaVersions := Seq("2.13.8", "2.12.15", "2.11.12", "3.1.2"), scalaVersion := crossScalaVersions.value.head, libraryDependencies += "junit" % "junit" % "4.13.2" % Test, From 9a2482fb07964b0dfb09fc99e2264c092238b563 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Thu, 28 Apr 2022 09:35:19 -0700 Subject: [PATCH 08/38] replace Awesome Scala link with Scaladex link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70a3320b..b3071a82 100644 --- a/README.md +++ b/README.md @@ -71,4 +71,4 @@ For a detailed unpacking of this example see ## Alternatives -A number of other parsing libraries for Scala are available; see https://github.com/lauris/awesome-scala#parsing +A number of other parsing libraries for Scala are available; see https://index.scala-lang.org/awesome/parsing?sort=stars From c83b8af8b9855d590eefb57385dab0b433d32ff3 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 27 Jun 2022 16:36:23 -0700 Subject: [PATCH 09/38] sbt 1.7.0-RC1 (was 1.6.2) --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index c8fcab54..9542dc20 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.7.0-RC1 From ce72e0eabdea5cc0df425f8446190368cf1309dc Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 27 Jun 2022 16:37:14 -0700 Subject: [PATCH 10/38] use new sbt 1.7 feature to not repeat Scala version numbers --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfd98706..8dc1bd03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: java: [8, 11, 17] - scala: [2.11.12, 2.12.15, 2.13.8, 3.1.2] + scala: [2.11.x, 2.12.x, 2.13.x, 3.x] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 06557662c430c38a92ce1fcda1823f46873123cc Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 27 Jun 2022 16:37:34 -0700 Subject: [PATCH 11/38] Scala 2.12.16 (was 15) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 69d0d205..a9b4d927 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor name := "scala-parser-combinators", scalaModuleAutomaticModuleName := Some("scala.util.parsing"), - crossScalaVersions := Seq("2.13.8", "2.12.15", "2.11.12", "3.1.2"), + crossScalaVersions := Seq("2.13.8", "2.12.16", "2.11.12", "3.1.2"), scalaVersion := crossScalaVersions.value.head, libraryDependencies += "junit" % "junit" % "4.13.2" % Test, From 73fd083532edaedbbcd35c39019811272ce0ca39 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 28 Jun 2022 22:56:06 +0000 Subject: [PATCH 12/38] Update sbt-scalajs, scalajs-compiler, ... to 1.10.1 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index fe5a7eda..e87f2c80 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.4") From 8548073887f0dcece72d8af5f667c22d748b19bb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 28 Jun 2022 22:56:10 +0000 Subject: [PATCH 13/38] Update scala3-library, ... to 3.1.3 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a9b4d927..0552f1cd 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor name := "scala-parser-combinators", scalaModuleAutomaticModuleName := Some("scala.util.parsing"), - crossScalaVersions := Seq("2.13.8", "2.12.16", "2.11.12", "3.1.2"), + crossScalaVersions := Seq("2.13.8", "2.12.16", "2.11.12", "3.1.3"), scalaVersion := crossScalaVersions.value.head, libraryDependencies += "junit" % "junit" % "4.13.2" % Test, From e60e0e08db3b5345172d804afecdd662b1b87e53 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 28 Jun 2022 22:56:14 +0000 Subject: [PATCH 14/38] Update junit-plugin, junit-runtime, ... to 0.4.5 --- build.sbt | 4 ++-- project/plugins.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index a9b4d927..99bf3b6f 100644 --- a/build.sbt +++ b/build.sbt @@ -106,8 +106,8 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor versionCheck / skip := true, Test / fork := false, libraryDependencies := - libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.4", - addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.4" cross CrossVersion.full) + libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.5", + addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.5" cross CrossVersion.full) ) lazy val parserCombinatorsJVM = parserCombinators.jvm diff --git a/project/plugins.sbt b/project/plugins.sbt index fe5a7eda..6fc84b94 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,4 +4,4 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.4") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.5") From c5f521c8466ca238aed02a819c6eb3b4dc3df080 Mon Sep 17 00:00:00 2001 From: Philippus Date: Wed, 29 Jun 2022 08:29:29 +0200 Subject: [PATCH 15/38] Update checkout and setup-java github actions to v3 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dc1bd03..c4b5c1ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,11 +13,11 @@ jobs: scala: [2.11.x, 2.12.x, 2.13.x, 3.x] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - uses: coursier/cache-action@v6 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: temurin java-version: ${{matrix.java}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d69ab720..5a9fad6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,10 +6,10 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: temurin java-version: 8 From c7918a6488c363cba6238c90a83fbc09b7840361 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 3 Jul 2022 02:08:32 +0000 Subject: [PATCH 16/38] Update sbt to 1.7.0-RC2 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 9542dc20..20747124 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.0-RC1 +sbt.version=1.7.0-RC2 From cbe1457cd320012d822175549e689eb8dd8cec86 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Fri, 8 Jul 2022 16:41:05 -0700 Subject: [PATCH 17/38] scala-collection-compat 2.8.0 (was 2.7.0) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index cc6f4bdc..f67cefad 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor libraryDependencies += "com.github.sbt" % "junit-interface" % "0.13.3" % Test, // so we can `@nowarn` in test code, but only in test code, so the dependency // doesn't leak downstream. can be dropped when we drop 2.11 from the crossbuild - libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.7.0" % Test, + libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.0" % Test, apiMappings ++= scalaInstance.value.libraryJars.collect { case file if file.getName.startsWith("scala-library") && file.getName.endsWith(".jar") => From 8f5ea027788ec294f1a590ffdb595631e899e010 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 12 Jul 2022 04:12:21 +0000 Subject: [PATCH 18/38] Update sbt to 1.7.1 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 20747124..22af2628 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.0-RC2 +sbt.version=1.7.1 From ed07d2aef373a345dfae832b5b472ffd0e2d68bd Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Wed, 3 Aug 2022 05:24:32 +0200 Subject: [PATCH 19/38] Update scala-collection-compat to 2.8.1 (#476) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f67cefad..75420ec5 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor libraryDependencies += "com.github.sbt" % "junit-interface" % "0.13.3" % Test, // so we can `@nowarn` in test code, but only in test code, so the dependency // doesn't leak downstream. can be dropped when we drop 2.11 from the crossbuild - libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.0" % Test, + libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1" % Test, apiMappings ++= scalaInstance.value.libraryJars.collect { case file if file.getName.startsWith("scala-library") && file.getName.endsWith(".jar") => From 08b8bfe4ec3cd60222198567cae2c663eff37bb7 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 1 Sep 2022 19:39:04 +0000 Subject: [PATCH 20/38] Update junit-plugin, junit-runtime, ... to 0.4.7 --- build.sbt | 4 ++-- project/plugins.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 75420ec5..843dae2e 100644 --- a/build.sbt +++ b/build.sbt @@ -106,8 +106,8 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor versionCheck / skip := true, Test / fork := false, libraryDependencies := - libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.5", - addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.5" cross CrossVersion.full) + libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.7", + addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.7" cross CrossVersion.full) ) lazy val parserCombinatorsJVM = parserCombinators.jvm diff --git a/project/plugins.sbt b/project/plugins.sbt index e435d525..bfcc31f0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,4 +4,4 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.5") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7") From 02b50a3f613d356ea297f5a765cc36d0dc351328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=A0pan=C4=9Bl?= Date: Thu, 8 Sep 2022 06:52:45 +0200 Subject: [PATCH 21/38] Provide explicit type to Scanner.rest Without this Scala 3 infers different type than Scala 2 --- .../scala/scala/util/parsing/combinator/lexical/Scanners.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/src/main/scala/scala/util/parsing/combinator/lexical/Scanners.scala b/shared/src/main/scala/scala/util/parsing/combinator/lexical/Scanners.scala index d86b00f6..c7d47dfa 100644 --- a/shared/src/main/scala/scala/util/parsing/combinator/lexical/Scanners.scala +++ b/shared/src/main/scala/scala/util/parsing/combinator/lexical/Scanners.scala @@ -57,7 +57,7 @@ trait Scanners extends Parsers { override def source: java.lang.CharSequence = in.source override def offset: Int = in.offset def first = tok - def rest = new Scanner(rest2) + def rest: Scanner = new Scanner(rest2) def pos = rest1.pos def atEnd = in.atEnd || (whitespace(in) match { case Success(_, in1) => in1.atEnd case _ => false }) } From 7381621cd2ef3f546fd2554c6340277f41ca5662 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Mon, 19 Sep 2022 01:39:05 +0200 Subject: [PATCH 22/38] Update scala3-library, ... to 3.2.0 (#481) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 843dae2e..d568c985 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor name := "scala-parser-combinators", scalaModuleAutomaticModuleName := Some("scala.util.parsing"), - crossScalaVersions := Seq("2.13.8", "2.12.16", "2.11.12", "3.1.3"), + crossScalaVersions := Seq("2.13.8", "2.12.16", "2.11.12", "3.2.0"), scalaVersion := crossScalaVersions.value.head, libraryDependencies += "junit" % "junit" % "4.13.2" % Test, From cdc332bd17d6f2a42418bd1f7eaa3c3695a25418 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 15 Oct 2022 09:36:39 +0000 Subject: [PATCH 23/38] Update scala-library to 2.13.10 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d568c985..c8f66c15 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor name := "scala-parser-combinators", scalaModuleAutomaticModuleName := Some("scala.util.parsing"), - crossScalaVersions := Seq("2.13.8", "2.12.16", "2.11.12", "3.2.0"), + crossScalaVersions := Seq("2.13.10", "2.12.16", "2.11.12", "3.2.0"), scalaVersion := crossScalaVersions.value.head, libraryDependencies += "junit" % "junit" % "4.13.2" % Test, From 1722c4dc1c9bcea26f761ce7efec63e40e32719d Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 15 Oct 2022 09:36:42 +0000 Subject: [PATCH 24/38] Update sbt to 1.7.2 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 22af2628..563a014d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.1 +sbt.version=1.7.2 From 1fe900bb9a83d9a4d780fe74664fd28910957394 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Sun, 16 Oct 2022 14:23:13 +0200 Subject: [PATCH 25/38] Update scala-library to 2.12.17 (#483) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index d568c985..b62a9d5f 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor name := "scala-parser-combinators", scalaModuleAutomaticModuleName := Some("scala.util.parsing"), - crossScalaVersions := Seq("2.13.8", "2.12.16", "2.11.12", "3.2.0"), + crossScalaVersions := Seq("2.13.8", "2.12.17", "2.11.12", "3.2.0"), scalaVersion := crossScalaVersions.value.head, libraryDependencies += "junit" % "junit" % "4.13.2" % Test, From b2f2b4dfde4591568ede0e41a60e285ef39ca436 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Sun, 16 Oct 2022 14:23:54 +0200 Subject: [PATCH 26/38] Update sbt-scalajs, scalajs-compiler, ... to 1.11.0 (#482) --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index bfcc31f0..876d2830 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7") From 798417dbd41d850abded9d623be761bb3fa49f75 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 6 Nov 2022 21:28:02 +0000 Subject: [PATCH 27/38] Update sbt to 1.7.3 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 563a014d..6a9f0388 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.2 +sbt.version=1.7.3 From 4ca0f50b6b8c93a6924ef9f19da3cf40fcd733ea Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 12 Nov 2022 22:35:15 +0000 Subject: [PATCH 28/38] Update sbt to 1.8.0 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 6a9f0388..8b9a0b0a 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.3 +sbt.version=1.8.0 From 11dede09d297c87d0c6506ef3891cc52f45a65a2 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 24 Nov 2022 20:02:47 +0000 Subject: [PATCH 29/38] Update sbt-scalajs, scalajs-compiler, ... to 1.12.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 876d2830..19948668 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.1") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7") From 6f4eac62c0e7ba4bdb765cfdda25c695385f2b04 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 24 Nov 2022 20:02:50 +0000 Subject: [PATCH 30/38] Update junit-plugin, junit-runtime, ... to 0.4.9 --- build.sbt | 4 ++-- project/plugins.sbt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 84209d5e..1cd6defc 100644 --- a/build.sbt +++ b/build.sbt @@ -106,8 +106,8 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor versionCheck / skip := true, Test / fork := false, libraryDependencies := - libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.7", - addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.7" cross CrossVersion.full) + libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.9", + addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.9" cross CrossVersion.full) ) lazy val parserCombinatorsJVM = parserCombinators.jvm diff --git a/project/plugins.sbt b/project/plugins.sbt index 876d2830..cae620ef 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,4 +4,4 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.9") From 9d3cabe9a30af3b28f1d4dd53d8153d7d31a6277 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 28 Nov 2022 20:43:27 +0000 Subject: [PATCH 31/38] Update scala-collection-compat to 2.9.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 1cd6defc..69089201 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor libraryDependencies += "com.github.sbt" % "junit-interface" % "0.13.3" % Test, // so we can `@nowarn` in test code, but only in test code, so the dependency // doesn't leak downstream. can be dropped when we drop 2.11 from the crossbuild - libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.8.1" % Test, + libraryDependencies += "org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0" % Test, apiMappings ++= scalaInstance.value.libraryJars.collect { case file if file.getName.startsWith("scala-library") && file.getName.endsWith(".jar") => From 3d7cf050f1c7a818779714b8235b73a7adb5718a Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Fri, 2 Dec 2022 17:32:33 +0100 Subject: [PATCH 32/38] Update scala3-library, ... to 3.2.1 (#488) --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 1cd6defc..f9804340 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor name := "scala-parser-combinators", scalaModuleAutomaticModuleName := Some("scala.util.parsing"), - crossScalaVersions := Seq("2.13.10", "2.12.17", "2.11.12", "3.2.0"), + crossScalaVersions := Seq("2.13.10", "2.12.17", "2.11.12", "3.2.1"), scalaVersion := crossScalaVersions.value.head, libraryDependencies += "junit" % "junit" % "4.13.2" % Test, From 53af4023552f3fb04dad2bfa0af27ee2d8276c5a Mon Sep 17 00:00:00 2001 From: Philippus Baalman Date: Thu, 5 Jan 2023 17:38:47 +0100 Subject: [PATCH 33/38] Extend copyright into 2023 (#494) --- NOTICE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NOTICE b/NOTICE index 61f8bc83..3e6a6355 100644 --- a/NOTICE +++ b/NOTICE @@ -1,6 +1,6 @@ Scala parser combinators -Copyright (c) 2002-2022 EPFL -Copyright (c) 2011-2022 Lightbend, Inc. +Copyright (c) 2002-2023 EPFL +Copyright (c) 2011-2023 Lightbend, Inc. Scala includes software developed at LAMP/EPFL (https://lamp.epfl.ch/) and From 0327a8c420d42585b959259166b72b807cc683ee Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Thu, 5 Jan 2023 20:38:29 +0000 Subject: [PATCH 34/38] Update sbt to 1.8.2 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 8b9a0b0a..46e43a97 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.0 +sbt.version=1.8.2 From 61e11112cb6ee0a8fd0b058871e11b5d5da2a8a6 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 23 Jan 2023 12:49:28 -0800 Subject: [PATCH 35/38] re-enable versionPolicy checking on Scala 3 (#497) --- build.sbt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 6a3f3b77..b05dcfba 100644 --- a/build.sbt +++ b/build.sbt @@ -4,12 +4,7 @@ ThisBuild / startYear := Some(2004) // I thought we could declare these in `ThisBuild` scope but no :-/ val commonSettings = Seq( versionScheme := Some("early-semver"), - versionPolicyIntention := { - if (scalaVersion.value.startsWith("3")) - Compatibility.None - else - Compatibility.BinaryCompatible - } + versionPolicyIntention := Compatibility.BinaryCompatible, ) lazy val root = project.in(file(".")) From 2ac42b014333f7515b663ab0516857f1f7f1588a Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Thu, 26 Jan 2023 04:46:56 +0900 Subject: [PATCH 36/38] use ScalaNativeJUnitPlugin (#498) --- build.sbt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index b05dcfba..ffe2352b 100644 --- a/build.sbt +++ b/build.sbt @@ -96,13 +96,11 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor Test / fork := false ) .jsEnablePlugins(ScalaJSJUnitPlugin) + .nativeEnablePlugins(ScalaNativeJUnitPlugin) .nativeSettings( versionPolicyCheck / skip := true, versionCheck / skip := true, Test / fork := false, - libraryDependencies := - libraryDependencies.value.filterNot(_.organization == "junit") :+ "org.scala-native" %%% "junit-runtime" % "0.4.9", - addCompilerPlugin("org.scala-native" % "junit-plugin" % "0.4.9" cross CrossVersion.full) ) lazy val parserCombinatorsJVM = parserCombinators.jvm From 537211ca2e0aab3749ec109859bd6ebbfe8ad6b4 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Wed, 25 Jan 2023 20:48:00 +0100 Subject: [PATCH 37/38] Add an irrefutable version of the NoSuccess extractor (#496) --- .../util/parsing/combinator/Parsers.scala | 23 ++++++++++++++++++- .../combinator/PackratParsersTest.scala | 16 ++++--------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/shared/src/main/scala/scala/util/parsing/combinator/Parsers.scala b/shared/src/main/scala/scala/util/parsing/combinator/Parsers.scala index 737244ba..82a4bf8a 100644 --- a/shared/src/main/scala/scala/util/parsing/combinator/Parsers.scala +++ b/shared/src/main/scala/scala/util/parsing/combinator/Parsers.scala @@ -176,13 +176,34 @@ trait Parsers { def get: Nothing = scala.sys.error("No result when parsing failed") } - /** An extractor so `NoSuccess(msg, next)` can be used in matches. */ + /** + * An extractor so `case NoSuccess(msg, next)` can be used in matches. + * + * Note: On Scala 2.13, using this extractor leads to an exhaustivity warning: + * + * {{{ + * def m(r: ParseResult[Int]) = r match { + * case Success(i) => ... + * case NoSuccess(msg, _) => ... // "warning: match may not be exhaustive" + * }}} + * + * To eliminate this warning, use the irrefutable `NoSuccess.I` extractor. + * Due to binary compatibility, `NoSuccess` itself cannot be changed. + */ object NoSuccess { def unapply[T](x: ParseResult[T]) = x match { case Failure(msg, next) => Some((msg, next)) case Error(msg, next) => Some((msg, next)) case _ => None } + + /** An irrefutable version of the `NoSuccess` extractor, used as `case NoSuccess.I(msg, next)`. */ + object I { + def unapply(x: NoSuccess): Some[(String, Input)] = x match { + case Failure(msg, next) => Some((msg, next)) + case Error(msg, next) => Some((msg, next)) + } + } } /** The failure case of `ParseResult`: contains an error-message and the remaining input. diff --git a/shared/src/test/scala/scala/util/parsing/combinator/PackratParsersTest.scala b/shared/src/test/scala/scala/util/parsing/combinator/PackratParsersTest.scala index 2bf7881f..b56b4628 100644 --- a/shared/src/test/scala/scala/util/parsing/combinator/PackratParsersTest.scala +++ b/shared/src/test/scala/scala/util/parsing/combinator/PackratParsersTest.scala @@ -28,9 +28,7 @@ class PackratParsersTest { def extractResult(r : ParseResult[Int]): Int = r match { case Success(a,_) => a - case NoSuccess(a,_) => sys.error(a) - case Failure(a, _) => sys.error(a) - case Error(a, _) => sys.error(a) + case NoSuccess.I(a,_) => sys.error(a) } def check(expected: Int, expr: String): Unit = { val parseResult = head(new lexical.Scanner(expr)) @@ -84,9 +82,7 @@ class PackratParsersTest { def extractResult(r : ParseResult[Int]): Int = r match { case Success(a,_) => a - case NoSuccess(a,_) => sys.error(a) - case Failure(a, _) => sys.error(a) - case Error(a, _) => sys.error(a) + case NoSuccess.I(a,_) => sys.error(a) } def check(expected: Int, expr: String): Unit = { val parseResult = head(new lexical.Scanner(expr)) @@ -109,9 +105,7 @@ class PackratParsersTest { val head = phrase(AnBnCn) def extractResult(r: ParseResult[AnBnCnResult]): AnBnCnResult = r match { case Success(a,_) => a - case NoSuccess(a,_) => sys.error(a) - case Failure(a, _) => sys.error(a) - case Error(a, _) => sys.error(a) + case NoSuccess.I(a,_) => sys.error(a) } def threeLists(as: List[Symbol], bs: List[Symbol], cs: List[Symbol]): AnBnCnResult = { val as1 = as.map(_.name) @@ -152,9 +146,7 @@ class PackratParsersTest { def extractResult(r: ParseResult[Res]): Res = r match { case Success(a,_) => a - case NoSuccess(a,_) => sys.error(a) - case Failure(a, _) => sys.error(a) - case Error(a, _) => sys.error(a) + case NoSuccess.I(a,_) => sys.error(a) } def check(expected: Term, input: String, ctx: Ctx): Unit = { val parseResult = phraseTerm(new lexical.Scanner(input)) From decd4d7763f94c0abc7f6adca702f8497f1b0e03 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Thu, 26 Jan 2023 13:57:22 -0800 Subject: [PATCH 38/38] add library pros and cons to README (#500) --- README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b3071a82..bd0377c0 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,24 @@ [](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-parser-combinators_2.13) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-parser-combinators_3) -### Scala Standard Parser Combinator Library +This was originally part of the Scala standard library, but is now community-maintained, under the guidance of the Scala team at Lightbend. If you are interested in joining the maintainers team, please contact [@Philippus](https://github.com/philippus) or [@SethTisue](https://github.com/SethTisue). -This library was originally part of the Scala standard library, but is now community-maintained, under the guidance of the Scala team at Lightbend. If you are interested in helping please contact [@Philippus](https://github.com/philippus) or [@SethTisue](https://github.com/SethTisue). +## Choosing a parsing library + +This library's main strengths are: + +* Stability. It's been around and in wide use for more than a decade. +* The codebase is modest in size and its internals are fairly simple. +* It's plain vanilla Scala. No macros, code generation, or other magic is involved. +* All versions of Scala (2.11, 2.12, 2.13, 3) are supported on all back ends (JVM, JS, Native). + +Its main weaknesses are: + +* Performance. If you are ingesting large amounts of data, you may want something faster. +* Minimal feature set. +* Inflexible, unstructured error reporting. + +A number of other parsing libraries for Scala are available -- [see list on Scaladex](https://index.scala-lang.org/awesome/parsing?sort=stars). ## Documentation @@ -68,7 +83,3 @@ For a detailed unpacking of this example see * Have a look at [existing issues](https://github.com/scala/scala-parser-combinators/issues) * Ask questions and discuss [in GitHub Discussions](https://github.com/scala/scala-parser-combinators/discussions) * Feel free to open draft pull requests with partially completed changes, to get feedback. - -## Alternatives - -A number of other parsing libraries for Scala are available; see https://index.scala-lang.org/awesome/parsing?sort=stars