mb.pie.api.exec.TopDown.kt Maven / Gradle / Ivy
The newest version!
package mb.pie.api.exec
import mb.pie.api.*
/**
* Executor using a top-down build algorithm.
*/
interface TopDownExecutor {
/**
* Creates a new top-down build session. Within a session, the same task is never executed more than once. For sound incrementality, a
* new session must be started after external changes (such as file changes) have occurred.
*/
fun newSession(): TopDownSession
}
interface TopDownSession {
/**
* Requires given [task], returning its output.
*/
@Throws(ExecException::class)
fun requireInitial(task: Task): O
/**
* Requires given [task], with given [cancel] requester, returning its output.
*/
@Throws(ExecException::class, InterruptedException::class)
fun requireInitial(task: Task, cancel: Cancelled = NullCancelled()): O
}