From 680364fa3658027ff494dc4fac1d2fcdb8fec8b3 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Wed, 28 Mar 2018 04:38:36 -0700 Subject: bump ammonite version to fix https://github.com/lihaoyi/mill/issues/184 --- core/src/mill/eval/Evaluator.scala | 7 ++++--- core/src/mill/util/ClassLoader.scala | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/src/mill/eval/Evaluator.scala b/core/src/mill/eval/Evaluator.scala index f8fecf38..33141c0a 100644 --- a/core/src/mill/eval/Evaluator.scala +++ b/core/src/mill/eval/Evaluator.scala @@ -31,7 +31,7 @@ case class Evaluator[T](home: Path, externalOutPath: Path, rootModule: mill.define.BaseModule, log: Logger, - classLoaderSig: Seq[(Path, Long)] = Evaluator.classLoaderSig, + classLoaderSig: Seq[(Either[String, Path], Long)] = Evaluator.classLoaderSig, workerCache: mutable.Map[Segments, (Int, Any)] = mutable.Map.empty){ val classLoaderSignHash = classLoaderSig.hashCode() def evaluate(goals: Agg[Task[_]]): Evaluator.Results = { @@ -326,7 +326,7 @@ object Evaluator{ implicit val rw: upickle.default.ReadWriter[Cached] = upickle.default.macroRW } case class State(rootModule: mill.define.BaseModule, - classLoaderSig: Seq[(Path, Long)], + classLoaderSig: Seq[(Either[String, 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 @@ -352,7 +352,8 @@ object Evaluator{ // check if the build itself has changed def classLoaderSig = Thread.currentThread().getContextClassLoader match { case scl: SpecialClassLoader => scl.classpathSignature - case ucl: URLClassLoader => SpecialClassLoader.initialClasspathSignature(ucl) + case ucl: URLClassLoader => + SpecialClassLoader.initialClasspathSignature(ucl).map{ case (k, v) => (Right(k), v)} case _ => Nil } case class Timing(label: String, diff --git a/core/src/mill/util/ClassLoader.scala b/core/src/mill/util/ClassLoader.scala index 8017c958..9f0a7ab3 100644 --- a/core/src/mill/util/ClassLoader.scala +++ b/core/src/mill/util/ClassLoader.scala @@ -52,9 +52,10 @@ object ClassLoader { private def makeUrls(urls: Seq[URL])(implicit ctx: Ctx.Home): Seq[URL] = { if (ammonite.util.Util.java9OrAbove) { - val rtFile = ctx.home / ammonite.runtime.Classpath.rtJarName + + val rtFile = ctx.home / io.github.retronym.java9rtexport.Export.rtJarName if (!exists(rtFile)) { - cp(Path(Export.export()), rtFile) + cp(Path(Export.rt()), rtFile) } urls :+ rtFile.toNIO.toUri.toURL } else { -- cgit v1.2.3