From 148b5786811354357514433e97f23d12db864dec Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Tue, 13 May 2014 18:27:04 -0400 Subject: [PATCH] Fix project load ordering to match 0.13.5 and previous. * root project needs to be discovered FIRST in the list. * All other rpojects come in the order they were seen. --- main/src/main/scala/sbt/Load.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/main/scala/sbt/Load.scala b/main/src/main/scala/sbt/Load.scala index af49f0d4e..cab0c8e39 100755 --- a/main/src/main/scala/sbt/Load.scala +++ b/main/src/main/scala/sbt/Load.scala @@ -536,7 +536,7 @@ object Load { case DiscoveredProjects(Some(root), discovered, files) => log.debug(s"[Loading] Found root project ${root.id} w/ remaining ${discovered.map(_.id).mkString(",")}") val finalRoot = finalizeProject(root, files) - loadTransitive(discovered, buildBase, plugins, eval, injectSettings, acc :+ finalRoot, memoSettings, log, false, buildUri, context) + loadTransitive(discovered, buildBase, plugins, eval, injectSettings, finalRoot +: acc, memoSettings, log, false, buildUri, context) // Here we need to create a root project... case DiscoveredProjects(None, discovered, files) => log.debug(s"[Loading] Found non-root projects ${discovered.map(_.id).mkString(",")}") @@ -546,7 +546,7 @@ object Load { val refs = existingIds map (id => ProjectRef(buildUri, id)) val defaultID = autoID(buildBase, context, existingIds) val root = finalizeProject(Build.defaultAggregatedProject(defaultID, buildBase, refs), files) - val result = (acc ++ otherProjects) :+ root + val result = root +: (acc ++ otherProjects) log.debug(s"[Loading] Done in ${buildBase}, returning: ${result.map(_.id).mkString("(", ", ", ")")}") result }