Skip to content

Commit

Permalink
Fix deriveAndLocal bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Sanduleac authored and eed3si9n committed Mar 21, 2014
1 parent 7d630df commit 7cbfd7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions util/collection/src/main/scala/sbt/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,13 @@ trait Init[Scope]
val derivedForKey: List[Derived] = derivedBy.get(sk.key).toList.flatten
val scope = sk.scope
def localAndDerived(d: Derived): Seq[Setting[_]] =
if(d.inScopes.add(scope) && d.setting.filter(scope))
if(!d.inScopes.contains(scope) && d.setting.filter(scope))
{
val local = d.dependencies.flatMap(dep => scopeLocal(ScopedKey(scope, dep)))
if(allDepsDefined(d, scope, local.map(_.key.key).toSet))
if(allDepsDefined(d, scope, local.map(_.key.key).toSet)) {
d.inScopes.add(scope)
local :+ d.setting.setScope(scope)
else
} else
Nil
}
else Nil
Expand Down

0 comments on commit 7cbfd7f

Please sign in to comment.