From 92b26f394460aa609f9d073ea044776e7d8c46fb Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Tue, 14 Feb 2017 00:07:57 -0500 Subject: implicitly pass classloader, might make code easier and prepares for allowing `run` and `runFlat` at Dependency instead of Build level --- stage2/BasicBuild.scala | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'stage2/BasicBuild.scala') diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index 9ed6787..5f73568 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -147,16 +147,16 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge lib.compile( context.cbtLastModified, sourceFiles, compileTarget, compileStatusFile, compileDependencies, - context.paths.mavenCache, scalacOptions, context.classLoaderCache, + context.paths.mavenCache, scalacOptions, zincVersion = zincVersion, scalaVersion = scalaVersion ) } - def mainClasses: Seq[Class[_]] = exportedClasspath.files.flatMap( lib.mainClasses( _, classLoader(classLoaderCache) ) ) + def mainClasses: Seq[Class[_]] = exportedClasspath.files.flatMap( lib.mainClasses( _, classLoader ) ) def runClass: Option[String] = lib.runClass( mainClasses ).map( _.getName ) - def runMain( className: String, args: String* ) = lib.runMain( className, args, classLoader(context.classLoaderCache) ) + def runMain( className: String, args: String* ) = lib.runMain( className, args, classLoader ) def flatClassLoader: Boolean = false @@ -200,15 +200,14 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge } val scalac = new ScalaCompilerDependency(context.cbtLastModified, context.paths.mavenCache, scalaVersion) - lib.runMain( + runMain( "scala.tools.nsc.MainGenericRunner", Seq( "-bootclasspath", scalac.classpath.string, "-classpath", classpath.string - ) ++ context.args, - scalac.classLoader(classLoaderCache) + ) ++ context.args : _* ) } -- cgit v1.2.3