mirror of https://github.com/sbt/sbt.git
fixes to 'inspect' delegates and provided by outputs
This commit is contained in:
parent
aa395583b5
commit
2ab8f5c3c0
|
|
@ -162,13 +162,13 @@ object Project extends Init[Scope]
|
||||||
{
|
{
|
||||||
val scoped = ScopedKey(scope,key)
|
val scoped = ScopedKey(scope,key)
|
||||||
val value =
|
val value =
|
||||||
(structure.data.get(scope, key)) match {
|
structure.data.get(scope, key) match {
|
||||||
case None => "No entry for key."
|
case None => "No entry for key."
|
||||||
case Some(v: Task[_]) => "Task"
|
case Some(v: Task[_]) => "Task"
|
||||||
case Some(v: InputTask[_]) => "Input task"
|
case Some(v: InputTask[_]) => "Input task"
|
||||||
case Some(v) => "Value:\n\t" + v.toString
|
case Some(v) => "Value:\n\t" + v.toString
|
||||||
}
|
}
|
||||||
val definedIn = structure.data.definingScope(scope, key) match { case Some(sc) => "Provided by:\n\t" + display(scoped); case None => "" }
|
val definedIn = structure.data.definingScope(scope, key) match { case Some(sc) => "Provided by:\n\t" + Scope.display(sc, key.label); case None => "" }
|
||||||
val cMap = compiled(structure.settings)(structure.delegates, structure.scopeLocal)
|
val cMap = compiled(structure.settings)(structure.delegates, structure.scopeLocal)
|
||||||
val related = cMap.keys.filter(k => k.key == key && k.scope != scope)
|
val related = cMap.keys.filter(k => k.key == key && k.scope != scope)
|
||||||
val depends = cMap.get(scoped) match { case Some(c) => c.dependencies.toSet; case None => Set.empty }
|
val depends = cMap.get(scoped) match { case Some(c) => c.dependencies.toSet; case None => Set.empty }
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,8 @@ object Scope
|
||||||
val scope = Scope.replaceThis(GlobalScope)(rawScope)
|
val scope = Scope.replaceThis(GlobalScope)(rawScope)
|
||||||
scope.project match
|
scope.project match
|
||||||
{
|
{
|
||||||
case Global => scope :: GlobalScope :: Nil
|
case Global => withGlobalScope(scope)
|
||||||
case This => scope.copy(project = Global) :: GlobalScope :: Nil
|
case This => withGlobalScope(scope.copy(project = Global))
|
||||||
case Select(proj) =>
|
case Select(proj) =>
|
||||||
val projI = withRawBuilds(linearize(scope.project, Nil)(projectInherit)).distinct
|
val projI = withRawBuilds(linearize(scope.project, Nil)(projectInherit)).distinct
|
||||||
val prod =
|
val prod =
|
||||||
|
|
@ -139,6 +139,7 @@ object Scope
|
||||||
(prod :+ GlobalScope).distinct
|
(prod :+ GlobalScope).distinct
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
def withGlobalScope(base: Scope): Seq[Scope] = if(base == GlobalScope) GlobalScope :: Nil else base :: GlobalScope :: Nil
|
||||||
def withRawBuilds(ps: Seq[ScopeAxis[Reference]]): Seq[ScopeAxis[Reference]] =
|
def withRawBuilds(ps: Seq[ScopeAxis[Reference]]): Seq[ScopeAxis[Reference]] =
|
||||||
(ps ++ (ps flatMap rawBuilds).map(Select.apply) :+ Global).distinct
|
(ps ++ (ps flatMap rawBuilds).map(Select.apply) :+ Global).distinct
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue