From a06fdb7e62c5e1c9bd2737ffa7df50e9c31f6b97 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Thu, 9 Mar 2017 22:50:33 -0500 Subject: more concise runMain in more places --- stage1/Stage1Lib.scala | 5 ++--- stage1/resolver.scala | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'stage1') 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 -- cgit v1.2.3