diff options
author | Robby <robby@santoslab.org> | 2018-03-19 10:13:03 -0500 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-03-19 08:13:03 -0700 |
commit | e7ac7323693edbdc350ec36b578ba3e101657360 (patch) | |
tree | 34851720f0698eea29b659693ee836b9ddcb9dad /scalalib/src | |
parent | 27112151475e17845fa2675e2710cba77e9a0ede (diff) | |
download | mill-e7ac7323693edbdc350ec36b578ba3e101657360.tar.gz mill-e7ac7323693edbdc350ec36b578ba3e101657360.tar.bz2 mill-e7ac7323693edbdc350ec36b578ba3e101657360.zip |
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!
Diffstat (limited to 'scalalib/src')
-rw-r--r-- | scalalib/src/mill/scalalib/GenIdea.scala | 7 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/ScalaModule.scala | 3 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/ScalaWorkerApi.scala | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/scalalib/src/mill/scalalib/GenIdea.scala b/scalalib/src/mill/scalalib/GenIdea.scala index b096ec67..30456c05 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 58a325d0..06b6f0c6 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 91222524..84db1dd8 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] |