diff options
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/mill/eval/Evaluator.scala | 1 | ||||
-rw-r--r-- | core/src/main/scala/mill/main/RunScript.scala | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/core/src/main/scala/mill/eval/Evaluator.scala b/core/src/main/scala/mill/eval/Evaluator.scala index 8f9ff8a2..44f24275 100644 --- a/core/src/main/scala/mill/eval/Evaluator.scala +++ b/core/src/main/scala/mill/eval/Evaluator.scala @@ -34,7 +34,6 @@ class Evaluator[T](val workspacePath: Path, val classLoaderSig: Seq[(Path, Long)] = Evaluator.classLoaderSig){ - val workerCache = mutable.Map.empty[Ctx.Loader[_], Any] workerCache(RootModuleLoader) = rootModule def evaluate(goals: Agg[Task[_]]): Evaluator.Results = { diff --git a/core/src/main/scala/mill/main/RunScript.scala b/core/src/main/scala/mill/main/RunScript.scala index 010f134b..aa254048 100644 --- a/core/src/main/scala/mill/main/RunScript.scala +++ b/core/src/main/scala/mill/main/RunScript.scala @@ -4,6 +4,7 @@ import java.nio.file.NoSuchFileException import ammonite.interp.Interpreter import ammonite.ops.{Path, read} +import ammonite.runtime.SpecialClassLoader import ammonite.util.Util.CodeSource import ammonite.util.{Name, Res, Util} import mill.{PathRef, define} @@ -40,7 +41,13 @@ object RunScript{ interp.watch(path) val eval = for((mapping, discover) <- evaluateMapping(wd, path, interp)) - yield (new Evaluator(wd / 'out, wd, mapping, log), discover) + yield ( + new Evaluator( + wd / 'out, wd, mapping, log, + mapping.getClass.getClassLoader.asInstanceOf[SpecialClassLoader].classpathSignature + ), + discover + ) (eval, interp.watchedFiles) } } |