mirror of https://github.com/sbt/sbt.git
In 'set' command, handle keys in new scopes in the affected settings part
This commit is contained in:
parent
7ed56d3fcd
commit
e1acc12290
|
|
@ -319,10 +319,13 @@ object Project extends ProjectExtra
|
|||
val keyToString = display.apply _
|
||||
DotGraph.generateGraph(file, graphName, rel, keyToString, keyToString)
|
||||
}
|
||||
def relation(structure: BuildStructure, actual: Boolean)(implicit display: Show[ScopedKey[_]]) =
|
||||
def relation(structure: BuildStructure, actual: Boolean)(implicit display: Show[ScopedKey[_]]): Relation[ScopedKey[_], ScopedKey[_]] =
|
||||
relation(structure.settings, actual)(structure.delegates, structure.scopeLocal, display)
|
||||
|
||||
private[sbt] def relation(settings: Seq[Setting[_]], actual: Boolean)(implicit delegates: Scope => Seq[Scope], scopeLocal: Def.ScopeLocal, display: Show[ScopedKey[_]]): Relation[ScopedKey[_], ScopedKey[_]] =
|
||||
{
|
||||
type Rel = Relation[ScopedKey[_], ScopedKey[_]]
|
||||
val cMap = Def.flattenLocals(Def.compiled(structure.settings, actual)(structure.delegates, structure.scopeLocal, display))
|
||||
val cMap = Def.flattenLocals(Def.compiled(settings, actual))
|
||||
((Relation.empty: Rel) /: cMap) { case (r, (key, value)) =>
|
||||
r + (key, value.dependencies)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,8 +49,9 @@ private[sbt] object SettingCompletions
|
|||
{
|
||||
import extracted._
|
||||
val append = Load.transformSettings(Load.projectScope(currentRef), currentRef.build, rootProject, settings)
|
||||
val r = relation(extracted.structure, true)
|
||||
val newSession = session.appendSettings( append map (a => (a, arg.split('\n').toList)))
|
||||
val struct = extracted.structure
|
||||
val r = relation(newSession.mergeSettings, true)(structure.delegates, structure.scopeLocal, implicitly)
|
||||
setResult(newSession, r, append)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue