From c92a5d40e75f1e9de85562e9eab64223005d69ee Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Mon, 30 Sep 2024 00:01:42 +0200 Subject: [PATCH] reflect what is actually provided as argument --- .../scalafix/internal/sbt/ScalafixInterface.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/scala/scalafix/internal/sbt/ScalafixInterface.scala b/src/main/scala/scalafix/internal/sbt/ScalafixInterface.scala index 55183607..95c14225 100644 --- a/src/main/scala/scalafix/internal/sbt/ScalafixInterface.scala +++ b/src/main/scala/scalafix/internal/sbt/ScalafixInterface.scala @@ -126,7 +126,7 @@ object ScalafixInterface { type Cache = BlockingCache[ ( - String, // scalafixScalaBinaryVersion + String, // scalafixScalaMajorMinorVersion Option[Arg.ToolClasspath] ), ( @@ -139,7 +139,7 @@ object ScalafixInterface { def apply( cache: Cache, - scalafixScalaBinaryVersion: String, + scalafixScalaMajorMinorVersion: String, toolClasspath: Arg.ToolClasspath, logger: Logger, callback: ScalafixMainCallback @@ -150,7 +150,7 @@ object ScalafixInterface { // shared as much as possible. val (buildinRulesInterface, _) = cache.compute( ( - scalafixScalaBinaryVersion, + scalafixScalaMajorMinorVersion, None ), { @@ -159,14 +159,14 @@ object ScalafixInterface { None case None => // cache miss, resolve scalafix artifacts and classload them - if (scalafixScalaBinaryVersion.startsWith("2.11")) + if (scalafixScalaMajorMinorVersion.startsWith("2.11")) logger.error( "Scala 2.11 is no longer supported. Please downgrade to the final version supporting " + "it: sbt-scalafix 0.10.4." ) val scalafixArguments = ScalafixAPI .fetchAndClassloadInstance( - scalafixScalaBinaryVersion, + scalafixScalaMajorMinorVersion, toolClasspath.repositories.asJava ) .newArguments() @@ -197,7 +197,7 @@ object ScalafixInterface { val (toolClasspathInterface, _) = cache.compute( ( - scalafixScalaBinaryVersion, + scalafixScalaMajorMinorVersion, Some(toolClasspath) ), {