From 70cd602a1186aa7d75104d2831ef170cc0229534 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Sun, 18 Mar 2018 14:12:28 -0400 Subject: [PATCH 1/5] Update 1 - Intro to Mill.md (#242) --- docs/pages/1 - Intro to Mill.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/1 - Intro to Mill.md b/docs/pages/1 - Intro to Mill.md index 63b69601da4..be5ce05067e 100644 --- a/docs/pages/1 - Intro to Mill.md +++ b/docs/pages/1 - Intro to Mill.md @@ -99,9 +99,9 @@ $ mill foo.jar # bundle the classfiles into a jar $ mill foo.assembly # bundle classfiles and all dependencies into a jar -$ mill foo.console # start a Scala console within your project +$ mill -i foo.console # start a Scala console within your project (in interactive mode: "-i") -$ mill foo.repl # start an Ammonite REPL within your project +$ mill -i foo.repl # start an Ammonite REPL within your project (in interactive mode: "-i") ``` You can run `mill resolve __` to see a full list of the different tasks that are From 5136a64f92ae2f73be30516974fe49b058f501c5 Mon Sep 17 00:00:00 2001 From: Robby Date: Mon, 19 Mar 2018 07:42:11 -0500 Subject: [PATCH 2/5] Fixed AppVeyor cache config. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index a8c4da3a178..8c25b7eee36 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,7 +24,7 @@ environment: JAVA_HOME: C:\Program Files\Java\jdk9 cache: - - build.sc -> '%LOCALAPPDATA%\Coursier\cache' + - '%LOCALAPPDATA%\Coursier\cache' -> build.sc install: - SET MILL_URL=https://github.com/lihaoyi/mill/releases/download/0.1.6/0.1.6-3-43d230 From 8a94f39745265a026ce9ba4a6c77bb304a38834d Mon Sep 17 00:00:00 2001 From: Robby Date: Mon, 19 Mar 2018 07:45:40 -0500 Subject: [PATCH 3/5] Fixed AppVeyor cache config. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 8c25b7eee36..781a0c1f5ee 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,7 +24,7 @@ environment: JAVA_HOME: C:\Program Files\Java\jdk9 cache: - - '%LOCALAPPDATA%\Coursier\cache' -> build.sc + - '%LOCALAPPDATA%\Coursier\cache' install: - SET MILL_URL=https://github.com/lihaoyi/mill/releases/download/0.1.6/0.1.6-3-43d230 From 27112151475e17845fa2675e2710cba77e9a0ede Mon Sep 17 00:00:00 2001 From: Gabriele Petronella Date: Tue, 20 Mar 2018 00:10:33 +0900 Subject: [PATCH 4/5] Propagate more things into Tests of ScalaModule (#236) --- scalalib/src/mill/scalalib/ScalaModule.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scalalib/src/mill/scalalib/ScalaModule.scala b/scalalib/src/mill/scalalib/ScalaModule.scala index c06fb8f3e94..58a325d0be9 100644 --- a/scalalib/src/mill/scalalib/ScalaModule.scala +++ b/scalalib/src/mill/scalalib/ScalaModule.scala @@ -19,6 +19,9 @@ trait ScalaModule extends mill.Module with TaskModule { outer => def defaultCommandName() = "run" trait Tests extends TestModule{ def scalaVersion = outer.scalaVersion() + override def repositories = outer.repositories + override def scalacPluginIvyDeps = outer.scalacPluginIvyDeps + override def scalacOptions = outer.scalacOptions override def scalaWorker = outer.scalaWorker override def moduleDeps = Seq(outer) } From e7ac7323693edbdc350ec36b578ba3e101657360 Mon Sep 17 00:00:00 2001 From: Robby Date: Mon, 19 Mar 2018 10:13:03 -0500 Subject: [PATCH 5/5] Java 9 optimization by caching rt.jar (#239) * Upgraded Ammonite to 1.0.5-7-f032887 that includes a Java 9 performance optimization for mill's client-server mode (lihaoyi/Ammonite#773). * Java 9 optimization for interactive mode by caching rt.jar. * Refactored based on @lihaoyi's comments on #239. * Removed client side rt.jar caching. * Propagatio of home path from Cli. * Propagation, propagation, propagation! --- build.sc | 4 +-- .../src/mill/clientserver/Client.java | 7 ---- core/src/mill/eval/Evaluator.scala | 6 ++-- core/src/mill/util/ClassLoader.scala | 11 +++++-- core/src/mill/util/Ctx.scala | 11 +++++-- main/src/mill/Main.scala | 6 ++-- main/src/mill/main/MainRunner.scala | 1 + main/src/mill/main/ReplApplyHandler.scala | 5 ++- main/src/mill/main/RunScript.scala | 5 +-- main/src/mill/modules/Jvm.scala | 3 +- main/test/src/mill/util/TestEvaluator.scala | 2 +- .../src/mill/scalajslib/ScalaJSBridge.scala | 13 +++++--- .../src/mill/scalajslib/ScalaJSModule.scala | 2 +- scalalib/src/mill/scalalib/GenIdea.scala | 7 ++-- scalalib/src/mill/scalalib/ScalaModule.scala | 3 +- .../src/mill/scalalib/ScalaWorkerApi.scala | 2 +- .../src/mill/scalaworker/ScalaWorker.scala | 32 +++++++++++-------- 17 files changed, 74 insertions(+), 46 deletions(-) diff --git a/build.sc b/build.sc index c012c77b360..d0d3ea3a374 100755 --- a/build.sc +++ b/build.sc @@ -69,7 +69,7 @@ trait MillModule extends MillPublishModule{ outer => object clientserver extends MillModule{ def ivyDeps = Agg( - ivy"com.lihaoyi:::ammonite:1.0.5-4-c0cdbaf", + ivy"com.lihaoyi:::ammonite:1.0.5-7-f032887", ivy"org.scala-sbt.ipcsocket:ipcsocket:1.0.0" ) val test = new Tests(implicitly) @@ -84,7 +84,7 @@ object core extends MillModule { def ivyDeps = Agg( ivy"com.lihaoyi::sourcecode:0.1.4", - ivy"com.lihaoyi:::ammonite:1.0.5-4-c0cdbaf", + ivy"com.lihaoyi:::ammonite:1.0.5-7-f032887", ivy"jline:jline:2.14.5" ) diff --git a/clientserver/src/mill/clientserver/Client.java b/clientserver/src/mill/clientserver/Client.java index eab8c5b5467..261f69b1e59 100644 --- a/clientserver/src/mill/clientserver/Client.java +++ b/clientserver/src/mill/clientserver/Client.java @@ -1,6 +1,5 @@ package mill.clientserver; -import io.github.retronym.java9rtexport.Export; import org.scalasbt.ipcsocket.*; import java.io.*; @@ -8,7 +7,6 @@ import java.net.URISyntaxException; import java.net.URL; import java.nio.channels.FileChannel; -import java.nio.file.Files; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; @@ -29,11 +27,6 @@ static void initServer(String lockBase, boolean setJnaNoSys) throws IOException, } if (!System.getProperty("java.specification.version").startsWith("1.")) { selfJars.addAll(Arrays.asList(System.getProperty("java.class.path").split(File.pathSeparator))); - File rtFile = new File(lockBase + "/rt-" + System.getProperty("java.version") + ".jar"); - if (!rtFile.exists()) { - Files.copy(Export.export().toPath(), rtFile.toPath()); - } - selfJars.add(rtFile.getCanonicalPath()); } ArrayList l = new java.util.ArrayList(); l.add("java"); diff --git a/core/src/mill/eval/Evaluator.scala b/core/src/mill/eval/Evaluator.scala index e61c2c4c780..1e1b8b35241 100644 --- a/core/src/mill/eval/Evaluator.scala +++ b/core/src/mill/eval/Evaluator.scala @@ -26,7 +26,8 @@ case class Labelled[T](task: NamedTask[T], case _ => None } } -case class Evaluator[T](outPath: Path, +case class Evaluator[T](home: Path, + outPath: Path, externalOutPath: Path, rootModule: mill.define.BaseModule, log: Logger, @@ -265,7 +266,8 @@ case class Evaluator[T](outPath: Path, throw new Exception("No `dest` folder available here") } }, - multiLogger + multiLogger, + home ) val out = System.out diff --git a/core/src/mill/util/ClassLoader.scala b/core/src/mill/util/ClassLoader.scala index a1b42158c99..b53150c2d09 100644 --- a/core/src/mill/util/ClassLoader.scala +++ b/core/src/mill/util/ClassLoader.scala @@ -5,7 +5,9 @@ import java.net.{URL, URLClassLoader} import io.github.retronym.java9rtexport.Export object ClassLoader { - def create(urls: Seq[URL], parent: java.lang.ClassLoader): URLClassLoader = { + def create(urls: Seq[URL], + parent: java.lang.ClassLoader) + (implicit ctx: Ctx.Home): URLClassLoader = { val cl = new URLClassLoader(urls.toArray, parent) if (!ammonite.util.Util.java9OrAbove) return cl try { @@ -13,7 +15,12 @@ object ClassLoader { cl } catch { case _: ClassNotFoundException => - new URLClassLoader((urls ++ Some(Export.export().toURI.toURL)).toArray, parent) + val path = ctx.home + val rtFile = new java.io.File(path.toIO, s"rt-${System.getProperty("java.version")}.jar") + if (!rtFile.exists) { + java.nio.file.Files.copy(Export.export().toPath, rtFile.toPath) + } + new URLClassLoader((urls ++ Some(rtFile.toURI.toURL)).toArray, parent) } } } diff --git a/core/src/mill/util/Ctx.scala b/core/src/mill/util/Ctx.scala index 55cc05ab2b5..998181941d4 100644 --- a/core/src/mill/util/Ctx.scala +++ b/core/src/mill/util/Ctx.scala @@ -20,6 +20,9 @@ object Ctx{ trait Log{ def log: Logger } + trait Home{ + def home: Path + } object Log{ implicit def logToCtx(l: Logger): Log = new Log { def log = l } } @@ -27,13 +30,17 @@ object Ctx{ def args: IndexedSeq[_] } + def defaultHome = ammonite.ops.home / ".mill" / "ammonite" + } class Ctx(val args: IndexedSeq[_], dest0: () => Path, - val log: Logger) + val log: Logger, + val home: Path) extends Ctx.Dest with Ctx.Log - with Ctx.Args{ + with Ctx.Args + with Ctx.Home{ def dest = dest0() def length = args.length diff --git a/main/src/mill/Main.scala b/main/src/mill/Main.scala index 6c10f6f27a0..a899c8c666d 100644 --- a/main/src/mill/Main.scala +++ b/main/src/mill/Main.scala @@ -59,7 +59,7 @@ object Main { val millArgSignature = Cli.genericSignature.filter(a => !removed(a.name)) :+ interactiveSignature - val millHome = home / ".mill" / "ammonite" + val millHome = mill.util.Ctx.defaultHome Cli.groupArgs( args.toList, @@ -88,12 +88,14 @@ object Main { stderr.println("Build repl needs to be run with the -i/--interactive flag") (false, stateCache) }else{ + val tqs = "\"\"\"" val config = if(!repl) cliConfig else cliConfig.copy( predefCode = - """import $file.build, build._ + s"""import $$file.build, build._ |implicit val replApplyHandler = mill.main.ReplApplyHandler( + | ammonite.ops.Path($tqs${cliConfig.home.toIO.getCanonicalPath.replaceAllLiterally("$", "$$")}$tqs), | interp.colors(), | repl.pprinter(), | build.millSelf.get, diff --git a/main/src/mill/main/MainRunner.scala b/main/src/mill/main/MainRunner.scala index ff7bcbbd8f3..efebd5a5067 100644 --- a/main/src/mill/main/MainRunner.scala +++ b/main/src/mill/main/MainRunner.scala @@ -62,6 +62,7 @@ class MainRunner(val config: ammonite.main.Cli.Config, printing = true, mainCfg => { val (result, interpWatched) = RunScript.runScript( + config.home, mainCfg.wd, scriptPath, mainCfg.instantiateInterpreter(), diff --git a/main/src/mill/main/ReplApplyHandler.scala b/main/src/mill/main/ReplApplyHandler.scala index a2b042ad80b..9ce3014292f 100644 --- a/main/src/mill/main/ReplApplyHandler.scala +++ b/main/src/mill/main/ReplApplyHandler.scala @@ -1,6 +1,7 @@ package mill.main +import ammonite.ops.Path import mill.define.Applicative.ApplyHandler import mill.define.Segment.Label import mill.define._ @@ -9,13 +10,15 @@ import mill.util.Strict.Agg import scala.collection.mutable object ReplApplyHandler{ - def apply[T](colors: ammonite.util.Colors, + def apply[T](home: Path, + colors: ammonite.util.Colors, pprinter0: pprint.PPrinter, rootModule: mill.define.BaseModule, discover: Discover[_]) = { new ReplApplyHandler( pprinter0, new Evaluator( + home, ammonite.ops.pwd / 'out, ammonite.ops.pwd / 'out, rootModule, diff --git a/main/src/mill/main/RunScript.scala b/main/src/mill/main/RunScript.scala index 553f5b69e3e..4d8653fb042 100644 --- a/main/src/mill/main/RunScript.scala +++ b/main/src/mill/main/RunScript.scala @@ -23,7 +23,8 @@ import scala.reflect.ClassTag * subsystem */ object RunScript{ - def runScript(wd: Path, + def runScript(home: Path, + wd: Path, path: Path, instantiateInterpreter: => Either[(Res.Failing, Seq[(Path, Long)]), ammonite.interp.Interpreter], scriptArgs: Seq[String], @@ -52,7 +53,7 @@ object RunScript{ val evalRes = for(s <- evalState) - yield new Evaluator[Any](wd / 'out, wd / 'out, s.rootModule, log, s.classLoaderSig, s.workerCache) + yield new Evaluator[Any](home, wd / 'out, wd / 'out, s.rootModule, log, s.classLoaderSig, s.workerCache) val evaluated = for{ evaluator <- evalRes diff --git a/main/src/mill/modules/Jvm.scala b/main/src/mill/modules/Jvm.scala index d71cf75c9bd..2ded95dbc98 100644 --- a/main/src/mill/modules/Jvm.scala +++ b/main/src/mill/modules/Jvm.scala @@ -101,7 +101,8 @@ object Jvm { def inprocess[T](classPath: Agg[Path], classLoaderOverrideSbtTesting: Boolean, - body: ClassLoader => T): T = { + body: ClassLoader => T) + (implicit ctx: Ctx.Home): T = { val cl = if (classLoaderOverrideSbtTesting) { val outerClassLoader = getClass.getClassLoader new URLClassLoader(classPath.map(_.toIO.toURI.toURL).toArray, mill.util.ClassLoader.create(Seq(), null)){ diff --git a/main/test/src/mill/util/TestEvaluator.scala b/main/test/src/mill/util/TestEvaluator.scala index 078254f1f28..ffff4b99432 100644 --- a/main/test/src/mill/util/TestEvaluator.scala +++ b/main/test/src/mill/util/TestEvaluator.scala @@ -30,7 +30,7 @@ class TestEvaluator[T <: TestUtil.BaseModule](module: T) // true, // ammonite.util.Colors.Default, System.out, System.out, System.err, System.in // ) - val evaluator = new Evaluator(outPath, TestEvaluator.externalOutPath, module, logger) + val evaluator = new Evaluator(Ctx.defaultHome, outPath, TestEvaluator.externalOutPath, module, logger) def apply[T](t: Task[T]): Either[Result.Failing[T], (T, Int)] = { val evaluated = evaluator.evaluate(Agg(t)) diff --git a/scalajslib/src/mill/scalajslib/ScalaJSBridge.scala b/scalajslib/src/mill/scalajslib/ScalaJSBridge.scala index 507d8af769f..59ed6450e05 100644 --- a/scalajslib/src/mill/scalajslib/ScalaJSBridge.scala +++ b/scalajslib/src/mill/scalajslib/ScalaJSBridge.scala @@ -5,6 +5,7 @@ import java.net.URLClassLoader import ammonite.ops.Path import mill.define.Discover +import mill.util.Ctx import mill.{Agg, T} sealed trait OptimizeMode @@ -21,7 +22,8 @@ object ModuleKind{ class ScalaJSWorker { private var scalaInstanceCache = Option.empty[(Long, ScalaJSBridge)] - private def bridge(toolsClasspath: Agg[Path]) = { + private def bridge(toolsClasspath: Agg[Path]) + (implicit ctx: Ctx.Home) = { val classloaderSig = toolsClasspath.map(p => p.toString().hashCode + p.mtime.toMillis).sum scalaInstanceCache match { @@ -47,7 +49,8 @@ class ScalaJSWorker { dest: File, main: Option[String], fullOpt: Boolean, - moduleKind: ModuleKind): Unit = { + moduleKind: ModuleKind) + (implicit ctx: Ctx.Home): Unit = { bridge(toolsClasspath).link( sources.items.map(_.toIO).toArray, libraries.items.map(_.toIO).toArray, @@ -58,14 +61,16 @@ class ScalaJSWorker { ) } - def run(toolsClasspath: Agg[Path], config: NodeJSConfig, linkedFile: File): Unit = { + def run(toolsClasspath: Agg[Path], config: NodeJSConfig, linkedFile: File) + (implicit ctx: Ctx.Home): Unit = { bridge(toolsClasspath).run(config, linkedFile) } def getFramework(toolsClasspath: Agg[Path], config: NodeJSConfig, frameworkName: String, - linkedFile: File): (() => Unit, sbt.testing.Framework) = { + linkedFile: File) + (implicit ctx: Ctx.Home): (() => Unit, sbt.testing.Framework) = { bridge(toolsClasspath).getFramework(config, frameworkName, linkedFile) } diff --git a/scalajslib/src/mill/scalajslib/ScalaJSModule.scala b/scalajslib/src/mill/scalajslib/ScalaJSModule.scala index 92c071c201b..099b8bc2f46 100644 --- a/scalajslib/src/mill/scalajslib/ScalaJSModule.scala +++ b/scalajslib/src/mill/scalajslib/ScalaJSModule.scala @@ -117,7 +117,7 @@ trait ScalaJSModule extends scalalib.ScalaModule { outer => runClasspath: Agg[PathRef], mainClass: Option[String], mode: OptimizeMode, - moduleKind: ModuleKind)(implicit ctx: Ctx.Dest): PathRef = { + moduleKind: ModuleKind)(implicit ctx: Ctx): PathRef = { val outputPath = ctx.dest / "out.js" mkdir(ctx.dest) diff --git a/scalalib/src/mill/scalalib/GenIdea.scala b/scalalib/src/mill/scalalib/GenIdea.scala index b096ec678a0..30456c05efc 100644 --- a/scalalib/src/mill/scalalib/GenIdea.scala +++ b/scalalib/src/mill/scalalib/GenIdea.scala @@ -6,9 +6,10 @@ import coursier.maven.MavenRepository import mill.define._ import mill.eval.{Evaluator, PathRef, Result} import mill.{T, scalalib} -import mill.util.Ctx.Log +import mill.util.Ctx.{Home, Log} import mill.util.{Loose, PrintLogger, Strict} import mill.util.Strict.Agg + import scala.util.Try @@ -27,7 +28,7 @@ object GenIdeaModule extends ExternalModule { } object GenIdea { - def apply(ctx: Log, + def apply(ctx: Log with Home, rootModule: BaseModule, discover: Discover[_]): Unit = { val pp = new scala.xml.PrettyPrinter(999, 4) @@ -38,7 +39,7 @@ object GenIdea { rm! pwd/".idea_modules" - val evaluator = new Evaluator(pwd / 'out, pwd / 'out, rootModule, ctx.log) + val evaluator = new Evaluator(ctx.home, pwd / 'out, pwd / 'out, rootModule, ctx.log) for((relPath, xml) <- xmlFileLayout(evaluator, rootModule, jdkInfo)){ write.over(pwd/relPath, pp.format(xml)) diff --git a/scalalib/src/mill/scalalib/ScalaModule.scala b/scalalib/src/mill/scalalib/ScalaModule.scala index 58a325d0be9..06b6f0c6685 100644 --- a/scalalib/src/mill/scalalib/ScalaModule.scala +++ b/scalalib/src/mill/scalalib/ScalaModule.scala @@ -319,7 +319,7 @@ trait ScalaModule extends mill.Module with TaskModule { outer => } def ammoniteReplClasspath = T{ - resolveDeps(T.task{Agg(ivy"com.lihaoyi:::ammonite:1.0.5-4-c0cdbaf")})() + resolveDeps(T.task{Agg(ivy"com.lihaoyi:::ammonite:1.0.5-7-f032887")})() } def repl() = T.command{ if (T.ctx().log.inStream == DummyInputStream){ @@ -379,6 +379,7 @@ trait TestModule extends ScalaModule with TaskModule { jvmArgs = forkArgs(), envArgs = forkEnv(), mainArgs = Seq( + T.ctx().home.toString, testFrameworks().mkString(" "), runClasspath().map(_.path).mkString(" "), Seq(compile().classes.path).mkString(" "), diff --git a/scalalib/src/mill/scalalib/ScalaWorkerApi.scala b/scalalib/src/mill/scalalib/ScalaWorkerApi.scala index 912225245aa..84db1dd8508 100644 --- a/scalalib/src/mill/scalalib/ScalaWorkerApi.scala +++ b/scalalib/src/mill/scalalib/ScalaWorkerApi.scala @@ -67,7 +67,7 @@ trait ScalaWorkerApi { entireClasspath: Agg[Path], testClassfilePath: Agg[Path], args: Seq[String]) - (implicit ctx: mill.util.Ctx.Log): (String, Seq[Result]) + (implicit ctx: mill.util.Ctx.Log with mill.util.Ctx.Home): (String, Seq[Result]) def discoverMainClasses(compilationResult: CompilationResult) (implicit ctx: mill.util.Ctx): Seq[String] diff --git a/scalaworker/src/mill/scalaworker/ScalaWorker.scala b/scalaworker/src/mill/scalaworker/ScalaWorker.scala index ca20ccf12b0..c74768a5aab 100644 --- a/scalaworker/src/mill/scalaworker/ScalaWorker.scala +++ b/scalaworker/src/mill/scalaworker/ScalaWorker.scala @@ -36,24 +36,28 @@ object ScalaWorker{ def main(args: Array[String]): Unit = { try{ - val (frameworks, classpath, testCp, arguments, outputPath, colored) = args match { - case Array(fs, cp, tcp, op, c) => (fs, cp, tcp, "", op, c) - case Array(fs, cp, tcp, as, op, c) => (fs, cp, tcp, as, op, c) + val (hm, frameworks, classpath, testCp, arguments, outputPath, colored) = args match { + case Array(h, fs, cp, tcp, op, c) => (h, fs, cp, tcp, "", op, c) + case Array(h, fs, cp, tcp, as, op, c) => (h, fs, cp, tcp, as, op, c) + } + val ctx = new Ctx.Log with Ctx.Home { + val log = PrintLogger( + colored == "true", + if(colored == "true") Colors.Default + else Colors.BlackWhite, + System.out, + System.err, + System.err, + System.in + ) + val home = Path(hm) } val result = new ScalaWorker(null, null).runTests( frameworkInstances = TestRunner.frameworks(frameworks.split(" ")), entireClasspath = Agg.from(classpath.split(" ").map(Path(_))), testClassfilePath = Agg.from(testCp.split(" ").map(Path(_))), args = arguments match{ case "" => Nil case x => x.split(" ").toList } - )(new PrintLogger( - colored == "true", - if(colored == "true") Colors.Default - else Colors.BlackWhite, - System.out, - System.err, - System.err, - System.in - )) + )(ctx) ammonite.ops.write(Path(outputPath), upickle.default.write(result)) }catch{case e: Throwable => @@ -89,7 +93,7 @@ class ScalaWorker(ctx0: mill.util.Ctx, .get val sourceFolder = mill.modules.Util.unpackZip(sourceJar)(workingDir) - val classloader = mill.util.ClassLoader.create(compilerJars.map(_.toURI.toURL), null) + val classloader = mill.util.ClassLoader.create(compilerJars.map(_.toURI.toURL), null)(ctx0) val scalacMain = classloader.loadClass("scala.tools.nsc.Main") val argsArray = Array[String]( "-d", compiledDest.toString, @@ -250,7 +254,7 @@ class ScalaWorker(ctx0: mill.util.Ctx, entireClasspath: Agg[Path], testClassfilePath: Agg[Path], args: Seq[String]) - (implicit ctx: mill.util.Ctx.Log): (String, Seq[Result]) = { + (implicit ctx: Ctx.Log with Ctx.Home): (String, Seq[Result]) = { Jvm.inprocess(entireClasspath, classLoaderOverrideSbtTesting = true, cl => { val frameworks = frameworkInstances(cl)