diff --git a/main/src/main/scala/sbt/Project.scala b/main/src/main/scala/sbt/Project.scala index 890260a71..5fca5d0eb 100755 --- a/main/src/main/scala/sbt/Project.scala +++ b/main/src/main/scala/sbt/Project.scala @@ -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) } diff --git a/main/src/main/scala/sbt/SettingCompletions.scala b/main/src/main/scala/sbt/SettingCompletions.scala index 2376db5b2..4509a888d 100644 --- a/main/src/main/scala/sbt/SettingCompletions.scala +++ b/main/src/main/scala/sbt/SettingCompletions.scala @@ -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) }