From c23226d4ae6f0aec00bcb06af97f3b9360ceab62 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sun, 2 Dec 2012 03:17:19 -0500 Subject: [PATCH] comment EvaluateTask.apply methods --- main/EvaluateTask.scala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/EvaluateTask.scala b/main/EvaluateTask.scala index e1d667b87..109361b52 100644 --- a/main/EvaluateTask.scala +++ b/main/EvaluateTask.scala @@ -86,8 +86,15 @@ object EvaluateTask def evaluateTask[T](structure: BuildStructure, taskKey: ScopedKey[Task[T]], state: State, ref: ProjectRef, checkCycles: Boolean = false, maxWorkers: Int = SystemProcessors): Option[Result[T]] = apply(structure, taskKey, state, ref, EvaluateConfig(false, defaultRestrictions(maxWorkers), checkCycles)).map(_._2) + /** Evaluates `taskKey` and returns the new State and the result of the task wrapped in Some. + * If the task is not defined, None is returned. The provided task key is resolved against the current project `ref`. + * Task execution is configured according to settings defined in the loaded project.*/ def apply[T](structure: BuildStructure, taskKey: ScopedKey[Task[T]], state: State, ref: ProjectRef): Option[(State, Result[T])] = apply[T](structure, taskKey, state, ref, defaultConfig(Project.extract(state), structure)) + + /** Evaluates `taskKey` and returns the new State and the result of the task wrapped in Some. + * If the task is not defined, None is returned. The provided task key is resolved against the current project `ref`. + * `config` configures concurrency and canceling of task execution. */ def apply[T](structure: BuildStructure, taskKey: ScopedKey[Task[T]], state: State, ref: ProjectRef, config: EvaluateConfig): Option[(State, Result[T])] = withStreams(structure, state) { str => for( (task, toNode) <- getTask(structure, taskKey, state, str, ref) ) yield