From 794d1370518d55be15e9e291987d5e67d44fa897 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sun, 7 Mar 2010 19:06:54 -0500 Subject: [PATCH] Remove code no longer needed for running Scala code --- compile/AnalyzingCompiler.scala | 11 ----------- compile/interface/RunInterface.scala | 20 -------------------- 2 files changed, 31 deletions(-) delete mode 100644 compile/interface/RunInterface.scala diff --git a/compile/AnalyzingCompiler.scala b/compile/AnalyzingCompiler.scala index 9abe0ba25..9fd84d802 100644 --- a/compile/AnalyzingCompiler.scala +++ b/compile/AnalyzingCompiler.scala @@ -36,17 +36,6 @@ class AnalyzingCompiler(val scalaInstance: ScalaInstance, val manager: Component val arguments = (new CompilerArguments(scalaInstance))(sources, classpath, outputDirectory, options, compilerOnClasspath) call("xsbt.ScaladocInterface", log) (classOf[Array[String]], classOf[Int], classOf[xLogger]) (arguments.toArray[String] : Array[String], maximumErrors: java.lang.Integer, log) } - def run(classpath: Set[File], mainClass: String, options: Seq[String], log: CompileLogger) - { - val arguments = new CompilerArguments(scalaInstance) - val classpathURLs = arguments.finishClasspath(classpath, true).toSeq - val bootClasspath = FileUtilities.pathSplit( arguments.createBootClasspath ) - val extraURLs = bootClasspath.filter(_.length > 0).map(new File(_)) - val classpathArray = (classpathURLs ++ extraURLs).map(_.toURI.toURL).toArray[URL] - call("xsbt.RunInterface", log)(classOf[Array[URL]], classOf[String], classOf[Array[String]], classOf[xLogger]) ( - classpathArray : Array[URL], mainClass, options.toArray[String] : Array[String], log - ) - } def console(classpath: Set[File], initialCommands: String, log: CompileLogger): Unit = { val arguments = new CompilerArguments(scalaInstance) diff --git a/compile/interface/RunInterface.scala b/compile/interface/RunInterface.scala deleted file mode 100644 index 4f6f39bc6..000000000 --- a/compile/interface/RunInterface.scala +++ /dev/null @@ -1,20 +0,0 @@ -/* sbt -- Simple Build Tool - * Copyright 2008, 2009 Mark Harrah - */ -package xsbt - -import xsbti.Logger -import scala.tools.nsc.ObjectRunner - -import java.net.URL - -class RunInterface -{ - def run(classpathURLs: Array[URL], mainClass: String, options: Array[String], log: Logger) - { - log.info(Message("Running " + mainClass + " " + options.mkString(" "))) - log.debug(Message(" Classpath:\n\t" + classpathURLs.mkString("\n\t"))) - try { ObjectRunner.run(classpathURLs.toList, mainClass, options.toList) } - catch { case e: java.lang.reflect.InvocationTargetException => throw e.getCause } - } -} \ No newline at end of file