@@ -184,7 +184,7 @@ class PipelineMainClass(label: String, parallelism: Int, strategy: BuildStrategy
184
184
case OutlineTypePipeline =>
185
185
projects.foreach { p =>
186
186
val isLeaf = ! dependedOn.contains(p)
187
- val depsReady = Future .sequence(dependsOn.getOrElse(p, Nil ).map { task => p.dependencyReadyFuture(task.t ) })
187
+ val depsReady = Future .sequence(dependsOn.getOrElse(p, Nil ).map { task => p.dependencyReadyFuture(task) })
188
188
val f = if (isLeaf) {
189
189
for {
190
190
_ <- depsReady
@@ -234,7 +234,7 @@ class PipelineMainClass(label: String, parallelism: Int, strategy: BuildStrategy
234
234
println(f " Wall Clock: ${timer.durationMs}%.0f ms " )
235
235
case Pipeline =>
236
236
projects.foreach { p =>
237
- val depsReady = Future .sequence(dependsOn.getOrElse(p, Nil ).map(task => p.dependencyReadyFuture(task.t )))
237
+ val depsReady = Future .sequence(dependsOn.getOrElse(p, Nil ).iterator. map(task => p.dependencyReadyFuture(task)))
238
238
val f = for {
239
239
_ <- depsReady
240
240
_ <- {
@@ -348,23 +348,23 @@ class PipelineMainClass(label: String, parallelism: Int, strategy: BuildStrategy
348
348
private def expand (s : command.settings.PathSetting ): List [Path ] = {
349
349
ClassPath .expandPath(s.value, expandStar = true ).map(s => Paths .get(s).toAbsolutePath.normalize())
350
350
}
351
- def classPath : Seq [Path ] = expand(command.settings.classpath)
352
- def macroClassPath : Seq [Path ] = expand(command.settings.YmacroClasspath )
353
- def macroClassPathSet : Set [Path ] = macroClassPath.toSet
354
- def pluginClassPath : Set [Path ] = {
351
+ lazy val classPath : Seq [Path ] = expand(command.settings.classpath)
352
+ lazy val macroClassPath : Seq [Path ] = expand(command.settings.YmacroClasspath )
353
+ lazy val macroClassPathSet : Set [Path ] = macroClassPath.toSet
354
+ lazy val pluginClassPath : Set [Path ] = {
355
355
def asPath (p : String ) = ClassPath split p
356
356
357
357
val paths = command.settings.plugin.value filter (_ != " " ) flatMap (s => asPath(s) map (s => Paths .get(s)))
358
358
paths.toSet
359
359
}
360
- def dependencyReadyFuture (dependency : Task ) = if (macroClassPathSet.contains( dependency.outputDir) ) {
361
- log(s " dependency is on macro classpath, will wait for .class files: ${dependency.label}" )
362
- dependency.javaDone.future
363
- } else if (pluginClassPath.contains( dependency.outputDir) ) {
364
- log(s " dependency is on plugin classpath, will wait for .class files: ${dependency.label}" )
365
- dependency.javaDone.future
360
+ def dependencyReadyFuture (dependency : Dependency ) = if (dependency.isMacro ) {
361
+ log(s " dependency is on macro classpath, will wait for .class files: ${dependency.t. label}" )
362
+ dependency.t. javaDone.future
363
+ } else if (dependency.isPlugin ) {
364
+ log(s " dependency is on plugin classpath, will wait for .class files: ${dependency.t. label}" )
365
+ dependency.t. javaDone.future
366
366
} else
367
- dependency.outlineDone.future
367
+ dependency.t. outlineDone.future
368
368
369
369
370
370
val cacheMacro = java.lang.Boolean .getBoolean(" scala.pipeline.cache.macro.classloader" )
0 commit comments