Merge pull request #8283 from BillyAutrey/add-runtask-with-result-to-extracted

Add runTaskUnhandled to Extracted
This commit is contained in:
eugene yokota 2025-09-15 15:02:29 -04:00 committed by GitHub
commit d476905b67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -66,6 +66,15 @@ final case class Extracted(
(newS, EvaluateTask.processResult2(result))
}
/**
* Runs the task specified by `key` and returns the unhandled direct result of EvaluateTask.
*
* This method differs from `runTask` in that it does not unwrap the option, or process results.
*/
def runTaskUnhandled[T](key: TaskKey[T], state: State): Option[(State, Result[T])] =
val config = extractedTaskConfig(this, structure, state)
EvaluateTask(structure, key.scopedKey, state, currentRef, config)
/**
* Runs the input task specified by `key`, using the `input` as the input to it, and returns the transformed State
* and the resulting value of the input task.