diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-19 20:01:09 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-27 23:54:15 -0400 |
commit | 6b37681f94056f05cf545fbb1e483dabbfa8492c (patch) | |
tree | 172c06f7bfee33bae5708209d1eeb8a418caaba1 /stage1/resolver.scala | |
parent | 52adb81450955472fe4ecd011615b80f6289def6 (diff) | |
download | cbt-6b37681f94056f05cf545fbb1e483dabbfa8492c.tar.gz cbt-6b37681f94056f05cf545fbb1e483dabbfa8492c.tar.bz2 cbt-6b37681f94056f05cf545fbb1e483dabbfa8492c.zip |
performance tweak: cache dependencyClasspath (major)
Diffstat (limited to 'stage1/resolver.scala')
-rw-r--r-- | stage1/resolver.scala | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/stage1/resolver.scala b/stage1/resolver.scala index 1eaeebd..e485823 100644 --- a/stage1/resolver.scala +++ b/stage1/resolver.scala @@ -119,11 +119,13 @@ trait DependencyImplementation extends Dependency{ // FIXME: these probably need to update outdated as well def classpath : ClassPath = exportedClasspath ++ dependencyClasspath - def dependencyClasspath : ClassPath = ClassPath( - transitiveDependencies - .flatMap(_.exportedClasspath.files) - .distinct // <- currently needed here to handle diamond dependencies on builds (duplicate in classpath) - ) + def dependencyClasspath : ClassPath = taskCache[DependencyImplementation]( "dependencyClasspath" ).memoize{ + ClassPath( + transitiveDependencies + .flatMap(_.exportedClasspath.files) + .distinct // <- currently needed here to handle diamond dependencies on builds (duplicate in classpath) + ) + } def dependencies: Seq[Dependency] /** return dependencies in order of linearized dependence. this is a bit tricky. */ |