mirror of https://github.com/sbt/sbt.git
Introduce abstract `IncrementalCommon` class.
Introduce an abstract `IncrementalCommon class that holds the
implementation of incremental compiler that was previously done in
`Incremental` class. Also, introduce `IncrementalDefaultImpl` that
inherits from IncrementalCommon.
This is the first step to introduce a design where most of incremental
compiler's logic lives in IncrementalCommon and we have two subclasses:
1. Default, which holds implementation specific to the old algorithm
known from sbt 0.13.0
2. NameHashing, which holds implementation specific to the name
hashing algorithm
This commit is purely a refactoring and does not change any behavior.
This commit is contained in:
parent
1de2900a67
commit
946fd53a73
|
|
@ -21,7 +21,7 @@ object Incremental
|
|||
log: Logger,
|
||||
options: IncOptions)(implicit equivS: Equiv[Stamp]): (Boolean, Analysis) =
|
||||
{
|
||||
val incremental = new Incremental(log, options)
|
||||
val incremental = new IncrementalDefaultImpl(log, options)
|
||||
val initialChanges = incremental.changedInitial(entry, sources, previous, current, forEntry)
|
||||
val binaryChanges = new DependencyChanges {
|
||||
val modifiedBinaries = initialChanges.binaryDeps.toArray
|
||||
|
|
@ -62,7 +62,7 @@ object Incremental
|
|||
}
|
||||
|
||||
|
||||
private class Incremental(log: Logger, options: IncOptions) {
|
||||
private abstract class IncrementalCommon(log: Logger, options: IncOptions) {
|
||||
|
||||
val incDebugProp = "xsbt.inc.debug"
|
||||
private def incDebug(options: IncOptions): Boolean = options.relationsDebug || java.lang.Boolean.getBoolean(incDebugProp)
|
||||
|
|
@ -449,3 +449,5 @@ private class Incremental(log: Logger, options: IncOptions) {
|
|||
def properSubPkg(testParent: Seq[String], testSub: Seq[String]) = testParent.length < testSub.length && testSub.startsWith(testParent)
|
||||
def pkgs(api: Source) = names(api :: Nil).map(pkg)*/
|
||||
}
|
||||
|
||||
private final class IncrementalDefaultImpl(log: Logger, options: IncOptions) extends IncrementalCommon(log, options)
|
||||
|
|
|
|||
Loading…
Reference in New Issue