summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-03-25 19:55:53 +0000
committerPaul Phillips <paulp@improving.org>2010-03-25 19:55:53 +0000
commit6ee24a3c5d31ef769e47410d8806a5f4bd7a06bf (patch)
treee0e5352fba603060439c6fe9e1d024192eb32bd5 /src/partest
parentc0b615fe80fd052d5c87f39cfa6626da43c03669 (diff)
downloadscala-6ee24a3c5d31ef769e47410d8806a5f4bd7a06bf.tar.gz
scala-6ee24a3c5d31ef769e47410d8806a5f4bd7a06bf.tar.bz2
scala-6ee24a3c5d31ef769e47410d8806a5f4bd7a06bf.zip
While working on partest discovered that Compil...
While working on partest discovered that CompilerCommand ignores half its constructor arguments and a couple dozen places blithely pass it those arguments as if they're being used. Then there were setups like this: class OfflineCompilerCommand( arguments: List[String], settings: Settings, error: String => Unit, interactive: Boolean) extends CompilerCommand(arguments, new Settings(error), error, false) Hey offline compiler command, why throw away the perfectly good settings you were given? Ever heard 'reduce, reuse, recycle'? How did you ever work... or do you? No review.
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/nest/CompileManager.scala2
-rw-r--r--src/partest/scala/tools/partest/nest/Worker.scala6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala
index b030d14622..22568ad2d0 100644
--- a/src/partest/scala/tools/partest/nest/CompileManager.scala
+++ b/src/partest/scala/tools/partest/nest/CompileManager.scala
@@ -81,7 +81,7 @@ class DirectCompiler(val fileManager: FileManager) extends SimpleCompiler {
NestUI.verbose("scalac options: "+allOpts)
- val command = new CompilerCommand(args, testSettings, _ => (), false)
+ val command = new CompilerCommand(args, testSettings)
val global = newGlobal(command.settings, logWriter)
val testRep: ExtConsoleReporter = global.reporter.asInstanceOf[ExtConsoleReporter]
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index cf4a8238e9..2f81dfd0f7 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -554,7 +554,7 @@ class Worker(val fileManager: FileManager) extends Actor {
val testCompile = (line: String) => {
NestUI.verbose("compiling " + line)
val args = (line split ' ').toList
- val command = new CompilerCommand(args, settings, error, true)
+ val command = new CompilerCommand(args, settings)
bM.update(filesToSet(settings.sourcepath.value, command.files), Set.empty)
!reporter.hasErrors
}
@@ -675,7 +675,7 @@ class Worker(val fileManager: FileManager) extends Actor {
settings.sourcepath.value = sourcepath
settings.classpath.value = fileManager.CLASSPATH
reporter = new ConsoleReporter(settings, scala.Console.in, logConsoleWriter)
- val command = new CompilerCommand(argList, settings, error, false)
+ val command = new CompilerCommand(argList, settings)
object compiler extends Global(command.settings, reporter)
// simulate resident compiler loop
@@ -687,7 +687,7 @@ class Worker(val fileManager: FileManager) extends Actor {
NestUI.verbose("cmdArgs: "+cmdArgs)
val sett = new Settings(error)
sett.sourcepath.value = sourcepath
- val command = new CompilerCommand(cmdArgs, sett, error, true)
+ val command = new CompilerCommand(cmdArgs, sett)
(new compiler.Run) compile command.files
}