From fb76f4755d5be0d9577c89b326dab43996e56d48 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Tue, 31 Aug 2021 10:49:35 +0200 Subject: [PATCH 1/2] Downgrade scala-parser-combinators and scala-xml --- build.sbt | 14 ++++++++------ docs/project/plugins.sbt | 3 --- .../src/sbt-test/twirl/compile/project/plugins.sbt | 3 --- .../twirl/scalajs-compile/project/plugins.sbt | 4 ---- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/build.sbt b/build.sbt index 1e8fbce0..ba391ee7 100644 --- a/build.sbt +++ b/build.sbt @@ -5,12 +5,14 @@ import org.scalajs.jsenv.nodejs.NodeJSEnv // Binary compatibility is this version val previousVersion: Option[String] = Some("1.5.0") -val ScalaTestVersion = "3.2.9" -val ScalaParserCombinatorsVersion = "2.0.0" - -val ScalaXmlVersion = "2.0.1" -// Next line can be removed when dropping Scala 2.12? See https://github.com/playframework/twirl/pull/424 -ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always +val ScalaTestVersion = "3.2.9" + +// Do NOT upgrade these dependencies to 2.x or newer! twirl is a sbt-plugin +// and gets published with Scala 2.12, therefore we need to stay at the same major version +// like the 2.12.x Scala compiler, otherwise we run into conflicts when using sbt 1.5+ +// See https://github.com/scala/scala/pull/9743 +val ScalaParserCombinatorsVersion = "1.1.2" // Do not upgrade beyond 1.x +val ScalaXmlVersion = "1.3.0" // Do not upgrade beyond 1.x val mimaSettings = Seq( mimaPreviousArtifacts := previousVersion.map(organization.value %% name.value % _).toSet diff --git a/docs/project/plugins.sbt b/docs/project/plugins.sbt index ae08c519..4a6aa0ab 100644 --- a/docs/project/plugins.sbt +++ b/docs/project/plugins.sbt @@ -7,6 +7,3 @@ resolvers ++= DefaultOptions.resolvers(snapshot = true) addSbtPlugin("com.typesafe.play" % "play-docs-sbt-plugin" % sys.props.getOrElse("play.version", "2.8.0")) addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") - -// Next line can be removed when dropping Scala 2.12? See https://github.com/playframework/twirl/pull/424 -ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always diff --git a/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt b/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt index e8aebbd8..631d5883 100644 --- a/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt +++ b/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt @@ -1,4 +1 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % sys.props("project.version")) - -// Next line can be removed when dropping Scala 2.12? See https://github.com/playframework/twirl/pull/424 -ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always diff --git a/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt b/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt index b376fa91..4d2f1032 100644 --- a/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt +++ b/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt @@ -1,6 +1,2 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % sys.props("project.version")) addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0") - -// Next line can be removed when dropping Scala 2.12? See https://github.com/playframework/twirl/pull/424 -ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always - From 0ad4b8f06814d9a74a15b3c9377e263cbaaf7d1e Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Wed, 1 Sep 2021 00:50:42 +0200 Subject: [PATCH 2/2] Pin scala-xml and scala-parser-combinators to 1.x --- .scala-steward.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.scala-steward.conf b/.scala-steward.conf index f8c9828e..15ac2683 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -1,2 +1,8 @@ pullRequests.frequency = "@weekly" commits.message = "${artifactName} ${nextVersion} (was ${currentVersion})" + +updates.pin = [ + // See comment in build.sbt why we want to pin these two deps to 1.x + { groupId = "org.scala-lang.modules", artifactId = "scala-xml", version = "1." }, + { groupId = "org.scala-lang.modules", artifactId = "scala-parser-combinators", version = "1." } +]