mirror of https://github.com/sbt/sbt.git
Fix #3160: Make actions/task-cancel compile
This commit is contained in:
parent
9d260f68c7
commit
293ae706f5
|
|
@ -1,9 +1,9 @@
|
|||
import sbt.ExposeYourself._
|
||||
|
||||
taskCancelHandler := { (state: State) =>
|
||||
new TaskEvaluationCancelHandler {
|
||||
taskCancelStrategy := { (state: State) =>
|
||||
new TaskCancellationStrategy {
|
||||
type State = Unit
|
||||
override def onTaskEngineStart(canceller: TaskCancel): Unit = canceller.cancel()
|
||||
override def finish(result: Unit): Unit = ()
|
||||
override def onTaskEngineStart(canceller: RunningTaskEngine): Unit = canceller.cancelAndShutdown()
|
||||
override def onTaskEngineFinish(state: State): Unit = ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
package sbt // this API is private[sbt], so only exposed for trusted clients and folks who like breaking.
|
||||
|
||||
object ExposeYourself {
|
||||
val taskCancelHandler = sbt.Keys.taskCancelHandler
|
||||
}
|
||||
val taskCancelStrategy = sbt.Keys.taskCancelStrategy
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue