summaryrefslogtreecommitdiff
path: root/scalalib/worker/src
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-09-20 14:15:50 +0800
committerGitHub <noreply@github.com>2018-09-20 14:15:50 +0800
commitd551ee9d751201491a1d64e4da76ab03e3815df6 (patch)
tree60471609f0957401fa1a7002578ad8c1acd6bc75 /scalalib/worker/src
parentc8fd6bd9e1dc18c24e64147fcd221e0bf91c2d06 (diff)
downloadmill-d551ee9d751201491a1d64e4da76ab03e3815df6.tar.gz
mill-d551ee9d751201491a1d64e4da76ab03e3815df6.tar.bz2
mill-d551ee9d751201491a1d64e4da76ab03e3815df6.zip
Include scaladoc as part of mill inspect (#435)
Diffstat (limited to 'scalalib/worker/src')
-rw-r--r--scalalib/worker/src/mill/scalalib/worker/ZincWorkerImpl.scala18
1 files changed, 13 insertions, 5 deletions
diff --git a/scalalib/worker/src/mill/scalalib/worker/ZincWorkerImpl.scala b/scalalib/worker/src/mill/scalalib/worker/ZincWorkerImpl.scala
index 6b21de84..d2be35e9 100644
--- a/scalalib/worker/src/mill/scalalib/worker/ZincWorkerImpl.scala
+++ b/scalalib/worker/src/mill/scalalib/worker/ZincWorkerImpl.scala
@@ -125,12 +125,20 @@ class ZincWorkerImpl(ctx0: mill.util.Ctx,
compilerClasspath: Agg[Path],
scalacPluginClasspath: Agg[Path])
(implicit ctx: mill.util.Ctx): mill.eval.Result[CompilationResult] = {
- val compilerJars = compilerClasspath.toArray.map(_.toIO)
+ val combinedCompilerClasspath = compilerClasspath ++ scalacPluginClasspath
+ val combinedCompilerJars = combinedCompilerClasspath.toArray.map(_.toIO)
- val compilerBridge = compileZincBridgeIfNeeded(scalaVersion, compilerBridgeSources, compilerJars)
+ val compilerBridge = compileZincBridgeIfNeeded(
+ scalaVersion,
+ compilerBridgeSources,
+ compilerClasspath.toArray.map(_.toIO)
+ )
val compilerBridgeSig = compilerBridge.mtime.toMillis
- val compilersSig = compilerBridgeSig + compilerClasspath.map(p => p.toString().hashCode + p.mtime.toMillis).sum
+ val compilersSig =
+ compilerBridgeSig +
+ combinedCompilerClasspath.map(p => p.toString().hashCode + p.mtime.toMillis).sum
+
val compilers = mixedCompilersCache match {
case Some((k, v)) if k == compilersSig => v
case _ =>
@@ -141,10 +149,10 @@ class ZincWorkerImpl(ctx0: mill.util.Ctx,
"scala-compiler"
val scalaInstance = new ScalaInstance(
version = scalaVersion,
- loader = mill.util.ClassLoader.create(compilerJars.map(_.toURI.toURL), null),
+ loader = mill.util.ClassLoader.create(combinedCompilerJars.map(_.toURI.toURL), null),
libraryJar = grepJar(compilerClasspath, "scala-library", scalaVersion).toIO,
compilerJar = grepJar(compilerClasspath, compilerName, scalaVersion).toIO,
- allJars = compilerJars,
+ allJars = combinedCompilerJars,
explicitActual = None
)
val compilers = ic.compilers(