aboutsummaryrefslogtreecommitdiff
path: root/stage2/BasicBuild.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-02-14 00:21:35 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2017-02-14 00:34:48 -0500
commit69b3380ad301b50e540ef784c5ada1f3560dffab (patch)
tree1e31b9e979453000f53dae752b4a9787d70a151d /stage2/BasicBuild.scala
parent6b7ccbe48f858e8c5d075672db85caa9dd44bd19 (diff)
downloadcbt-69b3380ad301b50e540ef784c5ada1f3560dffab.tar.gz
cbt-69b3380ad301b50e540ef784c5ada1f3560dffab.tar.bz2
cbt-69b3380ad301b50e540ef784c5ada1f3560dffab.zip
a (probably insufficient) attempt at detecting task cache conflicts
Diffstat (limited to 'stage2/BasicBuild.scala')
-rw-r--r--stage2/BasicBuild.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index 5212270..e5b3507 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -258,6 +258,24 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge
// a method that can be called only to trigger any side-effects
final def `void` = ()
+ final override def transitiveDependencies: Seq[Dependency] =
+ taskCache[BaseBuild]( "transitiveDependencies" ).memoize{
+ val res = super.transitiveDependencies
+ val duplicateBuilds = res.collect{
+ case b: BaseBuild => b
+ }.groupBy(
+ b => ( b.projectDirectory, b.moduleKey )
+ ).filter( _._2.size > 1 ).mapValues(_.map(_.getClass))
+ duplicateBuilds.foreach{ case ((projectDirectory, moduleKey), classes) =>
+ assert(
+ classes.distinct.size == 1,
+ "multiple builds found for\nprojectDirectory: $projectDirectory\nmoduleKey: $moduleKey\nbut different classes: " + classes.mkString(", ")
+ )
+ }
+ res
+ }
+
+
@deprecated("use the MultipleScalaVersions plugin instead","")
final def crossScalaVersionsArray = Array(scalaVersion)
}