Skip to content

Commit

Permalink
reflect what is actually provided as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaglin committed Sep 29, 2024
1 parent ce60dc6 commit 1324ec2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/scala/scalafix/internal/sbt/ScalafixInterface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ object ScalafixInterface {

type Cache = BlockingCache[
(
String, // scalafixScalaBinaryVersion
String, // scalafixScalaMajorMinorVersion
Option[Arg.ToolClasspath]
),
(
Expand All @@ -139,7 +139,7 @@ object ScalafixInterface {

def apply(
cache: Cache,
scalafixScalaBinaryVersion: String,
scalafixScalaMajorMinorVersion: String,
toolClasspath: Arg.ToolClasspath,
logger: Logger,
callback: ScalafixMainCallback
Expand All @@ -150,7 +150,7 @@ object ScalafixInterface {
// shared as much as possible.
val (buildinRulesInterface, _) = cache.compute(
(
scalafixScalaBinaryVersion,
scalafixScalaMajorMinorVersion,
None
),
{
Expand All @@ -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()
Expand Down Expand Up @@ -197,7 +197,7 @@ object ScalafixInterface {

val (toolClasspathInterface, _) = cache.compute(
(
scalafixScalaBinaryVersion,
scalafixScalaMajorMinorVersion,
Some(toolClasspath)
),
{
Expand Down

0 comments on commit 1324ec2

Please sign in to comment.