ScopeFilter.debug to print accepted and rejected scopes

This commit is contained in:
Mark Harrah 2013-06-10 14:09:27 -04:00
parent 73c771eed8
commit 5a252fae3a
1 changed files with 13 additions and 0 deletions

View File

@ -29,6 +29,19 @@ object ScopeFilter
}
}
def debug(delegate: ScopeFilter): ScopeFilter =
new ScopeFilter {
private[sbt] def apply(data: Data): Scope => Boolean =
{
val d = delegate(data)
scope => {
val accept = d(scope)
println( (if(accept) "ACCEPT " else "reject ") + scope)
accept
}
}
}
final class SettingKeyAll[T] private[sbt](i: Initialize[T]) {
/** Evaluates the initialization in all scopes selected by the filter. These are dynamic dependencies, so
* static inspections will not show them. */