From a48f4d7a64fc37843a7613222568bae4b7d26db1 Mon Sep 17 00:00:00 2001 From: Philippus Date: Wed, 2 Feb 2022 21:27:38 +0100 Subject: [PATCH 1/4] Update scala 3.0.2 to 3.1.1 --- .github/workflows/ci.yml | 2 +- build.sbt | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ac33872..53702b42 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.0.2] + scala: [2.11.12, 2.12.15, 2.13.8, 3.1.1] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/build.sbt b/build.sbt index 71e9c50b..aee67400 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,12 @@ ThisBuild / startYear := Some(2004) // I thought we could declare these in `ThisBuild` scope but no :-/ val commonSettings = Seq( versionScheme := Some("early-semver"), - versionPolicyIntention := Compatibility.BinaryAndSourceCompatible, + versionPolicyIntention := { + if (scalaVersion.value.startsWith("3")) + Compatibility.None + else + Compatibility.BinaryAndSourceCompatible + } ) lazy val root = project.in(file(".")) @@ -22,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.0.2"), + crossScalaVersions := Seq("2.13.8", "2.12.15", "2.11.12", "3.1.1"), scalaVersion := crossScalaVersions.value.head, libraryDependencies += "junit" % "junit" % "4.13.2" % Test, From d7444e7d5b1d0e466140e8ed6f8ba7079b594898 Mon Sep 17 00:00:00 2001 From: Philippus Date: Wed, 2 Feb 2022 21:42:50 +0100 Subject: [PATCH 2/4] Don't check for scala versions anymore for scala native --- build.sbt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index aee67400..ffa5b48f 100644 --- a/build.sbt +++ b/build.sbt @@ -104,13 +104,8 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor .nativeSettings( versionPolicyCheck / skip := true, versionCheck / skip := true, - compile / skip := System.getProperty("java.version").startsWith("1.6") || !scalaVersion.value.startsWith("2"), - test := {}, - libraryDependencies := { - if (!scalaVersion.value.startsWith("2")) - libraryDependencies.value.filterNot(_.organization == "org.scala-native") - else libraryDependencies.value - } + compile / skip := System.getProperty("java.version").startsWith("1.6"), + test := {} ) lazy val parserCombinatorsJVM = parserCombinators.jvm From c1f41a753e88c216fafff970776b63bd2a85b330 Mon Sep 17 00:00:00 2001 From: Philippus Date: Thu, 3 Feb 2022 06:59:46 +0100 Subject: [PATCH 3/4] Don't check for jdk 6 --- build.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sbt b/build.sbt index ffa5b48f..5217dffb 100644 --- a/build.sbt +++ b/build.sbt @@ -104,7 +104,6 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor .nativeSettings( versionPolicyCheck / skip := true, versionCheck / skip := true, - compile / skip := System.getProperty("java.version").startsWith("1.6"), test := {} ) From 063ebb34819eb3c20bf084c0cbc04212aaad53a0 Mon Sep 17 00:00:00 2001 From: Philippus Date: Thu, 3 Feb 2022 10:13:57 +0100 Subject: [PATCH 4/4] Enable tests for scala native --- build.sbt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 5217dffb..4f3153cc 100644 --- a/build.sbt +++ b/build.sbt @@ -104,7 +104,10 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor .nativeSettings( versionPolicyCheck / skip := true, versionCheck / skip := true, - test := {} + 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) ) lazy val parserCombinatorsJVM = parserCombinators.jvm