mirror of https://github.com/sbt/sbt.git
Improve testQuick performance, restoring caching of stamps
This commit is contained in:
parent
ee4dcee7cf
commit
6e29a1aa15
|
|
@ -766,21 +766,24 @@ object Defaults extends BuildCommon {
|
|||
}
|
||||
def intlStamp(c: String, analysis: Analysis, s: Set[String]): Long = {
|
||||
if (s contains c) Long.MinValue
|
||||
else {
|
||||
val x = {
|
||||
import analysis.{ relations => rel, apis }
|
||||
rel.internalClassDeps(c).map(intlStamp(_, analysis, s + c)) ++
|
||||
rel.externalDeps(c).map(stamp) +
|
||||
(apis.internal.get(c) match {
|
||||
case Some(x) => x.compilationTimestamp
|
||||
case _ => Long.MinValue
|
||||
})
|
||||
}.max
|
||||
if (x != Long.MinValue) {
|
||||
stamps(c) = x
|
||||
}
|
||||
x
|
||||
}
|
||||
else
|
||||
stamps.getOrElse(
|
||||
c, {
|
||||
val x = {
|
||||
import analysis.{ relations => rel, apis }
|
||||
rel.internalClassDeps(c).map(intlStamp(_, analysis, s + c)) ++
|
||||
rel.externalDeps(c).map(stamp) +
|
||||
(apis.internal.get(c) match {
|
||||
case Some(x) => x.compilationTimestamp
|
||||
case _ => Long.MinValue
|
||||
})
|
||||
}.max
|
||||
if (x != Long.MinValue) {
|
||||
stamps(c) = x
|
||||
}
|
||||
x
|
||||
}
|
||||
)
|
||||
}
|
||||
def noSuccessYet(test: String) = succeeded.get(test) match {
|
||||
case None => true
|
||||
|
|
|
|||
Loading…
Reference in New Issue