diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-23 22:50:23 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-24 08:18:55 -0800 |
commit | f017b6e310dc433b5042e5d329e28d325d2efb0d (patch) | |
tree | afeb006c9ac81e49a33a2299fe7ca4e404cb1b33 /core/src/mill | |
parent | 0bd403a6d62de857804519a11ba376de27742660 (diff) | |
download | mill-f017b6e310dc433b5042e5d329e28d325d2efb0d.tar.gz mill-f017b6e310dc433b5042e5d329e28d325d2efb0d.tar.bz2 mill-f017b6e310dc433b5042e5d329e28d325d2efb0d.zip |
Remove obsolete `Loader` context API
Diffstat (limited to 'core/src/mill')
-rw-r--r-- | core/src/mill/eval/Evaluator.scala | 9 | ||||
-rw-r--r-- | core/src/mill/util/Ctx.scala | 14 |
2 files changed, 4 insertions, 19 deletions
diff --git a/core/src/mill/eval/Evaluator.scala b/core/src/mill/eval/Evaluator.scala index cdb17223..f1a34e69 100644 --- a/core/src/mill/eval/Evaluator.scala +++ b/core/src/mill/eval/Evaluator.scala @@ -6,7 +6,6 @@ import ammonite.ops._ import ammonite.runtime.SpecialClassLoader import mill.define.{Ctx => _, _} import mill.util -import mill.util.Ctx.Loader import mill.util._ import mill.util.Strict.Agg @@ -24,9 +23,6 @@ case class Labelled[T](target: NamedTask[T], case _ => None } } -object RootModuleLoader extends Loader[mill.Module] { - def make() = ??? -} class Evaluator[T](val workspacePath: Path, val basePath: Path, val rootModule: mill.Module, @@ -225,10 +221,7 @@ class Evaluator[T](val workspacePath: Path, targetInputValues.toArray[Any], paths.map(_.dest).orNull, groupBasePath.orNull, - multiLogger, - new Ctx.LoaderCtx{ - def load[T](x: Ctx.Loader[T]): T = ??? - } + multiLogger ) val out = System.out diff --git a/core/src/mill/util/Ctx.scala b/core/src/mill/util/Ctx.scala index 60e6bdbf..9f8d2826 100644 --- a/core/src/mill/util/Ctx.scala +++ b/core/src/mill/util/Ctx.scala @@ -2,7 +2,7 @@ package mill.util import ammonite.ops.Path import mill.define.Applicative.ImplicitStub -import mill.util.Ctx.{ArgCtx, BaseCtx, DestCtx, LoaderCtx, LogCtx} +import mill.util.Ctx.{ArgCtx, BaseCtx, DestCtx, LogCtx} import scala.annotation.compileTimeOnly import scala.language.implicitConversions @@ -33,25 +33,17 @@ object Ctx{ trait ArgCtx{ def args: IndexedSeq[_] } - trait LoaderCtx{ - def load[T](x: Loader[T]): T - } - trait Loader[T]{ - def make(): T - } + } class Ctx(val args: IndexedSeq[_], val dest: Path, val base: Path, - val log: Logger, - workerCtx0: Ctx.LoaderCtx) + val log: Logger) extends DestCtx with LogCtx with ArgCtx - with LoaderCtx with BaseCtx{ - def load[T](x: Ctx.Loader[T]): T = workerCtx0.load(x) def length = args.length def apply[T](index: Int): T = { if (index >= 0 && index < args.length) args(index).asInstanceOf[T] |