Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sbt-version-policy to 3.2.0 #1902

Merged
merged 2 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mimics

scalafix/build.sbt

Lines 150 to 157 in 16e9dce

Seq(
// metaconfig 0.10.0 shaded pprint
// https://github.com/scalameta/metaconfig/pull/154/files#r794005161
pprint,
// scalameta 4.8.3 shaded fastparse and geny
// https://github.com/scalameta/scalameta/pull/3246
scalametaFastparse,
geny

// 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
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")
Expand Down