summaryrefslogtreecommitdiff
path: root/scalaworker/src
diff options
context:
space:
mode:
Diffstat (limited to 'scalaworker/src')
-rw-r--r--scalaworker/src/mill/scalaworker/ScalaWorker.scala12
1 files changed, 4 insertions, 8 deletions
diff --git a/scalaworker/src/mill/scalaworker/ScalaWorker.scala b/scalaworker/src/mill/scalaworker/ScalaWorker.scala
index c7aa4cd5..f26c98b3 100644
--- a/scalaworker/src/mill/scalaworker/ScalaWorker.scala
+++ b/scalaworker/src/mill/scalaworker/ScalaWorker.scala
@@ -87,7 +87,7 @@ class ScalaWorker(ctx0: mill.util.Ctx,
@volatile var scalaInstanceCache = Option.empty[(Long, ScalaInstance)]
def compileZincBridge(scalaVersion: String,
- compileBridgeSources: Agg[Path],
+ sourcesJar: Path,
compilerJars: Array[File]) = {
val workingDir = ctx0.dest / scalaVersion
val compiledDest = workingDir / 'compiled
@@ -98,11 +98,7 @@ class ScalaWorker(ctx0: mill.util.Ctx,
mkdir(workingDir)
mkdir(compiledDest)
- val sourceJar = compileBridgeSources
- .find(_.last == s"compiler-bridge_${Lib.scalaBinaryVersion(scalaVersion)}-1.1.0-sources.jar")
- .get
-
- val sourceFolder = mill.modules.Util.unpackZip(sourceJar)(workingDir)
+ val sourceFolder = mill.modules.Util.unpackZip(sourcesJar)(workingDir)
val classloader = mill.util.ClassLoader.create(compilerJars.map(_.toURI.toURL), null)(ctx0)
val scalacMain = classloader.loadClass("scala.tools.nsc.Main")
val argsArray = Array[String](
@@ -137,7 +133,7 @@ class ScalaWorker(ctx0: mill.util.Ctx,
def compileScala(scalaVersion: String,
sources: Agg[Path],
- compileBridgeSources: Agg[Path],
+ compilerBridgeSources: Path,
compileClasspath: Agg[Path],
compilerClasspath: Agg[Path],
scalacOptions: Seq[String],
@@ -148,7 +144,7 @@ class ScalaWorker(ctx0: mill.util.Ctx,
val compileClasspathFiles = compileClasspath.map(_.toIO).toArray
val compilerJars = compilerClasspath.toArray.map(_.toIO)
- val compilerBridge = compileZincBridge(scalaVersion, compileBridgeSources, compilerJars)
+ val compilerBridge = compileZincBridge(scalaVersion, compilerBridgeSources, compilerJars)
val pluginJars = scalacPluginClasspath.toArray.map(_.toIO)