Skip to content

Commit

Permalink
use versionPolicyIgnored instead of hack broken with sbt-version-poli…
Browse files Browse the repository at this point in the history
…cy 3+
  • Loading branch information
bjaglin committed Feb 10, 2024
1 parent a36f47b commit b7df882
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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)
Expand Down

0 comments on commit b7df882

Please sign in to comment.