stable build load order

This commit is contained in:
Mark Harrah 2012-02-14 21:59:12 -05:00
parent b96ceabb80
commit 923acc1258
1 changed files with 3 additions and 1 deletions

View File

@ -293,7 +293,9 @@ object Load
val (loadedBuild, refs) = loaded(loaders(b))
checkBuildBase(loadedBuild.unit.localBase)
val newLoader = addOverrides(loadedBuild.unit, addResolvers(loadedBuild.unit, builds.isEmpty, loaders))
loadAll(refs.flatMap(Reference.uri) reverse_::: bs, references.updated(b, refs), newLoader, builds.updated(b, loadedBuild))
// it is important to keep the load order stable, so we sort the remaining URIs
val remainingBases = (refs.flatMap(Reference.uri) reverse_::: bs).sorted
loadAll(remainingBases, references.updated(b, refs), newLoader, builds.updated(b, loadedBuild))
}
case Nil => (references, builds, loaders)
}