diff --git a/main/Load.scala b/main/Load.scala index 07c97bdca..a864de980 100755 --- a/main/Load.scala +++ b/main/Load.scala @@ -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) }