diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-23 09:46:13 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-23 09:46:13 -0800 |
commit | 42189d826bc1544013c31bb591ed6a23ccf853b1 (patch) | |
tree | 62ce1fa36ed912403fa745b554107194ca25ca3a /core/src | |
parent | ac3266ca796b8ed2052804077820d2f39cde362d (diff) | |
download | mill-42189d826bc1544013c31bb591ed6a23ccf853b1.tar.gz mill-42189d826bc1544013c31bb591ed6a23ccf853b1.tar.bz2 mill-42189d826bc1544013c31bb591ed6a23ccf853b1.zip |
update mill build to work with new isolated scalaworker
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/mill/eval/Evaluator.scala | 3 | ||||
-rw-r--r-- | core/src/mill/modules/Jvm.scala | 12 |
2 files changed, 2 insertions, 13 deletions
diff --git a/core/src/mill/eval/Evaluator.scala b/core/src/mill/eval/Evaluator.scala index cf4b32cf..0e8709e0 100644 --- a/core/src/mill/eval/Evaluator.scala +++ b/core/src/mill/eval/Evaluator.scala @@ -44,7 +44,8 @@ class Evaluator[T](val workspacePath: Path, case t: NamedTask[Any] => val segments = t.ctx.segments val (finalTaskOverrides, enclosing) = t match{ - case t: Target[_] => rootModule.millInternal.segmentsToTargets(segments).ctx.overrides -> t.ctx.enclosing + case t: Target[_] => + rootModule.millInternal.segmentsToTargets.get(segments).fold(0)(_.ctx.overrides) -> t.ctx.enclosing case c: mill.define.Command[_] => 0 -> c.ctx.enclosing case c: mill.define.Worker[_] => 0 -> c.ctx.enclosing } diff --git a/core/src/mill/modules/Jvm.scala b/core/src/mill/modules/Jvm.scala index 0fa7e3e3..d9abff86 100644 --- a/core/src/mill/modules/Jvm.scala +++ b/core/src/mill/modules/Jvm.scala @@ -20,18 +20,6 @@ import scala.reflect.ClassTag object Jvm { - def gatherClassloaderJars(): Agg[Path] = { - val allJars = new Agg.Mutable[Path]() - var currentClassloader = Thread.currentThread().getContextClassLoader - while(currentClassloader != null){ - currentClassloader match{ - case u: URLClassLoader => allJars.appendAll(u.getURLs.map(x => Path(x.getFile))) - case _ => - } - currentClassloader = currentClassloader.getParent - } - allJars - } def interactiveSubprocess(mainClass: String, classPath: Agg[Path], |