Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SI-6964 Remove build managers, both simple and refined.

Deprecated in 2.10.0, out to pasture in 2.11.0.

Users are advised to migrate to:

   https://github.com/typesafehub/zinc
   http://www.scala-sbt.org/
  • Loading branch information...
commit b61a64ddb5700b5d77295df43af0e3feb3c46ac6 1 parent 64ec51b
@retronym retronym authored
Showing with 3 additions and 1,902 deletions.
  1. +0 −1  build.xml
  2. +1 −2  project/Partest.scala
  3. +1 −18 src/compiler/scala/tools/nsc/Global.scala
  4. +0 −18 src/compiler/scala/tools/nsc/Main.scala
  5. +1 −5 src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
  6. +0 −253 src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala
  7. +0 −177 src/compiler/scala/tools/nsc/dependencies/Files.scala
  8. +0 −83 src/compiler/scala/tools/nsc/interactive/BuildManager.scala
  9. +0 −354 src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala
  10. +0 −100 src/compiler/scala/tools/nsc/interactive/SimpleBuildManager.scala
  11. +0 −2  src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
  12. +0 −1  src/partest/README
  13. +0 −8 src/partest/scala/tools/partest/PartestTask.scala
  14. +0 −1  src/partest/scala/tools/partest/nest/ConsoleRunner.scala
  15. +0 −1  src/partest/scala/tools/partest/nest/NestUI.scala
  16. +0 −116 src/partest/scala/tools/partest/nest/RunnerManager.scala
  17. +0 −1  src/partest/scala/tools/partest/nest/TestFile.scala
  18. +0 −2  test/disabled/presentation/simple-tests.check
  19. +0 −1  test/files/buildmanager/annotated/A.scala
  20. +0 −6 test/files/buildmanager/annotated/annotated.check
  21. +0 −2  test/files/buildmanager/annotated/annotated.test
  22. +0 −16 test/files/buildmanager/freshnames/A.scala
  23. +0 −4 test/files/buildmanager/freshnames/B.scala
  24. +0 −6 test/files/buildmanager/freshnames/freshnames.check
  25. +0 −2  test/files/buildmanager/freshnames/freshnames.test
  26. +0 −16 test/files/buildmanager/infer/A.scala
  27. +0 −6 test/files/buildmanager/infer/infer.check
  28. +0 −2  test/files/buildmanager/infer/infer.test
  29. +0 −5 test/files/buildmanager/namesdefaults/defparam-use.scala
  30. +0 −7 test/files/buildmanager/namesdefaults/defparam.scala
  31. +0 −9 test/files/buildmanager/namesdefaults/namesdefaults.check
  32. +0 −3  test/files/buildmanager/namesdefaults/namesdefaults.test
  33. +0 −3  test/files/buildmanager/simpletest/A.scala
  34. +0 −3  test/files/buildmanager/simpletest/B.scala
  35. +0 −1  test/files/buildmanager/simpletest/simpletest.changes/A1.scala
  36. +0 −11 test/files/buildmanager/simpletest/simpletest.check
  37. +0 −3  test/files/buildmanager/simpletest/simpletest.test
  38. +0 −1  test/files/buildmanager/t2280/A.scala
  39. +0 −2  test/files/buildmanager/t2280/B.java
  40. +0 −6 test/files/buildmanager/t2280/t2280.check
  41. +0 −2  test/files/buildmanager/t2280/t2280.test
  42. +0 −3  test/files/buildmanager/t2556_1/A.scala
  43. +0 −3  test/files/buildmanager/t2556_1/B.scala
  44. +0 −4 test/files/buildmanager/t2556_1/t2556_1.changes/A2.scala
  45. +0 −12 test/files/buildmanager/t2556_1/t2556_1.check
  46. +0 −3  test/files/buildmanager/t2556_1/t2556_1.test
  47. +0 −4 test/files/buildmanager/t2556_2/A.scala
  48. +0 −2  test/files/buildmanager/t2556_2/B.scala
  49. +0 −4 test/files/buildmanager/t2556_2/C.scala
  50. +0 −4 test/files/buildmanager/t2556_2/t2556_2.changes/A2.scala
  51. +0 −13 test/files/buildmanager/t2556_2/t2556_2.check
  52. +0 −3  test/files/buildmanager/t2556_2/t2556_2.test
  53. +0 −5 test/files/buildmanager/t2556_3/A.scala
  54. +0 −5 test/files/buildmanager/t2556_3/B.scala
  55. +0 −2  test/files/buildmanager/t2556_3/C.scala
  56. +0 −5 test/files/buildmanager/t2556_3/t2556_3.changes/A2.scala
  57. +0 −18 test/files/buildmanager/t2556_3/t2556_3.check
  58. +0 −3  test/files/buildmanager/t2556_3/t2556_3.test
  59. +0 −4 test/files/buildmanager/t2557/A.scala
  60. +0 −4 test/files/buildmanager/t2557/B.scala
  61. +0 −3  test/files/buildmanager/t2557/C.scala
  62. +0 −1  test/files/buildmanager/t2557/D.scala
  63. +0 −1  test/files/buildmanager/t2557/E.scala
  64. +0 −4 test/files/buildmanager/t2557/F.scala
  65. +0 −2  test/files/buildmanager/t2557/t2557.changes/D2.scala
  66. +0 −10 test/files/buildmanager/t2557/t2557.check
  67. +0 −3  test/files/buildmanager/t2557/t2557.test
  68. +0 −5 test/files/buildmanager/t2559/A.scala
  69. +0 −4 test/files/buildmanager/t2559/D.scala
  70. +0 −5 test/files/buildmanager/t2559/t2559.changes/A2.scala
  71. +0 −9 test/files/buildmanager/t2559/t2559.check
  72. +0 −3  test/files/buildmanager/t2559/t2559.test
  73. +0 −7 test/files/buildmanager/t2562/A.scala
  74. +0 −8 test/files/buildmanager/t2562/B.scala
  75. +0 −8 test/files/buildmanager/t2562/t2562.changes/A2.scala
  76. +0 −12 test/files/buildmanager/t2562/t2562.check
  77. +0 −3  test/files/buildmanager/t2562/t2562.test
  78. +0 −3  test/files/buildmanager/t2649/A.scala
  79. +0 −4 test/files/buildmanager/t2649/B.scala
  80. +0 −4 test/files/buildmanager/t2649/t2649.changes/A2.scala
  81. +0 −9 test/files/buildmanager/t2649/t2649.check
  82. +0 −3  test/files/buildmanager/t2649/t2649.test
  83. +0 −4 test/files/buildmanager/t2650_1/A.scala
  84. +0 −3  test/files/buildmanager/t2650_1/B.scala
  85. +0 −3  test/files/buildmanager/t2650_1/t2650_1.changes/A2.scala
  86. +0 −12 test/files/buildmanager/t2650_1/t2650_1.check
  87. +0 −3  test/files/buildmanager/t2650_1/t2650_1.test
  88. +0 −3  test/files/buildmanager/t2650_2/A.scala
  89. +0 −4 test/files/buildmanager/t2650_2/B.scala
  90. +0 −4 test/files/buildmanager/t2650_2/t2650_2.changes/A2.scala
  91. +0 −14 test/files/buildmanager/t2650_2/t2650_2.check
  92. +0 −3  test/files/buildmanager/t2650_2/t2650_2.test
  93. +0 −4 test/files/buildmanager/t2650_3/A.scala
  94. +0 −3  test/files/buildmanager/t2650_3/B.scala
  95. +0 −4 test/files/buildmanager/t2650_3/t2650_3.changes/A2.scala
  96. +0 −14 test/files/buildmanager/t2650_3/t2650_3.check
  97. +0 −3  test/files/buildmanager/t2650_3/t2650_3.test
  98. +0 −5 test/files/buildmanager/t2650_4/A.scala
  99. +0 −3  test/files/buildmanager/t2650_4/B.scala
  100. +0 −5 test/files/buildmanager/t2650_4/t2650_4.changes/A2.scala
  101. +0 −14 test/files/buildmanager/t2650_4/t2650_4.check
  102. +0 −3  test/files/buildmanager/t2650_4/t2650_4.test
  103. +0 −1  test/files/buildmanager/t2651_2/A.scala
  104. +0 −1  test/files/buildmanager/t2651_2/t2651_2.changes/A2.scala
  105. +0 −6 test/files/buildmanager/t2651_2/t2651_2.check
  106. +0 −3  test/files/buildmanager/t2651_2/t2651_2.test
  107. +0 −3  test/files/buildmanager/t2651_3/A.scala
  108. +0 −3  test/files/buildmanager/t2651_3/t2651_3.changes/A2.scala
  109. +0 −6 test/files/buildmanager/t2651_3/t2651_3.check
  110. +0 −3  test/files/buildmanager/t2651_3/t2651_3.test
  111. +0 −5 test/files/buildmanager/t2651_4/A.scala
  112. +0 −3  test/files/buildmanager/t2651_4/B.scala
  113. +0 −5 test/files/buildmanager/t2651_4/t2651_4.changes/A2.scala
  114. +0 −13 test/files/buildmanager/t2651_4/t2651_4.check
  115. +0 −3  test/files/buildmanager/t2651_4/t2651_4.test
  116. +0 −2  test/files/buildmanager/t2653/A.scala
  117. +0 −3  test/files/buildmanager/t2653/B.scala
  118. +0 −2  test/files/buildmanager/t2653/t2653.changes/A2.scala
  119. +0 −15 test/files/buildmanager/t2653/t2653.check
  120. +0 −3  test/files/buildmanager/t2653/t2653.test
  121. +0 −2  test/files/buildmanager/t2654/A.scala
  122. +0 −1  test/files/buildmanager/t2654/B.scala
  123. +0 −4 test/files/buildmanager/t2654/t2654.changes/A2.scala
  124. +0 −6 test/files/buildmanager/t2654/t2654.check
  125. +0 −3  test/files/buildmanager/t2654/t2654.test
  126. +0 −4 test/files/buildmanager/t2655/A.scala
  127. +0 −3  test/files/buildmanager/t2655/B.scala
  128. +0 −4 test/files/buildmanager/t2655/t2655.changes/A2.scala
  129. +0 −13 test/files/buildmanager/t2655/t2655.check
  130. +0 −3  test/files/buildmanager/t2655/t2655.test
  131. +0 −3  test/files/buildmanager/t2657/A.scala
  132. +0 −4 test/files/buildmanager/t2657/B.scala
  133. +0 −3  test/files/buildmanager/t2657/t2657.changes/A2.scala
  134. +0 −14 test/files/buildmanager/t2657/t2657.check
  135. +0 −3  test/files/buildmanager/t2657/t2657.test
  136. +0 −5 test/files/buildmanager/t2789/A.scala
  137. +0 −3  test/files/buildmanager/t2789/B.scala
  138. +0 −5 test/files/buildmanager/t2789/t2789.changes/A2.scala
  139. +0 −11 test/files/buildmanager/t2789/t2789.check
  140. +0 −3  test/files/buildmanager/t2789/t2789.test
  141. +0 −5 test/files/buildmanager/t2790/A.scala
  142. +0 −4 test/files/buildmanager/t2790/B.scala
  143. +0 −4 test/files/buildmanager/t2790/t2790.changes/A2.scala
  144. +0 −13 test/files/buildmanager/t2790/t2790.check
  145. +0 −3  test/files/buildmanager/t2790/t2790.test
  146. +0 −3  test/files/buildmanager/t2792/A1.scala
  147. +0 −4 test/files/buildmanager/t2792/A2.scala
  148. +0 −3  test/files/buildmanager/t2792/A3.scala
  149. +0 −3  test/files/buildmanager/t2792/t2792.changes/A1_1.scala
  150. +0 −14 test/files/buildmanager/t2792/t2792.check
  151. +0 −3  test/files/buildmanager/t2792/t2792.test
  152. +0 −7 test/files/buildmanager/t3045/A.java
  153. +0 −3  test/files/buildmanager/t3045/t3045.check
  154. +0 −1  test/files/buildmanager/t3045/t3045.test
  155. +0 −7 test/files/buildmanager/t3054/bar/Bar.java
  156. +0 −5 test/files/buildmanager/t3054/foo/Foo.scala
  157. +0 −3  test/files/buildmanager/t3054/t3054.check
  158. +0 −1  test/files/buildmanager/t3054/t3054.test
  159. +0 −4 test/files/buildmanager/t3059/A.scala
  160. +0 −4 test/files/buildmanager/t3059/B.scala
  161. +0 −6 test/files/buildmanager/t3059/t3059.check
  162. +0 −2  test/files/buildmanager/t3059/t3059.test
  163. +0 −7 test/files/buildmanager/t3133/A.java
  164. +0 −3  test/files/buildmanager/t3133/t3133.check
  165. +0 −1  test/files/buildmanager/t3133/t3133.test
  166. +0 −8 test/files/buildmanager/t3140/A.scala
  167. +0 −6 test/files/buildmanager/t3140/t3140.check
  168. +0 −2  test/files/buildmanager/t3140/t3140.test
  169. +0 −5 test/files/buildmanager/t4215/A.scala
  170. +0 −6 test/files/buildmanager/t4215/t4215.check
  171. +0 −2  test/files/buildmanager/t4215/t4215.test
