Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Aug 26, 2024
1 parent 3b7e4e8 commit 71ee84b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mill-scalafix/src/com/goyeau/mill/scalafix/ScalafixModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import scala.compat.java8.OptionConverters.*
import scala.jdk.CollectionConverters.*

trait ScalafixModule extends ScalaModule {
def scalafixConfig: T[Option[Path]] = T(None)
def scalafixConfig: T[Option[os.Path]] = T(None)
def scalafixIvyDeps: T[Agg[Dep]] = Agg.empty[Dep]
def scalafixScalaBinaryVersion: T[String] = "2.12"

Expand Down Expand Up @@ -41,26 +41,26 @@ object ScalafixModule {
def fixAction(
log: Logger,
repositories: Seq[Repository],
sources: Seq[Path],
classpath: Seq[Path],
sources: Seq[os.Path],
classpath: Seq[os.Path],
scalaVersion: String,
scalaBinaryVersion: String,
scalacOptions: Seq[String],
scalafixIvyDeps: Agg[Dep],
scalafixConfig: Option[Path],
scalafixConfig: Option[os.Path],
args: String*
): Result[Unit] = fixAction(log, repositories, sources, classpath, scalaVersion, scalaBinaryVersion, scalacOptions, scalafixIvyDeps, scalafixConfig, args, os.pwd)

def fixAction(
log: Logger,
repositories: Seq[Repository],
sources: Seq[Path],
classpath: Seq[Path],
sources: Seq[os.Path],
classpath: Seq[os.Path],
scalaVersion: String,
scalaBinaryVersion: String,
scalacOptions: Seq[String],
scalafixIvyDeps: Agg[Dep],
scalafixConfig: Option[Path],
scalafixConfig: Option[os.Path],
args: Seq[String],
wd: os.Path
): Result[Unit] =
Expand All @@ -69,7 +69,7 @@ object ScalafixModule {
.fetchAndClassloadInstance(scalaBinaryVersion, repositories.map(CoursierUtils.toApiRepository).asJava)
.newArguments()
.withParsedArguments(args.asJava)
.withWorkingDirectory(pwd.toNIO)
.withWorkingDirectory(wd.toNIO)
.withConfig(scalafixConfig.map(_.toNIO).asJava)
.withClasspath(classpath.map(_.toNIO).asJava)
.withScalaVersion(scalaVersion)
Expand Down

0 comments on commit 71ee84b

Please sign in to comment.