aboutsummaryrefslogtreecommitdiff
path: root/stage1
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-04-06 22:23:34 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-04-06 22:51:51 -0400
commit4b9541d435365db023c5a629d88ab733f3fffa77 (patch)
tree59f737f600ad76c44c12a538f1de9ea0df2fd30e /stage1
parenta63b6d3ea52d0badb07c2c003f98e77bee7cbdda (diff)
downloadcbt-4b9541d435365db023c5a629d88ab733f3fffa77.tar.gz
cbt-4b9541d435365db023c5a629d88ab733f3fffa77.tar.bz2
cbt-4b9541d435365db023c5a629d88ab733f3fffa77.zip
caching return values parameterized methods seems just wrong
Diffstat (limited to 'stage1')
-rw-r--r--stage1/resolver.scala17
1 files changed, 3 insertions, 14 deletions
diff --git a/stage1/resolver.scala b/stage1/resolver.scala
index e8bfc07..8eaf107 100644
--- a/stage1/resolver.scala
+++ b/stage1/resolver.scala
@@ -60,10 +60,9 @@ abstract class Dependency{
The implementation of this method is untested and likely buggy
at this stage.
*/
- private object cacheExportClasspathConcurrently extends Cache[Future[ClassPath]]
private def exportClasspathConcurrently(
latest: Map[(String, String),ArtifactInfo]//, cache: BuildCache
- )( implicit ec: ExecutionContext ): Future[ClassPath] = cacheExportClasspathConcurrently{
+ )( implicit ec: ExecutionContext ): Future[ClassPath] = {
Future.sequence( // trigger compilation / download of all dependencies first
this.dependencies.map{
d =>
@@ -130,8 +129,7 @@ abstract class Dependency{
new cbt.URLClassLoader( exportedClasspath, dependencyClassLoader(latest, cache) )
}
}
- private object classLoaderCache extends Cache[ClassLoader]
- def classLoader( cache: ClassLoaderCache ): ClassLoader = classLoaderCache{
+ def classLoader( cache: ClassLoaderCache ): ClassLoader = {
if( concurrencyEnabled ){
// trigger concurrent building / downloading dependencies
exportClasspathConcurrently
@@ -145,6 +143,7 @@ abstract class Dependency{
cache
)
}
+ // FIXME: these probably need to update outdated as well
def classpath : ClassPath = exportedClasspath ++ dependencyClasspath
def dependencyJars : Seq[File] = transitiveDependencies.flatMap(_.jars)
def dependencyClasspath : ClassPath = ClassPath.flatten( transitiveDependencies.map(_.exportedClasspath) )
@@ -222,16 +221,6 @@ object Dependencies{
case class Stage1Dependency()(implicit val logger: Logger) extends Dependency{
override def needsUpdate = false // FIXME: think this through, might allow simplifications and/or optimizations
override def canBeCached = false
- /*
- private object classLoaderRecursionCache extends Cache[ClassLoader]
- override def classLoaderRecursion(latest: Map[(String,String),Dependency], cache: ClassLoaderCache) = classLoaderRecursionCache{
- println(System.currentTimeMillis)
- val cl = getClass.getClassLoader
- println(System.currentTimeMillis)
- cl
- ClassLoader.getSystemClassLoader
- }
- */
override def targetClasspath = exportedClasspath
override def exportedClasspath = ClassPath( Seq(nailgunTarget, stage1Target) )
override def exportedJars = ???//Seq[File]()