diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-03-19 08:15:32 -0700 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-03-19 09:38:19 -0700 |
commit | 1c507efbc4ce13ad39a056c4c77eb280f0b224e7 (patch) | |
tree | db6c19cddc837bd994f4ae334a639167e3743d8c /scalalib | |
parent | 7f9d508afe1e3e01ff0b5ed50e678d6798004b47 (diff) | |
parent | e7ac7323693edbdc350ec36b578ba3e101657360 (diff) | |
download | mill-1c507efbc4ce13ad39a056c4c77eb280f0b224e7.tar.gz mill-1c507efbc4ce13ad39a056c4c77eb280f0b224e7.tar.bz2 mill-1c507efbc4ce13ad39a056c4c77eb280f0b224e7.zip |
merge
Diffstat (limited to 'scalalib')
-rw-r--r-- | scalalib/src/mill/scalalib/GenIdea.scala | 7 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/ScalaModule.scala | 7 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/ScalaWorkerApi.scala | 2 |
3 files changed, 10 insertions, 6 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 e5a20e7e..bf68218c 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) } @@ -316,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){ @@ -382,7 +385,7 @@ trait TestModule extends ScalaModule with TaskModule { runClasspath().map(_.path.toString) ++ Seq(args.length.toString) ++ args ++ - Seq(outputPath.toString, T.ctx().log.colored.toString, compile().classes.path.toString), + Seq(outputPath.toString, T.ctx().log.colored.toString, compile().classes.path.toString, T.ctx().home.toString), workingDir = forkWorkingDir ) 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] |