View
1  build.xml
@@ -2440,7 +2440,6 @@ BOOTRAPING TEST AND TEST SUITE
<runtests dir="${partest.dir}/${partest.srcdir}/run" includes="*.scala"/>
<jvmtests dir="${partest.dir}/${partest.srcdir}/jvm" includes="*.scala"/>
<residenttests dir="${partest.dir}/${partest.srcdir}/res" includes="*.res"/>
- <buildmanagertests dir="${partest.dir}/${partest.srcdir}/buildmanager" includes="*"/>
<scalaptests dir="${partest.dir}/${partest.srcdir}/scalap" includes="**/*.scala"/>
<scalachecktests dir="${partest.dir}/${partest.srcdir}/scalacheck">
<include name="*.scala"/>
View
3  project/Partest.scala
@@ -33,11 +33,10 @@ object partest {
// What's fun here is that we want "*.scala" files *and* directories in the base directory...
def partestResources(base: File, testType: String): PathFinder = testType match {
case "res" => base ** "*.res"
- case "buildmanager" => base * "*"
// TODO - Only allow directories that have "*.scala" children...
case _ => base * "*" filter { f => !f.getName.endsWith(".obj") && (f.isDirectory || f.getName.endsWith(".scala")) }
}
- lazy val partestTestTypes = Seq("run", "jvm", "pos", "neg", "buildmanager", "res", "shootout", "scalap", "specialized", "presentation", "scalacheck")
+ lazy val partestTestTypes = Seq("run", "jvm", "pos", "neg", "res", "shootout", "scalap", "specialized", "presentation", "scalacheck")
// TODO - Figure out how to specify only a subset of resources...
def partestTestsTask(testDirs: ScopedSetting[Map[String,File]]): Project.Initialize[Task[Map[String, Seq[File]]]] =
View
19 src/compiler/scala/tools/nsc/Global.scala
@@ -16,7 +16,6 @@ import scala.reflect.internal.util.{ OffsetPosition, SourceFile, NoSourceFile, B
import scala.reflect.internal.pickling.{ PickleBuffer, PickleFormat }
import symtab.{ Flags, SymbolTable, SymbolLoaders, SymbolTrackers }
import symtab.classfile.Pickler
-import dependencies.DependencyAnalysis
import plugins.Plugins
import ast._
import ast.parser._
@@ -329,9 +328,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
}
}
- if (!dependencyAnalysis.off)
- dependencyAnalysis.loadDependencyAnalysis()
-
if (settings.verbose.value || settings.Ylogcp.value) {
// Uses the "do not truncate" inform
informComplete("[search path for source files: " + classPath.sourcepaths.mkString(",") + "]")
@@ -606,14 +602,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
val runsRightAfter = None
} with GenASM
- // This phase is optional: only added if settings.make option is given.
- // phaseName = "dependencyAnalysis"
- object dependencyAnalysis extends {
- val global: Global.this.type = Global.this
- val runsAfter = List("jvm")
- val runsRightAfter = None
- } with DependencyAnalysis
-
// phaseName = "terminal"
object terminal extends {
val global: Global.this.type = Global.this
@@ -1472,8 +1460,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
}
/** Compile list of source files */
- def compileSources(_sources: List[SourceFile]) {
- val sources = dependencyAnalysis calculateFiles _sources.distinct
+ def compileSources(sources: List[SourceFile]) {
// there is a problem already, e.g. a plugin was passed a bad option
if (reporter.hasErrors)
return
@@ -1568,10 +1555,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
symSource.keys foreach (x => resetPackageClass(x.owner))
informTime("total", startTime)
- // record dependency data
- if (!dependencyAnalysis.off)
- dependencyAnalysis.saveDependencyAnalysis()
-
// Clear any sets or maps created via perRunCaches.
perRunCaches.clearAll()
View
18 src/compiler/scala/tools/nsc/Main.scala
@@ -7,7 +7,6 @@ package scala.tools.nsc
import java.io.File
import File.pathSeparator
-import scala.tools.nsc.interactive.{ RefinedBuildManager, SimpleBuildManager }
import scala.tools.nsc.io.AbstractFile
/** The main class for NSC, a compiler for the programming
@@ -42,23 +41,6 @@ object Main extends Driver with EvalLoop {
askShutdown
false
}
- else if (settings.Ybuilderdebug.value != "none") {
- def fileSet(files : List[String]) = Set.empty ++ (files map AbstractFile.getFile)
-
- val buildManager = settings.Ybuilderdebug.value match {
- case "simple" => new SimpleBuildManager(settings)
- case _ => new RefinedBuildManager(settings)
- }
- buildManager.addSourceFiles(fileSet(command.files))
-
- // enter resident mode
- loop { line =>
- val args = line.split(' ').toList
- val command = new CompilerCommand(args.toList, settings)
- buildManager.update(fileSet(command.files), Set.empty)
- }
- false
- }
else true
override def newCompiler(): Global =
View
6 src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
@@ -38,14 +38,10 @@ trait JavaPlatform extends Platform {
// replaces the tighter abstract definition here. If we had DOT typing rules, the two
// types would be conjoined and everything would work out. Yet another reason to push for DOT.
- private def depAnalysisPhase =
- if (settings.make.isDefault) Nil
- else List(dependencyAnalysis)
-
def platformPhases = List(
flatten, // get rid of inner classes
genASM // generate .class files
- ) ++ depAnalysisPhase
+ )
lazy val externalEquals = getDecl(BoxesRunTimeClass, nme.equals_)
lazy val externalEqualsNumNum = getDecl(BoxesRunTimeClass, nme.equalsNumNum)
View
253 src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala
@@ -1,253 +0,0 @@
-package scala.tools.nsc
-package dependencies
-
-import io.Path
-import scala.collection._
-import scala.tools.nsc.io.AbstractFile
-import scala.reflect.internal.util.SourceFile
-
-trait DependencyAnalysis extends SubComponent with Files {
- import global._
-
- val phaseName = "dependencyAnalysis"
-
- def off = settings.make.isDefault || settings.make.value == "all"
- def shouldCheckClasspath = settings.make.value != "transitivenocp"
-
- def newPhase(prev: Phase) = new AnalysisPhase(prev)
-
- private def depPath = Path(settings.dependenciesFile.value)
- def loadDependencyAnalysis(): Boolean = (
- depPath.path != "none" && depPath.isFile && loadFrom(
- AbstractFile.getFile(depPath),
- path => AbstractFile.getFile(depPath.parent resolve Path(path))
- )
- )
- def saveDependencyAnalysis(): Unit = {
- if (!depPath.exists)
- dependenciesFile = AbstractFile.getFile(depPath.createFile())
-
- /** The directory where file lookup should start */
- val rootPath = depPath.parent.normalize
- saveDependencies(
- file => rootPath.relativize(Path(file.file).normalize).path
- )
- }
-
- lazy val maxDepth = settings.make.value match {
- case "changed" => 0
- case "immediate" => 1
- case _ => Int.MaxValue
- }
-
- // todo: order insensible checking and, also checking timestamp?
- def validateClasspath(cp1: String, cp2: String): Boolean = cp1 == cp2
-
- def nameToFile(src: AbstractFile, name: String) =
- settings.outputDirs.outputDirFor(src)
- .lookupPathUnchecked(name.toString.replace(".", java.io.File.separator) + ".class", false)
-
- private var depFile: Option[AbstractFile] = None
-
- def dependenciesFile_=(file: AbstractFile) {
- assert(file ne null)
- depFile = Some(file)
- }
-
- def dependenciesFile: Option[AbstractFile] = depFile
-
- def classpath = settings.classpath.value
- def newDeps = new FileDependencies(classpath)
-
- var dependencies = newDeps
-
- def managedFiles = dependencies.dependencies.keySet
-
- /** Top level definitions per source file. */
- val definitions: mutable.Map[AbstractFile, List[Symbol]] =
- new mutable.HashMap[AbstractFile, List[Symbol]] {
- override def default(f: AbstractFile) = Nil
- }
-
- /** External references used by source file. */
- val references: mutable.Map[AbstractFile, immutable.Set[String]] =
- new mutable.HashMap[AbstractFile, immutable.Set[String]] {
- override def default(f: AbstractFile) = immutable.Set()
- }
-
- /** External references for inherited members used in the source file */
- val inherited: mutable.Map[AbstractFile, immutable.Set[Inherited]] =
- new mutable.HashMap[AbstractFile, immutable.Set[Inherited]] {
- override def default(f: AbstractFile) = immutable.Set()
- }
-
- /** Write dependencies to the current file. */
- def saveDependencies(fromFile: AbstractFile => String) =
- if(dependenciesFile.isDefined)
- dependencies.writeTo(dependenciesFile.get, fromFile)
-
- /** Load dependencies from the given file and save the file reference for
- * future saves.
- */
- def loadFrom(f: AbstractFile, toFile: String => AbstractFile): Boolean = {
- dependenciesFile = f
- FileDependencies.readFrom(f, toFile) match {
- case Some(fd) =>
- val success = if (shouldCheckClasspath) validateClasspath(fd.classpath, classpath) else true
- dependencies = if (success) fd else {
- if (settings.debug.value)
- println("Classpath has changed. Nuking dependencies")
- newDeps
- }
-
- success
- case None => false
- }
- }
-
- def calculateFiles(files: List[SourceFile]): List[SourceFile] =
- if (off) files
- else if (dependencies.isEmpty) {
- println("No known dependencies. Compiling " +
- (if (settings.debug.value) files.mkString(", ") else "everything"))
- files
- } else {
- val (direct, indirect) = dependencies.invalidatedFiles(maxDepth);
- val filtered = files.filter(x => {
- val f = x.file.absolute
- direct(f) || indirect(f) || !dependencies.containsFile(f);
- })
- filtered match {
- case Nil => println("No changes to recompile");
- case x => println("Recompiling " + (
- if(settings.debug.value) x.mkString(", ") else x.length + " files")
- )
- }
- filtered
- }
-
- case class Inherited(qualifier: String, member: Name)
-
- class AnalysisPhase(prev: Phase) extends StdPhase(prev) {
-
- override def cancelled(unit: CompilationUnit) =
- super.cancelled(unit) && !unit.isJava
-
- def apply(unit : global.CompilationUnit) {
- val f = unit.source.file.file
- // When we're passed strings by the interpreter
- // they have no source file. We simply ignore this case
- // as irrelevant to dependency analysis.
- if (f != null){
- val source: AbstractFile = unit.source.file;
- for (d <- unit.icode){
- val name = d.toString
- d.symbol match {
- case s : ModuleClassSymbol =>
- val isTopLevelModule = exitingPickler { !s.isImplClass && !s.isNestedClass }
-
- if (isTopLevelModule && (s.companionModule != NoSymbol)) {
- dependencies.emits(source, nameToFile(unit.source.file, name))
- }
- dependencies.emits(source, nameToFile(unit.source.file, name + "$"))
- case _ =>
- dependencies.emits(source, nameToFile(unit.source.file, name))
- }
- }
-
- dependencies.reset(source)
- for (d <- unit.depends; if (d.sourceFile != null)){
- dependencies.depends(source, d.sourceFile)
- }
- }
-
- // find all external references in this compilation unit
- val file = unit.source.file
- references += file -> immutable.Set.empty[String]
- inherited += file -> immutable.Set.empty[Inherited]
-
- val buf = new mutable.ListBuffer[Symbol]
-
- (new Traverser {
- override def traverse(tree: Tree) {
- if ((tree.symbol ne null)
- && (tree.symbol != NoSymbol)
- && (!tree.symbol.isPackage)
- && (!tree.symbol.isJavaDefined)
- && (!tree.symbol.tpe.isError)
- && ((tree.symbol.sourceFile eq null)
- || (tree.symbol.sourceFile.path != file.path))
- && (!tree.symbol.isClassConstructor)) {
- updateReferences(tree.symbol.fullName)
- // was "at uncurryPhase.prev", which is actually non-deterministic
- // because the continuations plugin may or may not supply uncurry's
- // immediately preceding phase.
- enteringRefchecks(checkType(tree.symbol.tpe))
- }
-
- tree match {
- case cdef: ClassDef if !cdef.symbol.hasPackageFlag &&
- !cdef.symbol.isAnonymousFunction =>
- if (cdef.symbol != NoSymbol) buf += cdef.symbol
- // was "at erasurePhase.prev"
- enteringExplicitOuter {
- for (s <- cdef.symbol.info.decls)
- s match {
- case ts: TypeSymbol if !ts.isClass =>
- checkType(s.tpe)
- case _ =>
- }
- }
- super.traverse(tree)
-
- case ddef: DefDef =>
- // was "at typer.prev"
- enteringTyper { checkType(ddef.symbol.tpe) }
- super.traverse(tree)
- case a @ Select(q, n) if ((a.symbol != NoSymbol) && (q.symbol != null)) => // #2556
- if (!a.symbol.isConstructor &&
- !a.symbol.owner.isPackageClass &&
- !isSameType(q.tpe, a.symbol.owner.tpe))
- inherited += file ->
- (inherited(file) + Inherited(q.symbol.tpe.resultType.safeToString, n))
- super.traverse(tree)
- case _ =>
- super.traverse(tree)
- }
- }
-
- def checkType(tpe: Type): Unit =
- tpe match {
- case t: MethodType =>
- checkType(t.resultType)
- for (s <- t.params) checkType(s.tpe)
-
- case t: TypeRef =>
- if (t.sym.isAliasType) {
- updateReferences(t.typeSymbolDirect.fullName)
- checkType(t.typeSymbolDirect.info)
- }
- updateReferences(t.typeSymbol.fullName)
- for (tp <- t.args) checkType(tp)
-
- case t: PolyType =>
- checkType(t.resultType)
- updateReferences(t.typeSymbol.fullName)
-
- case t: NullaryMethodType =>
- checkType(t.resultType)
- updateReferences(t.typeSymbol.fullName)
-
- case t =>
- updateReferences(t.typeSymbol.fullName)
- }
-
- def updateReferences(s: String): Unit =
- references += file -> (references(file) + s)
-
- }).apply(unit.body)
-
- definitions(unit.source.file) = buf.toList
- }
- }
-}
View
177 src/compiler/scala/tools/nsc/dependencies/Files.scala
@@ -1,177 +0,0 @@
-package scala.tools.nsc
-package dependencies
-
-import java.io.{InputStream, OutputStream, PrintStream, InputStreamReader, BufferedReader}
-import io.{AbstractFile, PlainFile, VirtualFile}
-
-import scala.collection._
-
-
-trait Files { self : SubComponent =>
-
- class FileDependencies(val classpath: String) {
- import FileDependencies._
-
- class Tracker extends mutable.OpenHashMap[AbstractFile, mutable.Set[AbstractFile]] {
- override def default(key: AbstractFile) = {
- this(key) = new mutable.HashSet[AbstractFile]
- this(key)
- }
- }
-
- val dependencies = new Tracker
- val targets = new Tracker
-
- def isEmpty = dependencies.isEmpty && targets.isEmpty
-
- def emits(source: AbstractFile, result: AbstractFile) =
- targets(source) += result
- def depends(from: AbstractFile, on: AbstractFile) =
- dependencies(from) += on
-
- def reset(file: AbstractFile) = dependencies -= file
-
- def cleanEmpty = {
- dependencies foreach {case (_, value) =>
- value retain (x => x.exists && (x ne removedFile))}
- dependencies retain ((key, value) => key.exists && !value.isEmpty)
- targets foreach {case (_, value) => value retain (_.exists)}
- targets retain ((key, value) => key.exists && !value.isEmpty)
- }
-
- def containsFile(f: AbstractFile) = targets.contains(f.absolute)
-
- def invalidatedFiles(maxDepth: Int) = {
- val direct = new mutable.HashSet[AbstractFile]
-
- for ((file, products) <- targets) {
- // This looks a bit odd. It may seem like one should invalidate a file
- // if *any* of its dependencies are older than it. The forall is there
- // to deal with the fact that a) Some results might have been orphaned
- // and b) Some files might not need changing.
- direct(file) ||= products.forall(d => d.lastModified < file.lastModified)
- }
-
- val indirect = dependentFiles(maxDepth, direct)
-
- for ((source, targets) <- targets
- if direct(source) || indirect(source) || (source eq removedFile)) {
- targets foreach (_.delete)
- targets -= source
- }
-
- (direct, indirect)
- }
-
- /** Return the set of files that depend on the given changed files.
- * It computes the transitive closure up to the given depth.
- */
- def dependentFiles(depth: Int, changed: Set[AbstractFile]): Set[AbstractFile] = {
- val indirect = new mutable.HashSet[AbstractFile]
- val newInvalidations = new mutable.HashSet[AbstractFile]
-
- def invalid(file: AbstractFile) =
- indirect(file) || changed(file) || (file eq removedFile)
-
- def go(i: Int) : Unit = if(i > 0) {
- newInvalidations.clear
- for((target, depends) <- dependencies if !invalid(target);
- d <- depends)
- newInvalidations(target) ||= invalid(d)
-
- indirect ++= newInvalidations
- if (!newInvalidations.isEmpty) go(i - 1)
- }
-
- go(depth)
-
- indirect --= changed
- }
-
- def writeTo(file: AbstractFile, fromFile: AbstractFile => String): Unit =
- writeToFile(file)(out => writeTo(new PrintStream(out), fromFile))
-
- def writeTo(print: PrintStream, fromFile: AbstractFile => String): Unit = {
- def emit(tracker: Tracker) =
- for ((f, ds) <- tracker; d <- ds) print.println(fromFile(f) + arrow + fromFile(d))
-
- cleanEmpty
- print.println(classpath)
- print.println(separator)
- emit(dependencies)
- print.println(separator)
- emit(targets)
- }
- }
-
- object FileDependencies {
- private val separator:String = "-------"
- private val arrow = " -> "
- private val removedFile = new VirtualFile("removed")
-
- private def validLine(l: String) = (l != null) && (l != separator)
-
- def readFrom(file: AbstractFile, toFile: String => AbstractFile): Option[FileDependencies] =
- readFromFile(file) { in =>
- val reader = new BufferedReader(new InputStreamReader(in))
- val it = new FileDependencies(reader.readLine)
-
- def readLines(valid: Boolean)(f: (AbstractFile, AbstractFile) => Unit): Boolean = {
- var continue = valid
- var line: String = null
- while (continue && {line = reader.readLine; validLine(line)}) {
- line.split(arrow) match {
- case Array(from, on) => f(toFile(from), toFile(on))
- case _ =>
- global.inform("Parse error: Unrecognised string " + line)
- continue = false
- }
- }
- continue
- }
-
- reader.readLine
-
- val dResult = readLines(true)(
- (_, _) match {
- case (null, _) => // fromFile is removed, it's ok
- case (fromFile, null) =>
- // onFile is removed, should recompile fromFile
- it.depends(fromFile, removedFile)
- case (fromFile, onFile) => it.depends(fromFile, onFile)
- })
-
- readLines(dResult)(
- (_, _) match {
- case (null, null) =>
- // source and target are all removed, it's ok
- case (null, targetFile) =>
- // source is removed, should remove relative target later
- it.emits(removedFile, targetFile)
- case (_, null) =>
- // it may has been cleaned outside, or removed during last phase
- case (sourceFile, targetFile) => it.emits(sourceFile, targetFile)
- })
-
- Some(it)
- }
- }
-
- def writeToFile[T](file: AbstractFile)(f: OutputStream => T) : T = {
- val out = file.bufferedOutput
- try {
- f(out)
- } finally {
- out.close
- }
- }
-
- def readFromFile[T](file: AbstractFile)(f: InputStream => T) : T = {
- val in = file.input
- try{
- f(in)
- } finally {
- in.close
- }
- }
-}
View
83 src/compiler/scala/tools/nsc/interactive/BuildManager.scala
@@ -1,83 +0,0 @@
-/* NSC -- new Scala compiler
- * Copyright 2009-2013 Typesafe/Scala Solutions and LAMP/EPFL
- * @author Iulian Dragos
- * @author Hubert Plocinicak
- */
-package scala.tools.nsc
-package interactive
-
-import scala.collection._
-import io.AbstractFile
-import scala.language.implicitConversions
-
-trait BuildManager {
-
- /** Add the given source files to the managed build process. */
- def addSourceFiles(files: Set[AbstractFile])
-
- /** The given files have been modified by the user. Recompile
- * them and their dependent files.
- */
- def update(added: Set[AbstractFile], removed: Set[AbstractFile])
-
- /** Notification that the supplied set of files is being built */
- def buildingFiles(included: Set[AbstractFile]) {}
-
- /** Load saved dependency information. */
- def loadFrom(file: AbstractFile, toFile: String => AbstractFile) : Boolean
-
- /** Save dependency information to `file`. */
- def saveTo(file: AbstractFile, fromFile: AbstractFile => String)
-
- def compiler: scala.tools.nsc.Global
-
- /** Delete classfiles derived from the supplied set of sources */
- def deleteClassfiles(sources : Set[AbstractFile]) {
- val targets = compiler.dependencyAnalysis.dependencies.targets
- for(source <- sources; cf <- targets(source))
- cf.delete
- }
-}
-
-
-/** Simple driver for testing the build manager. It presents
- * the user to a 'resident compiler' prompt. Each line is
- * interpreted as a set of files that have changed. The builder
- * then derives the dependent files and recompiles them.
- */
-object BuildManagerTest extends EvalLoop {
-
- def prompt = "builder > "
-
- private def buildError(msg: String) {
- println(msg + "\n scalac -help gives more information")
- }
-
- def main(args: Array[String]) {
- implicit def filesToSet(fs: List[String]): Set[AbstractFile] = {
- def partition(s: String, r: Tuple2[List[AbstractFile], List[String]])= {
- val v = AbstractFile.getFile(s)
- if (v == null) (r._1, s::r._2) else (v::r._1, r._2)
- }
- val result = fs.foldRight((List[AbstractFile](), List[String]()))(partition)
- if (!result._2.isEmpty)
- Console.err.println("No such file(s): " + result._2.mkString(","))
- Set.empty ++ result._1
- }
-
- val settings = new Settings(buildError)
- settings.Ybuildmanagerdebug.value = true
- val command = new CompilerCommand(args.toList, settings)
- val buildManager: BuildManager = new RefinedBuildManager(settings)
-
- buildManager.addSourceFiles(command.files)
-
- // enter resident mode
- loop { line =>
- val args = line.split(' ').toList
- val command = new CompilerCommand(args, settings)
- buildManager.update(command.files, Set.empty)
- }
-
- }
-}
View
354 src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala
@@ -1,354 +0,0 @@
-/* NSC -- new Scala compiler
- * Copyright 2009-2013 Typesafe/Scala Solutions and LAMP/EPFL
- * @author Iulian Dragos
- * @author Hubert Plocinicak
- */
-package scala.tools.nsc
-package interactive
-
-import scala.collection._
-import scala.tools.nsc.reporters.{Reporter, ConsoleReporter}
-import scala.util.control.Breaks._
-import scala.tools.nsc.symtab.Flags
-
-import dependencies._
-import util.ClassPath
-import io.AbstractFile
-import scala.tools.util.PathResolver
-
-/** A more defined build manager, based on change sets. For each
- * updated source file, it computes the set of changes to its
- * definitions, then checks all dependent units to see if the
- * changes require a compilation. It repeats this process until
- * a fixpoint is reached.
- */
-@deprecated("Use sbt incremental compilation mechanism", "2.10.0")
-class RefinedBuildManager(val settings: Settings) extends Changes with BuildManager {
-
- class BuilderGlobal(settings: Settings, reporter : Reporter) extends scala.tools.nsc.Global(settings, reporter) {
-
- def this(settings: Settings) =
- this(settings, new ConsoleReporter(settings))
-
- override def computeInternalPhases() {
- super.computeInternalPhases
- phasesSet += dependencyAnalysis
- }
- lazy val _classpath = new NoSourcePathPathResolver(settings).result
- override def classPath = _classpath.asInstanceOf[ClassPath[platform.BinaryRepr]]
- // See discussion in JavaPlatForm for why we need a cast here.
-
- def newRun() = new Run()
- }
-
- class NoSourcePathPathResolver(settings: Settings) extends PathResolver(settings) {
- override def containers = Calculated.basis.dropRight(1).flatten.distinct
- }
-
- protected def newCompiler(settings: Settings) = new BuilderGlobal(settings)
-
- val compiler = newCompiler(settings)
- import compiler.{ Symbol, Type, enteringErasure }
- import compiler.dependencyAnalysis.Inherited
-
- private case class SymWithHistory(sym: Symbol, befErasure: Type)
-
- /** Managed source files. */
- private val sources: mutable.Set[AbstractFile] = new mutable.HashSet[AbstractFile]
-
- private val definitions: mutable.Map[AbstractFile, List[SymWithHistory]] =
- new mutable.HashMap[AbstractFile, List[SymWithHistory]] {
- override def default(key: AbstractFile) = Nil
- }
-
- /** External references used by source file. */
- private var references: mutable.Map[AbstractFile, immutable.Set[String]] = _
-
- /** External references for inherited members */
- private var inherited: mutable.Map[AbstractFile, immutable.Set[Inherited]] = _
-
- /** Reverse of definitions, used for caching */
- private val classes: mutable.Map[String, AbstractFile] =
- new mutable.HashMap[String, AbstractFile] {
- override def default(key: String) = null
- }
-
- /** Add the given source files to the managed build process. */
- def addSourceFiles(files: Set[AbstractFile]) {
- sources ++= files
- update(files)
- }
-
- /** Remove the given files from the managed build process. */
- def removeFiles(files: Set[AbstractFile]) {
- sources --= files
- deleteClassfiles(files)
- update(invalidatedByRemove(files))
- }
-
- /** Return the set of invalidated files caused by removing the given files.
- */
- private def invalidatedByRemove(files: Set[AbstractFile]): Set[AbstractFile] = {
- val changes = new mutable.HashMap[Symbol, List[Change]]
- for (f <- files; SymWithHistory(sym, _) <- definitions(f))
- changes += sym -> List(Removed(Class(sym.fullName)))
- invalidated(files, changes)
- }
-
- def update(added: Set[AbstractFile], removed: Set[AbstractFile]) {
- sources --= removed
- deleteClassfiles(removed)
- update(added ++ invalidatedByRemove(removed))
- }
-
- /** The given files have been modified by the user. Recompile
- * them and all files that depend on them. Only files that
- * have been previously added as source files are recompiled.
- * Files that were already compiled are taken out from the result
- * of the dependency analysis.
- */
- private def update(files: Set[AbstractFile]) = {
- val coll: mutable.Map[AbstractFile, immutable.Set[AbstractFile]] =
- mutable.HashMap[AbstractFile, immutable.Set[AbstractFile]]()
- compiler.reporter.reset()
-
- // See if we really have corresponding symbols, not just those
- // which share the name
- def isCorrespondingSym(from: Symbol, to: Symbol): Boolean =
- (from.hasFlag(Flags.TRAIT) == to.hasFlag(Flags.TRAIT)) && // has to run in 2.8, so no hasTraitFlag
- (from.hasFlag(Flags.MODULE) == to.hasFlag(Flags.MODULE))
-
- // For testing purposes only, order irrelevant for compilation
- def toStringSet(set: Set[AbstractFile]): String =
- set.toList sortBy (_.name) mkString("Set(", ", ", ")")
-
- def update0(files: Set[AbstractFile]): Unit = if (!files.isEmpty) {
- deleteClassfiles(files)
- val run = compiler.newRun()
- if (settings.Ybuildmanagerdebug.value)
- compiler.inform("compiling " + toStringSet(files))
- buildingFiles(files)
-
- run.compileFiles(files.toList)
- if (compiler.reporter.hasErrors) {
- return
- }
-
- // Deterministic behaviour required by partest
- val changesOf = new mutable.HashMap[Symbol, List[Change]] {
- override def toString: String = {
- val changesOrdered =
- toList.map(e => {
- e._1.toString + " -> " +
- e._2.sortBy(_.toString).mkString("List(", ", ", ")")
- })
- changesOrdered.sorted.mkString("Map(", ", ", ")")
- }
- }
- val additionalDefs: mutable.HashSet[AbstractFile] = mutable.HashSet.empty
-
- val defs = compiler.dependencyAnalysis.definitions
- for (src <- files) {
- if (definitions(src).isEmpty)
- additionalDefs ++= compiler.dependencyAnalysis.
- dependencies.dependentFiles(1, mutable.Set(src))
- else {
- val syms = defs(src)
- for (sym <- syms) {
- definitions(src).find(
- s => (s.sym.fullName == sym.fullName) &&
- isCorrespondingSym(s.sym, sym)) match {
- case Some(SymWithHistory(oldSym, info)) =>
- val changes = changeSet(oldSym.info, sym)
- val changesErasure = enteringErasure(changeSet(info, sym))
-
- changesOf(oldSym) = (changes ++ changesErasure).distinct
- case _ =>
- // a new top level definition
- changesOf(sym) = sym.parentSymbols filter (_.isSealed) map (p =>
- changeChangeSet(p, sym+" extends a sealed "+p))
- }
- }
- // Create a change for the top level classes that were removed
- val removed = definitions(src) filterNot ((s:SymWithHistory) =>
- syms.find(_.fullName == (s.sym.fullName)) != None)
- for (s <- removed) {
- changesOf(s.sym) = List(removeChangeSet(s.sym))
- }
- }
- }
- if (settings.Ybuildmanagerdebug.value)
- compiler.inform("Changes: " + changesOf)
- updateDefinitions(files)
- val invalid = invalidated(files, changesOf, additionalDefs)
- update0(checkCycles(invalid, files, coll))
- }
-
- update0(files)
- // remove the current run in order to save some memory
- compiler.dropRun()
- }
-
- // Attempt to break the cycling reference deps as soon as possible and reduce
- // the number of compilations to minimum without having too coarse grained rules
- private def checkCycles(files: Set[AbstractFile], initial: Set[AbstractFile],
- collect: mutable.Map[AbstractFile, immutable.Set[AbstractFile]]):
- Set[AbstractFile] = {
- def followChain(set: Set[AbstractFile], rest: immutable.Set[AbstractFile]):
- immutable.Set[AbstractFile] = {
- val deps:Set[AbstractFile] = set.flatMap(
- s => collect.get(s) match {
- case Some(x) => x
- case _ => Set[AbstractFile]()
- })
- val newDeps = deps -- rest
- if (newDeps.isEmpty) rest else followChain(newDeps, rest ++ newDeps)
- }
- var res:Set[AbstractFile] = mutable.Set()
- files.foreach( f =>
- if (collect contains f) {
- val chain = followChain(Set(f), immutable.Set()) ++ files
- chain.foreach((fc: AbstractFile) => collect += fc -> chain)
- res ++= chain
- } else
- res += f
- )
-
- initial.foreach((f: AbstractFile) => collect += (f -> (collect.getOrElse(f, immutable.Set()) ++ res)))
- if (res.subsetOf(initial)) Set() else res
- }
-
- /** Return the set of source files that are invalidated by the given changes. */
- def invalidated(files: Set[AbstractFile], changesOf: scala.collection.Map[Symbol, List[Change]],
- processed: Set[AbstractFile] = Set.empty):
- Set[AbstractFile] = {
- val buf = new mutable.HashSet[AbstractFile]
- val newChangesOf = new mutable.HashMap[Symbol, List[Change]]
- var directDeps =
- compiler.dependencyAnalysis.dependencies.dependentFiles(1, files)
-
- def invalidate(file: AbstractFile, reason: String, change: Change) = {
- if (settings.Ybuildmanagerdebug.value)
- compiler.inform("invalidate " + file + " because " + reason + " [" + change + "]")
- buf += file
- directDeps -= file
- for (syms <- definitions(file)) // fixes #2557
- newChangesOf(syms.sym) = List(change, parentChangeSet(syms.sym))
- break
- }
-
- for ((oldSym, changes) <- changesOf; change <- changes) {
- def checkParents(cls: Symbol, file: AbstractFile) {
- val parentChange = cls.parentSymbols exists (_.fullName == oldSym.fullName)
- // if (settings.buildmanagerdebug.value)
- // compiler.inform("checkParents " + cls + " oldSym: " + oldSym + " parentChange: " + parentChange + " " + cls.info.parents)
- change match {
- case Changed(Class(_)) if parentChange =>
- invalidate(file, "parents have changed", change)
-
- case Changed(Definition(_)) if parentChange =>
- invalidate(file, "inherited method changed", change)
-
- case Added(Definition(_)) if parentChange =>
- invalidate(file, "inherited new method", change)
-
- case Removed(Definition(_)) if parentChange =>
- invalidate(file, "inherited method removed", change)
-
- case _ => ()
- }
- }
-
- def checkInterface(cls: Symbol, file: AbstractFile) {
- change match {
- case Added(Definition(name)) =>
- if (cls.info.decls.iterator.exists(_.fullName == name))
- invalidate(file, "of new method with existing name", change)
- case Changed(Class(name)) =>
- if (cls.info.typeSymbol.fullName == name)
- invalidate(file, "self type changed", change)
- case _ =>
- ()
- }
- }
-
- def checkReferences(file: AbstractFile) {
- //if (settings.buildmanagerdebug.value)
- // compiler.inform(file + ":" + references(file))
- val refs = references(file)
- if (refs.isEmpty)
- invalidate(file, "it is a direct dependency and we don't yet have finer-grained dependency information", change)
- else {
- change match {
- case Removed(Definition(name)) if refs(name) =>
- invalidate(file, "it references deleted definition", change)
- case Removed(Class(name)) if (refs(name)) =>
- invalidate(file, "it references deleted class", change)
- case Changed(Class(name)) if (refs(name)) =>
- invalidate(file, "it references changed class", change)
- case Changed(Definition(name)) if (refs(name)) =>
- invalidate(file, "it references changed definition", change)
- case Added(Definition(name)) if (refs(name)) =>
- invalidate(file, "it references added definition", change)
- case _ => ()
- }
- }
- }
-
- def checkInheritedReferences(file: AbstractFile) {
- val refs = inherited(file)
- if (!refs.isEmpty)
- change match {
- case ParentChanged(Class(name)) =>
- for (Inherited(q, member) <- refs.find(p => (p != null && p.qualifier == name));
- classFile <- classes.get(q);
- defs <- definitions.get(classFile);
- s <- defs.find(p => p.sym.fullName == q)
- if ((s.sym).tpe.nonPrivateMember(member) == compiler.NoSymbol))
- invalidate(file, "it references invalid (no longer inherited) definition", change)
- ()
- case _ => ()
- }
- }
-
- for (file <- directDeps) {
- breakable {
- for (cls <- definitions(file)) checkParents(cls.sym, file)
- for (cls <- definitions(file)) checkInterface(cls.sym, file)
- checkReferences(file)
- checkInheritedReferences(file)
- }
- }
- }
- if (buf.isEmpty)
- processed
- else
- invalidated(buf.clone() --= processed, newChangesOf, processed ++ buf)
- }
-
- /** Update the map of definitions per source file */
- private def updateDefinitions(files: Set[AbstractFile]) {
- for (src <- files; localDefs = compiler.dependencyAnalysis.definitions(src)) {
- definitions(src) = (localDefs map (s => {
- this.classes += s.fullName -> src
- SymWithHistory(s.cloneSymbol, enteringErasure(s.info.cloneInfo(s)))
- }))
- }
- this.references = compiler.dependencyAnalysis.references
- this.inherited = compiler.dependencyAnalysis.inherited
- }
-
- /** Load saved dependency information. */
- def loadFrom(file: AbstractFile, toFile: String => AbstractFile) : Boolean = {
- val success = compiler.dependencyAnalysis.loadFrom(file, toFile)
- if (success)
- sources ++= compiler.dependencyAnalysis.managedFiles
- success
- }
-
- /** Save dependency information to `file`. */
- def saveTo(file: AbstractFile, fromFile: AbstractFile => String) {
- compiler.dependencyAnalysis.dependenciesFile = file
- compiler.dependencyAnalysis.saveDependencies(fromFile)
- }
-}
View
100 src/compiler/scala/tools/nsc/interactive/SimpleBuildManager.scala
@@ -1,100 +0,0 @@
-/* NSC -- new Scala compiler
- * Copyright 2009-2013 Typesafe/Scala Solutions and LAMP/EPFL
- * @author Martin Odersky
- */
-package scala.tools.nsc
-package interactive
-
-import scala.collection._
-
-import scala.tools.nsc.reporters.{Reporter, ConsoleReporter}
-import io.AbstractFile
-
-/** A simple build manager, using the default scalac dependency tracker.
- * The transitive closure of all dependent files on a modified file
- * is recompiled at once.
- *
- * It is equivalent to using a resident compiler mode with the
- * '-make:transitive' option.
- */
-class SimpleBuildManager(val settings: Settings) extends BuildManager {
-
- class BuilderGlobal(settings: Settings, reporter : Reporter) extends scala.tools.nsc.Global(settings, reporter) {
-
- def this(settings: Settings) =
- this(settings, new ConsoleReporter(settings))
-
- def newRun() = new Run()
- }
-
- protected def newCompiler(settings: Settings) = new BuilderGlobal(settings)
-
- val compiler = newCompiler(settings)
-
- /** Managed source files. */
- private val sources: mutable.Set[AbstractFile] = new mutable.HashSet[AbstractFile]
-
- /** Add the given source files to the managed build process. */
- def addSourceFiles(files: Set[AbstractFile]) {
- sources ++= files
- update(files)
- }
-
- /** Remove the given files from the managed build process. */
- def removeFiles(files: Set[AbstractFile]) {
- sources --= files
- deleteClassfiles(files)
- update(invalidatedByRemove(files))
- }
-
-
- /** Return the set of invalidated files caused by removing the given files. */
- private def invalidatedByRemove(files: Set[AbstractFile]): Set[AbstractFile] = {
- val deps = compiler.dependencyAnalysis.dependencies
- deps.dependentFiles(Int.MaxValue, files)
- }
-
- def update(added: Set[AbstractFile], removed: Set[AbstractFile]) {
- sources --= removed
- deleteClassfiles(removed)
- update(added ++ invalidatedByRemove(removed))
- }
-
- /** The given files have been modified by the user. Recompile
- * them and all files that depend on them. Only files that
- * have been previously added as source files are recompiled.
- */
- def update(files: Set[AbstractFile]) {
- deleteClassfiles(files)
-
- val deps = compiler.dependencyAnalysis.dependencies
- val run = compiler.newRun()
- compiler.inform("compiling " + files)
-
- val toCompile =
- (files ++ deps.dependentFiles(Int.MaxValue, files)) intersect sources
-
-
- compiler.inform("Recompiling " +
- (if(settings.debug.value) toCompile.mkString(", ")
- else toCompile.size + " files"))
-
- buildingFiles(toCompile)
-
- run.compileFiles(files.toList)
- }
-
- /** Load saved dependency information. */
- def loadFrom(file: AbstractFile, toFile: String => AbstractFile) : Boolean = {
- val success = compiler.dependencyAnalysis.loadFrom(file, toFile)
- if (success)
- sources ++= compiler.dependencyAnalysis.managedFiles
- success
- }
-
- /** Save dependency information to `file`. */
- def saveTo(file: AbstractFile, fromFile: AbstractFile => String) {
- compiler.dependencyAnalysis.dependenciesFile = file
- compiler.dependencyAnalysis.saveDependencies(fromFile)
- }
-}
View
2  src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -162,7 +162,6 @@ trait ScalaSettings extends AbsScalaSettings
val refinementMethodDispatch
= ChoiceSetting ("-Ystruct-dispatch", "policy", "structural method dispatch policy", List("no-cache", "mono-cache", "poly-cache", "invoke-dynamic"), "poly-cache")
val Yrangepos = BooleanSetting ("-Yrangepos", "Use range positions for syntax trees.")
- val Ybuilderdebug = ChoiceSetting ("-Ybuilder-debug", "manager", "Compile using the specified build manager.", List("none", "refined", "simple"), "none")
val Yreifycopypaste = BooleanSetting ("-Yreify-copypaste", "Dump the reified trees in copypasteable representation.")
val Yreplsync = BooleanSetting ("-Yrepl-sync", "Do not use asynchronous code for repl startup")
val Yreploutdir = StringSetting ("-Yrepl-outdir", "path", "Write repl-generated classfiles to given output directory (use \"\" to generate a temporary dir)" , "")
@@ -177,7 +176,6 @@ trait ScalaSettings extends AbsScalaSettings
/** Area-specific debug output.
*/
- val Ybuildmanagerdebug = BooleanSetting("-Ybuild-manager-debug", "Generate debug information for the Refined Build Manager compiler.")
val Ydocdebug = BooleanSetting("-Ydoc-debug", "Trace all scaladoc activity.")
val Yidedebug = BooleanSetting("-Yide-debug", "Generate, validate and output trees using the interactive compiler.")
val Yinferdebug = BooleanSetting("-Yinfer-debug", "Trace type inference and implicit search.")
View
1  src/partest/README
@@ -24,7 +24,6 @@ Other arguments:
* --run next files test the interpreter and all backends
* --jvm next files test the JVM backend
* --res next files test the resident compiler
- * --buildmanager next files test the build manager
* --shootout next files are shootout tests
* --script next files test the script runner
* ''-Dpartest.scalac_opts=...'' -> add compiler options
View
8 src/partest/scala/tools/partest/PartestTask.scala
@@ -43,7 +43,6 @@ import org.apache.tools.ant.types.Commandline.Argument
* - `runtests`,
* - `jvmtests`,
* - `residenttests`,
- * - `buildmanagertests`,
* - `shootouttests`,
* - `scalaptests`,
* - `scalachecktests`,
@@ -76,10 +75,6 @@ class PartestTask extends Task with CompilationPathProperty {
residentFiles = Some(input)
}
- def addConfiguredBuildManagerTests(input: FileSet) {
- buildManagerFiles = Some(input)
- }
-
def addConfiguredScalacheckTests(input: FileSet) {
scalacheckFiles = Some(input)
}
@@ -187,7 +182,6 @@ class PartestTask extends Task with CompilationPathProperty {
private var runFiles: Option[FileSet] = None
private var jvmFiles: Option[FileSet] = None
private var residentFiles: Option[FileSet] = None
- private var buildManagerFiles: Option[FileSet] = None
private var scalacheckFiles: Option[FileSet] = None
private var scriptFiles: Option[FileSet] = None
private var shootoutFiles: Option[FileSet] = None
@@ -244,7 +238,6 @@ class PartestTask extends Task with CompilationPathProperty {
private def getRunFiles = getFilesAndDirs(runFiles)
private def getJvmFiles = getFilesAndDirs(jvmFiles)
private def getResidentFiles = getFiles(residentFiles)
- private def getBuildManagerFiles = getFilesAndDirs(buildManagerFiles)
private def getScalacheckFiles = getFilesAndDirs(scalacheckFiles)
private def getScriptFiles = getFiles(scriptFiles)
private def getShootoutFiles = getFiles(shootoutFiles)
@@ -363,7 +356,6 @@ class PartestTask extends Task with CompilationPathProperty {
(getRunFiles, "run", "Compiling and running files"),
(getJvmFiles, "jvm", "Compiling and running files"),
(getResidentFiles, "res", "Running resident compiler scenarii"),
- (getBuildManagerFiles, "buildmanager", "Running Build Manager scenarii"),
(getScalacheckFiles, "scalacheck", "Running scalacheck tests"),
(getScriptFiles, "script", "Running script files"),
(getShootoutFiles, "shootout", "Running shootout tests"),
View
1  src/partest/scala/tools/partest/nest/ConsoleRunner.scala
@@ -31,7 +31,6 @@ class ConsoleRunner extends DirectRunner {
TestSet("run", stdFilter, "Testing interpreter and backend"),
TestSet("jvm", stdFilter, "Testing JVM backend"),
TestSet("res", x => x.isFile && (x hasExtension "res"), "Testing resident compiler"),
- TestSet("buildmanager", _.isDirectory, "Testing Build Manager"),
TestSet("shootout", stdFilter, "Testing shootout tests"),
TestSet("script", stdFilter, "Testing script tests"),
TestSet("scalacheck", stdFilter, "Testing ScalaCheck tests"),
View
1  src/partest/scala/tools/partest/nest/NestUI.scala
@@ -73,7 +73,6 @@ object NestUI {
println(" --run run interpreter and backend tests")
println(" --jvm run JVM backend tests")
println(" --res run resident compiler tests")
- println(" --buildmanager run Build Manager tests")
println(" --scalacheck run ScalaCheck tests")
println(" --script run script runner tests")
println(" --shootout run shootout tests")
View
116 src/partest/scala/tools/partest/nest/RunnerManager.scala
@@ -19,7 +19,6 @@ import scala.tools.nsc.util.{ ClassPath, FakePos, ScalaClassLoader, stackTraceSt
import ClassPath.{ join, split }
import scala.tools.scalap.scalax.rules.scalasig.ByteCode
import scala.collection.{ mutable, immutable }
-import scala.tools.nsc.interactive.{ BuildManager, RefinedBuildManager }
import scala.sys.process._
import java.util.concurrent.{ Executors, TimeUnit, TimeoutException }
import PartestDefaults.{ javaCmd, javacCmd }
@@ -530,121 +529,6 @@ class RunnerManager(kind: String, val fileManager: FileManager, params: TestRunP
case "ant" =>
runAntTest(file)
- case "buildmanager" =>
- val (swr, wr) = newTestWriters()
- printInfoStart(file, wr)
- val (outDir, testFile, changesDir) = {
- if (!file.isDirectory)
- (null, null, null)
- else {
- NestUI.verbose(this+" running test "+fileBase)
- val outDir = createOutputDir()
- val testFile = new File(file, fileBase + ".test")
- val changesDir = new File(file, fileBase + ".changes")
-
- if (changesDir.isFile || !testFile.isFile) {
- // if changes exists then it has to be a dir
- if (!testFile.isFile) NestUI.verbose("invalid build manager test file")
- if (changesDir.isFile) NestUI.verbose("invalid build manager changes directory")
- (null, null, null)
- }
- else {
- copyTestFiles(file, outDir)
- NestUI.verbose("outDir: "+outDir)
- NestUI.verbose("logFile: "+logFile)
- (outDir, testFile, changesDir)
- }
- }
- }
- if (outDir == null)
- return (false, LogContext(logFile))
-
- // Pre-conditions satisfied
- val sourcepath = outDir.getAbsolutePath+File.separator
-
- // configure input/output files
- val logWriter = new PrintStream(new FileOutputStream(logFile), true)
- val testReader = new BufferedReader(new FileReader(testFile))
- val logConsoleWriter = new PrintWriter(logWriter, true)
-
- // create proper settings for the compiler
- val settings = new Settings(workerError)
- settings.outdir.value = outDir.getAbsoluteFile.getAbsolutePath
- settings.sourcepath.value = sourcepath
- settings.classpath.value = fileManager.CLASSPATH
- settings.Ybuildmanagerdebug.value = true
-
- // simulate Build Manager loop
- val prompt = "builder > "
- val reporter = new ConsoleReporter(settings, scala.Console.in, logConsoleWriter)
- val bM: BuildManager =
- new RefinedBuildManager(settings) {
- override protected def newCompiler(settings: Settings) =
- new BuilderGlobal(settings, reporter)
- }
-
- def testCompile(line: String): Boolean = {
- NestUI.verbose("compiling " + line)
- val args = (line split ' ').toList
- val command = new CompilerCommand(args, settings)
- command.ok && {
- bM.update(filesToSet(settings.sourcepath.value, command.files), Set.empty)
- !reporter.hasErrors
- }
- }
-
- val updateFiles = (line: String) => {
- NestUI.verbose("updating " + line)
- (line split ' ').toList forall (u =>
- (u split "=>").toList match {
- case origFileName::(newFileName::Nil) =>
- val newFile = new File(changesDir, newFileName)
- if (newFile.isFile) {
- val v = overwriteFileWith(new File(outDir, origFileName), newFile)
- if (!v)
- NestUI.verbose("'update' operation on " + u + " failed")
- v
- } else {
- NestUI.verbose("File " + newFile + " is invalid")
- false
- }
- case a =>
- NestUI.verbose("Other =: " + a)
- false
- }
- )
- }
-
- def loop(): Boolean = {
- testReader.readLine() match {
- case null | "" =>
- NestUI.verbose("finished")
- true
- case s if s startsWith ">>update " =>
- updateFiles(s stripPrefix ">>update ") && loop()
- case s if s startsWith ">>compile " =>
- val files = s stripPrefix ">>compile "
- logWriter.println(prompt + files)
- // In the end, it can finish with an error
- if (testCompile(files)) loop()
- else {
- val t = testReader.readLine()
- (t == null) || (t == "")
- }
- case s =>
- NestUI.verbose("wrong command in test file: " + s)
- false
- }
- }
-
- Output.withRedirected(logWriter) {
- try loop()
- finally testReader.close()
- }
- fileManager.mapFile(logFile, replaceSlashes(new File(sourcepath), _))
-
- (diffCheck(file, compareOutput(file, logFile)), LogContext(logFile, swr, wr))
-
case "res" => {
// simulate resident compiler loop
val prompt = "\nnsc> "
View
1  src/partest/scala/tools/partest/nest/TestFile.scala
@@ -54,7 +54,6 @@ abstract class TestFile(val kind: String) extends TestFileCommon {
case class PosTestFile(file: JFile, fileManager: FileManager) extends TestFile("pos")
case class NegTestFile(file: JFile, fileManager: FileManager) extends TestFile("neg")
case class RunTestFile(file: JFile, fileManager: FileManager) extends TestFile("run")
-case class BuildManagerTestFile(file: JFile, fileManager: FileManager) extends TestFile("bm")
case class ScalaCheckTestFile(file: JFile, fileManager: FileManager) extends TestFile("scalacheck")
case class JvmTestFile(file: JFile, fileManager: FileManager) extends TestFile("jvm")
case class ShootoutTestFile(file: JFile, fileManager: FileManager) extends TestFile("shootout") {
View
2  test/disabled/presentation/simple-tests.check
@@ -187,8 +187,6 @@ TypeMember(value Xshowobj,Tester.this.settings.StringSetting,false,true,<none>)
TypeMember(value Xshowtrees,Tester.this.settings.BooleanSetting,false,true,<none>)
TypeMember(value Xwarnfatal,Tester.this.settings.BooleanSetting,false,true,<none>)
TypeMember(value Xwarninit,Tester.this.settings.BooleanSetting,false,true,<none>)
-TypeMember(value Ybuilderdebug,Tester.this.settings.ChoiceSetting,false,true,<none>)
-TypeMember(value Ybuildmanagerdebug,Tester.this.settings.BooleanSetting,false,true,<none>)
TypeMember(value Ycompacttrees,Tester.this.settings.BooleanSetting,false,true,<none>)
TypeMember(value Ycompletion,Tester.this.settings.BooleanSetting,false,true,<none>)
TypeMember(value YdepMethTpes,Tester.this.settings.BooleanSetting,false,true,<none>)
View
1  test/files/buildmanager/annotated/A.scala
@@ -1 +0,0 @@
-case class A[T](x: String, y: T)
View
6 test/files/buildmanager/annotated/annotated.check
@@ -1,6 +0,0 @@
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(class A -> List(), object A -> List())
View
2  test/files/buildmanager/annotated/annotated.test
@@ -1,2 +0,0 @@
->>compile A.scala
->>compile A.scala
View
16 test/files/buildmanager/freshnames/A.scala
@@ -1,16 +0,0 @@
-abstract class A {
-
- var t: List[B]
-
- def foo(n: String): Option[B] = {
- t.reverse find (_.names contains n)
- }
-
- def bar(n: Int): Option[B] = {
- t.reverse find (_.names contains n)
- }
-}
-
-//class A
-case class B(names: List[String])
-
View
4 test/files/buildmanager/freshnames/B.scala
@@ -1,4 +0,0 @@
-abstract class C extends A {
- def test(n: Int) = bar(n)
-}
-
View
6 test/files/buildmanager/freshnames/freshnames.check
@@ -1,6 +0,0 @@
-builder > B.scala A.scala
-compiling Set(A.scala, B.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(class A -> List(), class B -> List(), object B -> List())
View
2  test/files/buildmanager/freshnames/freshnames.test
@@ -1,2 +0,0 @@
->>compile B.scala A.scala
->>compile A.scala
View
16 test/files/buildmanager/infer/A.scala
@@ -1,16 +0,0 @@
-class Foo(flag: Boolean) {
- val classpath =
- if (flag)
- new AClasspath
- else
- new BClasspath
-}
-
-class AClasspath extends MergedClasspath[A]
-
-class BClasspath extends MergedClasspath[B]
-
-abstract class MergedClasspath[T]
-
-class A
-class B
View
6 test/files/buildmanager/infer/infer.check
@@ -1,6 +0,0 @@
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(class A -> List(), class AClasspath -> List(), class B -> List(), class BClasspath -> List(), class Foo -> List(), class MergedClasspath -> List())
View
2  test/files/buildmanager/infer/infer.test
@@ -1,2 +0,0 @@
->>compile A.scala
->>compile A.scala
View
5 test/files/buildmanager/namesdefaults/defparam-use.scala
@@ -1,5 +0,0 @@
-
-object Test extends App {
- val outer = new Outer
- new outer.Inner
-}
View
7 test/files/buildmanager/namesdefaults/defparam.scala
@@ -1,7 +0,0 @@
-class Outer {
-
- class Inner(val x: List[Int] = Nil)
-
-// lazy val Inner = "abc"
-}
-
View
9 test/files/buildmanager/namesdefaults/namesdefaults.check
@@ -1,9 +0,0 @@
-builder > defparam.scala defparam-use.scala
-compiling Set(defparam-use.scala, defparam.scala)
-Changes: Map()
-builder > defparam-use.scala
-compiling Set(defparam-use.scala)
-Changes: Map(class Test$delayedInit$body -> List(), object Test -> List())
-builder > defparam-use.scala
-compiling Set(defparam-use.scala)
-Changes: Map(class Test$delayedInit$body -> List(), object Test -> List())
View
3  test/files/buildmanager/namesdefaults/namesdefaults.test
@@ -1,3 +0,0 @@
->>compile defparam.scala defparam-use.scala
->>compile defparam-use.scala
->>compile defparam-use.scala
View
3  test/files/buildmanager/simpletest/A.scala
@@ -1,3 +0,0 @@
-class A {
- def foo = 2
-}
View
3  test/files/buildmanager/simpletest/B.scala
@@ -1,3 +0,0 @@
-class B extends A {
- override def foo = 2
-}
View
1  test/files/buildmanager/simpletest/simpletest.changes/A1.scala
@@ -1 +0,0 @@
-class A
View
11 test/files/buildmanager/simpletest/simpletest.check
@@ -1,11 +0,0 @@
-builder > A.scala B.scala
-compiling Set(A.scala, B.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(class A -> List(Removed(Definition(A.foo))))
-invalidate B.scala because inherited method removed [Removed(Definition(A.foo))]
-compiling Set(B.scala)
-B.scala:2: error: method foo overrides nothing
- override def foo = 2
- ^
View
3  test/files/buildmanager/simpletest/simpletest.test
@@ -1,3 +0,0 @@
->>compile A.scala B.scala
->>update A.scala=>A1.scala
->>compile A.scala
View
1  test/files/buildmanager/t2280/A.scala
@@ -1 +0,0 @@
-class A extends B
View
2  test/files/buildmanager/t2280/B.java
@@ -1,2 +0,0 @@
-public class B {}
-
View
6 test/files/buildmanager/t2280/t2280.check
@@ -1,6 +0,0 @@
-builder > A.scala B.java
-compiling Set(A.scala, B.java)
-Changes: Map()
-builder > B.java
-compiling Set(B.java)
-Changes: Map(class B -> List())
View
2  test/files/buildmanager/t2280/t2280.test
@@ -1,2 +0,0 @@
->>compile A.scala B.java
->>compile B.java
View
3  test/files/buildmanager/t2556_1/A.scala
@@ -1,3 +0,0 @@
-class A {
- def x(i: Int) = i+"3"
-}
View
3  test/files/buildmanager/t2556_1/B.scala
@@ -1,3 +0,0 @@
-class B extends A {
- def x(s: String) = s+"5"
-}
View
4 test/files/buildmanager/t2556_1/t2556_1.changes/A2.scala
@@ -1,4 +0,0 @@
-class A {
- def x(i: String) = i+"3"
-}
-
View
12 test/files/buildmanager/t2556_1/t2556_1.check
@@ -1,12 +0,0 @@
-builder > A.scala B.scala
-compiling Set(A.scala, B.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(class A -> List(Changed(Definition(A.x))[method x changed from (i: Int)String to (i: String)String flags: <method>]))
-invalidate B.scala because inherited method changed [Changed(Definition(A.x))[method x changed from (i: Int)String to (i: String)String flags: <method>]]
-compiling Set(B.scala)
-B.scala:2: error: overriding method x in class A of type (i: String)String;
- method x needs `override' modifier
- def x(s: String) = s+"5"
- ^
View
3  test/files/buildmanager/t2556_1/t2556_1.test
@@ -1,3 +0,0 @@
->>compile A.scala B.scala
->>update A.scala=>A2.scala
->>compile A.scala
View
4 test/files/buildmanager/t2556_2/A.scala
@@ -1,4 +0,0 @@
-class A {
- def x(i: Int) = i+"3"
-}
-
View
2  test/files/buildmanager/t2556_2/B.scala
@@ -1,2 +0,0 @@
-class B extends A
-
View
4 test/files/buildmanager/t2556_2/C.scala
@@ -1,4 +0,0 @@
-class C extends B {
- def x(s: String) = s+"5"
-}
-
View
4 test/files/buildmanager/t2556_2/t2556_2.changes/A2.scala
@@ -1,4 +0,0 @@
-class A {
- def x(i: String) = i+"3"
-}
-
View
13 test/files/buildmanager/t2556_2/t2556_2.check
@@ -1,13 +0,0 @@
-builder > A.scala B.scala C.scala
-compiling Set(A.scala, B.scala, C.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(class A -> List(Changed(Definition(A.x))[method x changed from (i: Int)String to (i: String)String flags: <method>]))
-invalidate B.scala because inherited method changed [Changed(Definition(A.x))[method x changed from (i: Int)String to (i: String)String flags: <method>]]
-invalidate C.scala because inherited method changed [Changed(Definition(A.x))[method x changed from (i: Int)String to (i: String)String flags: <method>]]
-compiling Set(B.scala, C.scala)
-C.scala:2: error: overriding method x in class A of type (i: String)String;
- method x needs `override' modifier
- def x(s: String) = s+"5"
- ^
View
3  test/files/buildmanager/t2556_2/t2556_2.test
@@ -1,3 +0,0 @@
->>compile A.scala B.scala C.scala
->>update A.scala=>A2.scala
->>compile A.scala
View
5 test/files/buildmanager/t2556_3/A.scala
@@ -1,5 +0,0 @@
-class A {
- def x = 3
-}
-class B extends A
-
View
5 test/files/buildmanager/t2556_3/B.scala
@@ -1,5 +0,0 @@
-object E {
- def main(args: Array[String]) =
- println( (new C).x )
-}
-
View
2  test/files/buildmanager/t2556_3/C.scala
@@ -1,2 +0,0 @@
-class C extends B
-
View
5 test/files/buildmanager/t2556_3/t2556_3.changes/A2.scala
@@ -1,5 +0,0 @@
-class A {
- def x = 3
-}
-class B
-
View
18 test/files/buildmanager/t2556_3/t2556_3.check
@@ -1,18 +0,0 @@
-builder > A.scala B.scala C.scala
-compiling Set(A.scala, B.scala, C.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(class A -> List(), class B -> List(Changed(Class(B))[List((A,Object))]))
-invalidate C.scala because parents have changed [Changed(Class(B))[List((A,Object))]]
-invalidate B.scala because it references invalid (no longer inherited) definition [ParentChanged(Class(C))]
-compiling Set(B.scala, C.scala)
-B.scala:3: error: type mismatch;
- found : C
- required: ?{def x: ?}
-Note that implicit conversions are not applicable because they are ambiguous:
- both method any2Ensuring in object Predef of type [A](x: A)Ensuring[A]
- and method any2ArrowAssoc in object Predef of type [A](x: A)ArrowAssoc[A]
- are possible conversion functions from C to ?{def x: ?}
- println( (new C).x )
- ^
View
3  test/files/buildmanager/t2556_3/t2556_3.test
@@ -1,3 +0,0 @@
->>compile A.scala B.scala C.scala
->>update A.scala=>A2.scala
->>compile A.scala
View
4 test/files/buildmanager/t2557/A.scala
@@ -1,4 +0,0 @@
-trait A {
- def x = 3
-}
-
View
4 test/files/buildmanager/t2557/B.scala
@@ -1,4 +0,0 @@
-trait B extends A {
- override def x = super.x * 2
-}
-
View
3  test/files/buildmanager/t2557/C.scala
@@ -1,3 +0,0 @@
-trait C extends A {
- override def x = super.x + 5
-}
View
1  test/files/buildmanager/t2557/D.scala
@@ -1 +0,0 @@
-trait D extends C with B
View
1  test/files/buildmanager/t2557/E.scala
@@ -1 +0,0 @@
-trait E extends D
View
4 test/files/buildmanager/t2557/F.scala
@@ -1,4 +0,0 @@
-object F extends E {
- def main(args: Array[String]) =
- println(x)
-}
View
2  test/files/buildmanager/t2557/t2557.changes/D2.scala
@@ -1,2 +0,0 @@
-trait D extends B with C
-
View
10 test/files/buildmanager/t2557/t2557.check
@@ -1,10 +0,0 @@
-builder > A.scala B.scala C.scala D.scala E.scala F.scala
-compiling Set(A.scala, B.scala, C.scala, D.scala, E.scala, F.scala)
-Changes: Map()
-builder > D.scala
-compiling Set(D.scala)
-Changes: Map(trait D -> List(Changed(Class(D))[List((Object,Object), (C,B), (B,C))]))
-invalidate E.scala because parents have changed [Changed(Class(D))[List((Object,Object), (C,B), (B,C))]]
-invalidate F.scala because parents have changed [Changed(Class(D))[List((Object,Object), (C,B), (B,C))]]
-compiling Set(E.scala, F.scala)
-Changes: Map(object F -> List(), trait E -> List())
View
3  test/files/buildmanager/t2557/t2557.test
@@ -1,3 +0,0 @@
->>compile A.scala B.scala C.scala D.scala E.scala F.scala
->>update D.scala=>D2.scala
->>compile D.scala
View
5 test/files/buildmanager/t2559/A.scala
@@ -1,5 +0,0 @@
-sealed trait A
-class B extends A
-class C extends A
-//class E extends A
-
View
4 test/files/buildmanager/t2559/D.scala
@@ -1,4 +0,0 @@
-object D {
- def x(a: A) = if (a.isInstanceOf[B] || a.isInstanceOf[C]) ()
-}
-
View
5 test/files/buildmanager/t2559/t2559.changes/A2.scala
@@ -1,5 +0,0 @@
-sealed trait A
-class B extends A
-class C extends A
-class E extends A
-
View
9 test/files/buildmanager/t2559/t2559.check
@@ -1,9 +0,0 @@
-builder > A.scala D.scala
-compiling Set(A.scala, D.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(class B -> List(), class C -> List(), class E -> List(Changed(Class(A))[class E extends a sealed trait A]), trait A -> List())
-invalidate D.scala because it references changed class [Changed(Class(A))[class E extends a sealed trait A]]
-compiling Set(D.scala)
-Changes: Map(object D -> List())
View
3  test/files/buildmanager/t2559/t2559.test
@@ -1,3 +0,0 @@
->>compile A.scala D.scala
->>update A.scala=>A2.scala
->>compile A.scala
View
7 test/files/buildmanager/t2562/A.scala
@@ -1,7 +0,0 @@
-object A
-{
- def x0 = B.x0
- def x1 = B.x1
- def x2 = B.x2
- def x3 = 3
-}
View
8 test/files/buildmanager/t2562/B.scala
@@ -1,8 +0,0 @@
-object B
-{
- def x0 = A.x1
- def x1 = A.x2
- def x2 = A.x3
-}
-
-
View
8 test/files/buildmanager/t2562/t2562.changes/A2.scala
@@ -1,8 +0,0 @@
-object A
-{
- def x0 = B.x0
- def x1 = B.x1
- def x2 = B.x2
- def x3 = "3"
-}
-
View
12 test/files/buildmanager/t2562/t2562.check
@@ -1,12 +0,0 @@
-builder > A.scala B.scala
-compiling Set(A.scala, B.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(object A -> List(Changed(Definition(A.x3))[method x3 changed from ()Int to ()String flags: <method> <triedcooking>]))
-invalidate B.scala because it references changed definition [Changed(Definition(A.x3))[method x3 changed from ()Int to ()String flags: <method> <triedcooking>]]
-compiling Set(B.scala)
-Changes: Map(object B -> List(Changed(Definition(B.x2))[method x2 changed from ()Int to ()String flags: <method> <triedcooking>]))
-invalidate A.scala because it references changed definition [Changed(Definition(B.x2))[method x2 changed from ()Int to ()String flags: <method> <triedcooking>]]
-compiling Set(A.scala, B.scala)
-Changes: Map(object A -> List(Changed(Definition(A.x0))[method x0 changed from ()Int to ()String flags: <method>], Changed(Definition(A.x1))[method x1 changed from ()Int to ()String flags: <method> <triedcooking>], Changed(Definition(A.x2))[method x2 changed from ()Int to ()String flags: <method> <triedcooking>]), object B -> List(Changed(Definition(B.x0))[method x0 changed from ()Int to ()String flags: <method>], Changed(Definition(B.x1))[method x1 changed from ()Int to ()String flags: <method>]))
View
3  test/files/buildmanager/t2562/t2562.test
@@ -1,3 +0,0 @@
->>compile A.scala B.scala
->>update A.scala=>A2.scala
->>compile A.scala
View
3  test/files/buildmanager/t2649/A.scala
@@ -1,3 +0,0 @@
-object A {
- def x(zz: Int, yy: Int) = yy - zz
-}
View
4 test/files/buildmanager/t2649/B.scala
@@ -1,4 +0,0 @@
-object B {
- def main(args: Array[String]): Unit =
- println( A.x(zz = 3, yy = 4) )
-}
View
4 test/files/buildmanager/t2649/t2649.changes/A2.scala
@@ -1,4 +0,0 @@
-object A {
- def x(yy: Int, zz: Int) = yy - zz
-}
-
View
9 test/files/buildmanager/t2649/t2649.check
@@ -1,9 +0,0 @@
-builder > A.scala B.scala
-compiling Set(A.scala, B.scala)
-Changes: Map()
-builder > A.scala
-compiling Set(A.scala)
-Changes: Map(object A -> List(Changed(Definition(A.x))[method x changed from (zz: Int, yy: Int)Int to (yy: Int, zz: Int)Int flags: <method> <triedcooking>]))
-invalidate B.scala because it references changed definition [Changed(Definition(A.x))[method x changed from (zz: Int, yy: Int)Int to (yy: Int, zz: Int)Int flags: <method> <triedcooking>]]
-compiling Set(B.scala)
-Changes: Map(object B -> List())
View
3  test/files/buildmanager/t2649/t2649.te