diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-20 21:05:08 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-20 21:05:08 -0800 |
commit | a874888794033c909a95fafe2eeb7f6d3d3fd433 (patch) | |
tree | f186d8e146c57ea70bdad57593e576ec874cd780 /core | |
parent | d35e590619e38c4785b075a54a2c3c99ba609376 (diff) | |
download | mill-a874888794033c909a95fafe2eeb7f6d3d3fd433.tar.gz mill-a874888794033c909a95fafe2eeb7f6d3d3fd433.tar.bz2 mill-a874888794033c909a95fafe2eeb7f6d3d3fd433.zip |
First pass at cleaning up evaluator caching system
Diffstat (limited to 'core')
-rw-r--r-- | core/src/mill/eval/Evaluator.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/mill/eval/Evaluator.scala b/core/src/mill/eval/Evaluator.scala index 23a06cc2..de0f2660 100644 --- a/core/src/mill/eval/Evaluator.scala +++ b/core/src/mill/eval/Evaluator.scala @@ -28,7 +28,6 @@ case class Labelled[T](task: NamedTask[T], case class Evaluator[T](outPath: Path, externalOutPath: Path, rootModule: mill.define.BaseModule, - discover: Discover[T], log: Logger, classLoaderSig: Seq[(Path, Long)] = Evaluator.classLoaderSig, workerCache: mutable.Map[Segments, (Int, Any)] = mutable.Map.empty){ @@ -48,7 +47,7 @@ case class Evaluator[T](outPath: Path, case c: mill.define.Command[_] => def findMatching(cls: Class[_]): Option[Seq[(Int, EntryPoint[_])]] = { - discover.value.get(cls) match{ + rootModule.millDiscover.value.get(cls) match{ case Some(v) => Some(v) case None => cls.getSuperclass match{ @@ -329,6 +328,10 @@ case class Evaluator[T](outPath: Path, object Evaluator{ + case class State(rootModule: mill.define.BaseModule, + classLoaderSig: Seq[(Path, Long)], + workerCache: mutable.Map[Segments, (Int, Any)], + watched: Seq[(Path, Long)]) // This needs to be a ThreadLocal because we need to pass it into the body of // the TargetScopt#read call, which does not accept additional parameters. // Until we migrate our CLI parsing off of Scopt (so we can pass the BaseModule |