summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-03-28 04:38:36 -0700
committerLi Haoyi <haoyi.sg@gmail.com>2018-03-28 04:38:36 -0700
commit680364fa3658027ff494dc4fac1d2fcdb8fec8b3 (patch)
tree982bd83be857c4159bf5a9fc408a18005731877d
parent8a76f4fe1776f96249ecb3e5d88c8b0a3c161840 (diff)
downloadmill-680364fa3658027ff494dc4fac1d2fcdb8fec8b3.tar.gz
mill-680364fa3658027ff494dc4fac1d2fcdb8fec8b3.tar.bz2
mill-680364fa3658027ff494dc4fac1d2fcdb8fec8b3.zip
bump ammonite version to fix https://github.com/lihaoyi/mill/issues/184
-rwxr-xr-xbuild.sc4
-rw-r--r--core/src/mill/eval/Evaluator.scala7
-rw-r--r--core/src/mill/util/ClassLoader.scala5
3 files changed, 9 insertions, 7 deletions
diff --git a/build.sc b/build.sc
index 134e76e9..e3d4f91f 100755
--- a/build.sc
+++ b/build.sc
@@ -65,7 +65,7 @@ trait MillModule extends MillPublishModule{ outer =>
object clientserver extends MillModule{
def ivyDeps = Agg(
- ivy"com.lihaoyi:::ammonite:1.1.0-3-73d5734",
+ ivy"com.lihaoyi:::ammonite:1.1.0-7-33b728c",
ivy"org.scala-sbt.ipcsocket:ipcsocket:1.0.0"
)
val test = new Tests(implicitly)
@@ -80,7 +80,7 @@ object core extends MillModule {
def ivyDeps = Agg(
ivy"com.lihaoyi::sourcecode:0.1.4",
- ivy"com.lihaoyi:::ammonite:1.1.0-3-73d5734",
+ ivy"com.lihaoyi:::ammonite:1.1.0-7-33b728c",
)
def generatedSources = T {
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 {