improve commands, proper build/project base resolution

finish alias support
better project printing in 'projects'
completion support for 'help'
resolve URIs in ProjectRef against base URI of defining build in keys and project relations
resolve base directories and record build URI in BuildUnit
preserve relative paths in File to URI conversion for later resolution
This commit is contained in:
Mark Harrah 2011-01-23 22:34:17 -05:00
parent 092c012b0b
commit 5f9c6f7f26
1 changed files with 2 additions and 2 deletions

View File

@ -99,11 +99,11 @@ trait Init[Scope]
def delegate(sMap: ScopedMap)(implicit delegates: Scope => Seq[Scope]): ScopedMap =
{
val md = memoDelegates(delegates)
def refMap(refKey: ScopedKey[_]) = new (ScopedKey ~> ScopedKey) { def apply[T](k: ScopedKey[T]) = mapReferenced(sMap, k, md(k.scope), refKey) }
def refMap(refKey: ScopedKey[_]) = new (ScopedKey ~> ScopedKey) { def apply[T](k: ScopedKey[T]) = delegateForKey(sMap, k, md(k.scope), refKey) }
val f = new (SettingSeq ~> SettingSeq) { def apply[T](ks: Seq[Setting[T]]) = ks.map{ s => s mapReferenced refMap(s.key) } }
sMap mapValues f
}
private[this] def mapReferenced[T](sMap: ScopedMap, k: ScopedKey[T], scopes: Seq[Scope], refKey: ScopedKey[_]): ScopedKey[T] =
private[this] def delegateForKey[T](sMap: ScopedMap, k: ScopedKey[T], scopes: Seq[Scope], refKey: ScopedKey[_]): ScopedKey[T] =
{
val scache = PMap.empty[ScopedKey, ScopedKey]
def resolve(search: Seq[Scope]): ScopedKey[T] =