remove deprecated Extracted.evalTask

This commit is contained in:
Mark Harrah 2012-12-19 10:17:56 -05:00
parent dd66d8b17a
commit f6317a5c75
2 changed files with 1 additions and 3 deletions

View File

@ -24,8 +24,6 @@ final case class Extracted(structure: BuildStructure, session: SessionSettings,
def getOpt[T](key: SettingKey[T]): Option[T] = structure.data.get(inCurrent(key), key.key)
private[this] def inCurrent[T](key: SettingKey[T]): Scope = if(key.scope.project == This) key.scope.copy(project = Select(currentRef)) else key.scope
@deprecated("This method does not apply state changes requested during task execution. Use 'runTask' instead, which does.", "0.11.1")
def evalTask[T](key: TaskKey[T], state: State): T = runTask(key, state)._2
/** Runs the task specified by `key` and returns the transformed State and the resulting value of the task.
* If the project axis is not defined for the key, it is resolved to be the current project.

View File

@ -112,7 +112,7 @@ object BuiltinCommands
{
val scalaVersion = e.getOpt(Keys.scalaVersion)
val scalaHome = e.getOpt(Keys.scalaHome).flatMap(idFun)
val instance = e.getOpt(Keys.scalaInstance.task).flatMap(_ => quiet(e.evalTask(Keys.scalaInstance, s)))
val instance = e.getOpt(Keys.scalaInstance.task).flatMap(_ => quiet(e.runTask(Keys.scalaInstance, s)._2))
(scalaVersion, scalaHome, instance) match {
case (sv, Some(home), Some(si)) => "local Scala version " + selectScalaVersion(sv, si) + " at " + home.getAbsolutePath
case (_, Some(home), None) => "a local Scala build at " + home.getAbsolutePath