mirror of https://github.com/sbt/sbt.git
remove deprecated Extracted.evalTask
This commit is contained in:
parent
dd66d8b17a
commit
f6317a5c75
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue