diff options
author | Roman Timushev <rtimush@gmail.com> | 2017-12-11 11:54:22 +0100 |
---|---|---|
committer | Roman Timushev <rtimush@gmail.com> | 2017-12-11 18:07:09 +0100 |
commit | b98c1ced9236eca4e23ccd4c7fe98d946a7308e8 (patch) | |
tree | eed35a1217e1d6bee7d228ada2aa8381234f17e9 | |
parent | bb61c05217671e80ba381b2cac869130c306baa8 (diff) | |
download | mill-b98c1ced9236eca4e23ccd4c7fe98d946a7308e8.tar.gz mill-b98c1ced9236eca4e23ccd4c7fe98d946a7308e8.tar.bz2 mill-b98c1ced9236eca4e23ccd4c7fe98d946a7308e8.zip |
Fix task cache in REPL
-rw-r--r-- | core/src/main/scala/mill/eval/Evaluator.scala | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/src/main/scala/mill/eval/Evaluator.scala b/core/src/main/scala/mill/eval/Evaluator.scala index b4f4413f..63dd0813 100644 --- a/core/src/main/scala/mill/eval/Evaluator.scala +++ b/core/src/main/scala/mill/eval/Evaluator.scala @@ -1,5 +1,6 @@ package mill.eval +import java.net.URLClassLoader import ammonite.ops._ import ammonite.runtime.SpecialClassLoader import mill.define.{Graph, Target, Task} @@ -67,9 +68,12 @@ class Evaluator(workspacePath: Path, val externalInputs = group.items.flatMap(_.inputs).filter(!group.contains(_)) // check if the build itself has changed - val classLoaderSig = Thread.currentThread().getContextClassLoader match { - case scl: SpecialClassLoader => scl.classpathSignature - case _ => Nil + val classLoaderSig = group.toVector.map { task => + task.getClass.getClassLoader match { + case scl: SpecialClassLoader => scl.classpathSignature + case ucl: URLClassLoader => SpecialClassLoader.initialClasspathSignature(ucl) + case _ => Nil + } } val inputsHash = |