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.
This commit is contained in:
Josh Suereth 2014-05-13 18:27:04 -04:00
parent 066a12cd2a
commit 148b578681
1 changed files with 2 additions and 2 deletions

View File

@ -536,7 +536,7 @@ object Load {
case DiscoveredProjects(Some(root), discovered, files) => case DiscoveredProjects(Some(root), discovered, files) =>
log.debug(s"[Loading] Found root project ${root.id} w/ remaining ${discovered.map(_.id).mkString(",")}") log.debug(s"[Loading] Found root project ${root.id} w/ remaining ${discovered.map(_.id).mkString(",")}")
val finalRoot = finalizeProject(root, files) 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... // Here we need to create a root project...
case DiscoveredProjects(None, discovered, files) => case DiscoveredProjects(None, discovered, files) =>
log.debug(s"[Loading] Found non-root projects ${discovered.map(_.id).mkString(",")}") 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 refs = existingIds map (id => ProjectRef(buildUri, id))
val defaultID = autoID(buildBase, context, existingIds) val defaultID = autoID(buildBase, context, existingIds)
val root = finalizeProject(Build.defaultAggregatedProject(defaultID, buildBase, refs), files) 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("(", ", ", ")")}") log.debug(s"[Loading] Done in ${buildBase}, returning: ${result.map(_.id).mkString("(", ", ", ")")}")
result result
} }