From a36f47b618793ed2a6973d94e23fb9998c633175 Mon Sep 17 00:00:00 2001 From: "scala-center-steward[bot]" <111975575+scala-center-steward[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 00:19:34 +0000 Subject: [PATCH 1/2] Update sbt-version-policy to 3.2.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 336b451a9..430661e21 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0") -addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "2.1.3") +addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.0") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.2") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1") From b7df882782c9ccd9015b03136aba542e54f0c064 Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Sat, 10 Feb 2024 18:57:27 +0100 Subject: [PATCH 2/2] use versionPolicyIgnored instead of hack broken with sbt-version-policy 3+ --- project/ScalafixBuild.scala | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/project/ScalafixBuild.scala b/project/ScalafixBuild.scala index e8fb0b04e..0b30c90b0 100644 --- a/project/ScalafixBuild.scala +++ b/project/ScalafixBuild.scala @@ -229,7 +229,13 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { override def buildSettings: Seq[Setting[_]] = List( // https://github.com/sbt/sbt/issues/5568#issuecomment-1094380636 - versionPolicyIgnored += "com.lihaoyi" %% "pprint", + versionPolicyIgnored ++= Seq( + // https://github.com/scalacenter/scalafix/pull/1530 + "com.lihaoyi" %% "pprint", + // https://github.com/scalacenter/scalafix/pull/1819#issuecomment-1636118496 + "org.scalameta" %% "fastparse-v2", + "com.lihaoyi" %% "geny" + ), versionPolicyIgnoredInternalDependencyVersions := Some("^\\d+\\.\\d+\\.\\d+\\+\\d+".r), versionScheme := Some("early-semver"), @@ -248,21 +254,6 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { ) override def projectSettings: Seq[Def.Setting[_]] = List( - // https://github.com/scalacenter/scalafix/pull/1819#issuecomment-1636118496 - versionPolicyFindDependencyIssues ~= { issues => - issues.map { case (module, report) => - val Seq(backward, forward) = - Seq(report.backwardStatuses, report.forwardStatuses) - .map { statuses => - statuses.filterNot { case ((org, artifact), _) => - Seq(scalametaFastparse, geny) - .map(mod => (mod.organization, mod.name)) - .contains((org, artifact.split('_').head)) - } - } - (module, DependencyCheckReport(backward, forward)) - } - }, // Prevent issues with scalatest serialization Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat, Test / testWindows := (Test / testOnly)