Skip to content

Commit

Permalink
Merge pull request #1991 from bjaglin/sbtscalafix0121
Browse files Browse the repository at this point in the history
Post 0.12.1 release
  • Loading branch information
bjaglin committed May 1, 2024
2 parents d0a8f3b + 2cf30bd commit 33b30fe
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 29 deletions.
3 changes: 1 addition & 2 deletions build.sbt
Expand Up @@ -6,8 +6,7 @@ inThisBuild(
List(
onLoadMessage := s"Welcome to scalafix ${version.value}",
semanticdbEnabled := true,
semanticdbVersion := scalametaV,
scalafixScalaBinaryVersion := "2.13"
semanticdbVersion := scalametaV
)
)

Expand Down
26 changes: 2 additions & 24 deletions project/ScalafixBuild.scala
Expand Up @@ -203,13 +203,8 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
(ThisBuild / version)
.get(extracted.structure.data)
.get
val suffix =
(ThisBuild / scalafixScalaBinaryVersion)
.get(extracted.structure.data)
.get
.replace('.', '_')

s"all cli$suffix/publishLocalTransitive interfaces/publishLocal" ::
s"all cli2_12/publishLocalTransitive cli2_13/publishLocalTransitive interfaces/publishLocal" ::
"reload plugins" ::
s"""set dependencyOverrides += "ch.epfl.scala" % "scalafix-interfaces" % "$v"""" :: // as documented in installation.md
"session save" ::
Expand All @@ -228,7 +223,6 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
)

private val PreviousScalaVersion: Map[String, String] = Map(
"2.13.14" -> "2.13.13"
)

override def buildSettings: Seq[Setting[_]] = List(
Expand Down Expand Up @@ -307,23 +301,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
organizationName.value % previousScalaVCrossName % stableVersion.value
)
},
mimaBinaryIssueFilters ++= Mima.ignoredABIProblems
) ++ Seq(Compile, Test).flatMap(conf => inConfig(conf)(configSettings))

private def configSettings: Seq[Def.Setting[_]] = List(
// Workaround for https://github.com/scalacenter/scalafix/issues/1592:
// effectively skip scalafix[All] on 2.x projects not matching scalafixScalaBinaryVersion
scalafix / unmanagedSources := {
val prev = (scalafix / unmanagedSources).value
if (
Seq(scalafixScalaBinaryVersion.value, "3")
.contains(scalaBinaryVersion.value)
) {
prev
} else {
Seq()
}
},
mimaBinaryIssueFilters ++= Mima.ignoredABIProblems,
scalafixConfig := {
if (scalaBinaryVersion.value.startsWith("2"))
Some(file(".scalafix-scala2.conf"))
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Expand Up @@ -4,7 +4,7 @@ addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0")

// https://github.com/scala/bug/issues/12632
Expand Down
@@ -1,8 +1,9 @@
package scalafix.internal.compat

import scala.meta.internal.pc.ScalafixGlobal
import scala.tools.nsc.interactive.Global

import scala.meta.internal.pc.ScalafixGlobal

object CompilerCompat {
implicit class XtensionGlobal(global: Global) {
def closeCompat(): Unit = {
Expand Down
@@ -1,8 +1,8 @@
package test

import scala.collection.breakOut
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future

class LegacySyntheticsTest(xs: List[Int]) {
def m1(xs: Set[Int]): List[Int] =
Expand Down
@@ -1,6 +1,7 @@
package scalafix.tests.v0

import scala.meta._

import scalafix.tests.core.BaseSemanticSuite

class LegacySyntheticsSuite extends BaseSemanticSuite("LegacySyntheticsTest") {
Expand Down

0 comments on commit 33b30fe

Please sign in to comment.