mirror of https://github.com/sbt/sbt.git
Fix issue where generated config-classes was not propogated.
Fixes #1568. This is the fallout of attempting not to leak config-file classes. Since we DO NOT have valid incremental compiler for config-classes, we've instituted workaround to ensure that regular incremental compilation *AND* our own sbt loader do not hose each other. A full solution will eventually be to find a way for .sbt files to participate in regular compilation of a project. For now, we fix the tracking of generated.class files throughout an sbt "loadProjects" call, and then clean any .class files that were not generated for a full reload. This commit just fixes a minor tracking issue.
This commit is contained in:
parent
7e0c76f5a6
commit
bc421f0ac9
|
|
@ -26,6 +26,7 @@ env:
|
|||
- SCRIPTED_TEST="scripted source-dependencies/*2of3"
|
||||
- SCRIPTED_TEST="scripted source-dependencies/*3of3"
|
||||
- SCRIPTED_TEST="scripted tests/*"
|
||||
- SCRIPTED_TEST="scripted project-load/*"
|
||||
- SCRIPTED_TEST="safeUnitTests"
|
||||
- SCRIPTED_TEST="checkBuildScala211"
|
||||
|
||||
|
|
|
|||
|
|
@ -439,7 +439,8 @@ object Load {
|
|||
|
||||
val memoSettings = new mutable.HashMap[File, LoadedSbtFile]
|
||||
def loadProjects(ps: Seq[Project], createRoot: Boolean) = {
|
||||
loadTransitive(ps, normBase, plugs, () => eval, config.injectSettings, Nil, memoSettings, config.log, createRoot, uri, config.pluginManagement.context, Nil)
|
||||
val result = loadTransitive(ps, normBase, plugs, () => eval, config.injectSettings, Nil, memoSettings, config.log, createRoot, uri, config.pluginManagement.context, Nil)
|
||||
result
|
||||
}
|
||||
|
||||
val loadedProjectsRaw = loadProjects(initialProjects, !hasRootAlreadyDefined)
|
||||
|
|
@ -567,14 +568,14 @@ object Load {
|
|||
case Seq(next, rest @ _*) =>
|
||||
log.debug(s"[Loading] Loading project ${next.id} @ ${next.base}")
|
||||
val (finished, discovered, generated) = discoverAndLoad(next)
|
||||
loadTransitive(rest ++ discovered, buildBase, plugins, eval, injectSettings, acc :+ finished, memoSettings, log, false, buildUri, context, generated)
|
||||
loadTransitive(rest ++ discovered, buildBase, plugins, eval, injectSettings, acc :+ finished, memoSettings, log, false, buildUri, context, generated ++ generatedConfigClassFiles)
|
||||
case Nil if makeOrDiscoverRoot =>
|
||||
log.debug(s"[Loading] Scanning directory ${buildBase}")
|
||||
discover(AddSettings.defaultSbtFiles, buildBase) match {
|
||||
case DiscoveredProjects(Some(root), discovered, files, generated) =>
|
||||
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, finalRoot +: acc, memoSettings, log, false, buildUri, context, generated)
|
||||
loadTransitive(discovered, buildBase, plugins, eval, injectSettings, finalRoot +: acc, memoSettings, log, false, buildUri, context, generated ++ generatedConfigClassFiles)
|
||||
// Here we need to create a root project...
|
||||
case DiscoveredProjects(None, discovered, files, generated) =>
|
||||
log.debug(s"[Loading] Found non-root projects ${discovered.map(_.id).mkString(",")}")
|
||||
|
|
@ -587,7 +588,7 @@ object Load {
|
|||
val root = finalizeProject(Build.defaultAggregatedProject(defaultID, buildBase, refs), files)
|
||||
val result = root +: (acc ++ otherProjects.projects)
|
||||
log.debug(s"[Loading] Done in ${buildBase}, returning: ${result.map(_.id).mkString("(", ", ", ")")}")
|
||||
LoadedProjects(result, generated ++ otherGenerated)
|
||||
LoadedProjects(result, generated ++ otherGenerated ++ generatedConfigClassFiles)
|
||||
}
|
||||
case Nil =>
|
||||
log.debug(s"[Loading] Done in ${buildBase}, returning: ${acc.map(_.id).mkString("(", ", ", ")")}")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
lazy val root = project in file(".")
|
||||
|
||||
lazy val js = project
|
||||
|
||||
def bigDataSesameVersion = "2.6.10"
|
||||
|
||||
libraryDependencies += "foo" % "bar" % bigDataSesameVersion
|
||||
|
|
@ -0,0 +1 @@
|
|||
bintraySettings
|
||||
|
|
@ -0,0 +1 @@
|
|||
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.1.2")
|
||||
|
|
@ -0,0 +1 @@
|
|||
> name
|
||||
Loading…
Reference in New Issue