From 42189d826bc1544013c31bb591ed6a23ccf853b1 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 23 Jan 2018 09:46:13 -0800 Subject: update mill build to work with new isolated scalaworker --- core/src/mill/eval/Evaluator.scala | 3 ++- core/src/mill/modules/Jvm.scala | 12 ------------ 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'core/src') 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], -- cgit v1.2.3