aboutsummaryrefslogtreecommitdiff
path: root/stage1
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-03-09 22:50:33 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2017-03-09 23:03:19 -0500
commita06fdb7e62c5e1c9bd2737ffa7df50e9c31f6b97 (patch)
treee75ef53a2e7e1d37b02bf7fe98095a7678685ddc /stage1
parent616c824f3d49853323a7d776f914281b7544ad41 (diff)
downloadcbt-a06fdb7e62c5e1c9bd2737ffa7df50e9c31f6b97.tar.gz
cbt-a06fdb7e62c5e1c9bd2737ffa7df50e9c31f6b97.tar.bz2
cbt-a06fdb7e62c5e1c9bd2737ffa7df50e9c31f6b97.zip
more concise runMain in more places
Diffstat (limited to 'stage1')
-rw-r--r--stage1/Stage1Lib.scala5
-rw-r--r--stage1/resolver.scala4
2 files changed, 4 insertions, 5 deletions
diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala
index c46e00c..01115d4 100644
--- a/stage1/Stage1Lib.scala
+++ b/stage1/Stage1Lib.scala
@@ -272,12 +272,11 @@ class Stage1Lib( logger: Logger ) extends BaseLib{
redirectOutToErr{
System.err.println("Compiling to " ++ compileTarget.toString)
try{
- lib.runMain(
+ zinc.runMain(
_class,
dualArgs ++ singleArgs ++ (
if(cp.isEmpty) Nil else Seq("-cp", cp)
- ) ++ sourceFiles.map(_.string),
- zinc.classLoader
+ ) ++ sourceFiles.map(_.string)
)
} catch {
case scala.util.control.NonFatal(e) =>
diff --git a/stage1/resolver.scala b/stage1/resolver.scala
index 86cf5ab..1304f76 100644
--- a/stage1/resolver.scala
+++ b/stage1/resolver.scala
@@ -79,7 +79,7 @@ trait DependencyImplementation extends Dependency{
}
*/
- def runMain( className: String, args: String* ) = lib.runMain( className, args, classLoader )
+ def runMain( className: String, args: Seq[String] ) = lib.runMain( className, args, classLoader )
def flatClassLoader: Boolean = false
@@ -88,7 +88,7 @@ trait DependencyImplementation extends Dependency{
def runClass: Option[String] = lib.runClass( mainClasses ).map( _.getName )
def run( args: String* ): ExitCode = {
- runClass.map( runMain( _, args: _* ) ).getOrElse{
+ runClass.map( runMain( _, args ) ).getOrElse{
// FIXME: this just doing nothing when class is not found has been repeatedly
// surprising. Let's try to make this more visible than just logging an error.
// Currently blocked on task `recursive` trying every subbuild and would error