diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-13 03:18:18 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-19 21:13:48 -0400 |
commit | c095f435b68272d4ae0409ab4c9466145609710e (patch) | |
tree | 189f0f2755d8fd2e6af3eec9d514c29b3cebdef5 /stage2/Lib.scala | |
parent | ca7e166e09776410ef39e2808aab6a3fdd1e7911 (diff) | |
download | cbt-c095f435b68272d4ae0409ab4c9466145609710e.tar.gz cbt-c095f435b68272d4ae0409ab4c9466145609710e.tar.bz2 cbt-c095f435b68272d4ae0409ab4c9466145609710e.zip |
Refactored ClassLoaderCache to use key locked cache to pave the way for caching classloaders hierarchically without deadlocks
Diffstat (limited to 'stage2/Lib.scala')
-rw-r--r-- | stage2/Lib.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala index e3e1ee1..218208d 100644 --- a/stage2/Lib.scala +++ b/stage2/Lib.scala @@ -58,11 +58,11 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ def compile( updated: Boolean, sourceFiles: Seq[File], compileTarget: File, dependenyClasspath: ClassPath, - compileArgs: Seq[String], zincVersion: String, scalaVersion: String + compileArgs: Seq[String], zincVersion: String, scalaVersion: String, classLoaderCache: ClassLoaderCache ): File = { if(sourceFiles.nonEmpty) lib.zinc( - updated, sourceFiles, compileTarget, dependenyClasspath, compileArgs + updated, sourceFiles, compileTarget, dependenyClasspath, classLoaderCache, compileArgs )( zincVersion = zincVersion, scalaVersion = scalaVersion ) compileTarget } @@ -87,7 +87,8 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ jarTarget: File, artifactId: String, version: String, - compileArgs: Seq[String] + compileArgs: Seq[String], + classLoaderCache: ClassLoaderCache ): File = { mkdir(Path(apiTarget)) if(sourceFiles.nonEmpty){ @@ -101,7 +102,7 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ runMain( "scala.tools.nsc.ScalaDoc", args, - ScalaDependencies(scalaVersion)(logger).classLoader + ScalaDependencies(scalaVersion)(logger).classLoader(classLoaderCache) ) } } |