Permalink
Browse files

Add method Aggregation.runTasksWithResult

  • Loading branch information...
1 parent fdf9be1 commit cddbb8dd12c26ac9f29dd1b381dbd956cea2c0a1 @gseitz gseitz committed with May 7, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 main/Aggregation.scala
View
@@ -30,7 +30,7 @@ final object Aggregation
Command.applyEffect(seqParser(ps)) { ts =>
runTasks(s, structure, ts, Dummies(KNil, HNil), show)
}
- def runTasks[HL <: HList, T](s: State, structure: Load.BuildStructure, ts: Values[Task[T]], extra: Dummies[HL], show: Boolean)(implicit display: Show[ScopedKey[_]]): State =
+ def runTasksWithResult[HL <: HList, T](s: State, structure: Load.BuildStructure, ts: Values[Task[T]], extra: Dummies[HL], show: Boolean)(implicit display: Show[ScopedKey[_]]): (State, Result[Seq[KeyValue[T]]]) =
{
import EvaluateTask._
import std.TaskExtra._
@@ -52,10 +52,15 @@ final object Aggregation
try { onResult(result, log) { results => if(show) printSettings(results, log) } }
finally { printSuccess(start, stop, extracted, success, log) }
- newS
+ (newS, result)
}
- def printSuccess(start: Long, stop: Long, extracted: Extracted, success: Boolean, log: Logger)
+ def runTasks[HL <: HList, T](s: State, structure: Load.BuildStructure, ts: Values[Task[T]], extra: Dummies[HL], show: Boolean)(implicit display: Show[ScopedKey[_]]): State = {
+ runTasksWithResult(s, structure, ts, extra, show)._1
+ }
+
+
+ def printSuccess(start: Long, stop: Long, extracted: Extracted, success: Boolean, log: Logger)
{
import extracted._
lazy val enabled = showSuccess in extracted.currentRef get extracted.structure.data getOrElse true

0 comments on commit cddbb8d

Please sign in to comment.