Rename InputGraph to SettingsGraph

This commit is contained in:
Ethan Atkins 2019-04-28 12:15:47 -07:00
parent a5cefd45be
commit 7166aca0c2
4 changed files with 10 additions and 9 deletions

View File

@ -655,7 +655,7 @@ object Defaults extends BuildCommon {
watchTransitiveSources := watchTransitiveSourcesTask.value,
watch := watchSetting.value,
fileOutputs += target.value ** AllPassFilter,
transitiveDynamicInputs := InputGraph.task.value,
transitiveDynamicInputs := SettingsGraph.task.value,
)
def generate(generators: SettingKey[Seq[Task[Seq[File]]]]): Initialize[Task[Seq[File]]] =

View File

@ -167,8 +167,9 @@ private[sbt] object Continuous extends DeprecatedContinuous {
// Extract all of the globs that we will monitor during the continuous build.
val inputs = {
val configs = scopedKey.get(internalDependencyConfigurations).getOrElse(Nil)
val args = new InputGraph.Arguments(scopedKey, extracted, compiledMap, logger, configs, state)
InputGraph.transitiveDynamicInputs(args)
val args =
new SettingsGraph.Arguments(scopedKey, extracted, compiledMap, logger, configs, state)
SettingsGraph.transitiveDynamicInputs(args)
}
val repository = getRepository(state)
@ -343,7 +344,7 @@ private[sbt] object Continuous extends DeprecatedContinuous {
inputs: Seq[(String, State)]
)(implicit extracted: Extracted, logger: Logger): Seq[Config] = {
val commandKeys = inputs.map { case (c, s) => s -> parseCommand(c, s) }
val compiledMap = InputGraph.compile(extracted.structure)
val compiledMap = SettingsGraph.compile(extracted.structure)
commandKeys.flatMap {
case (s, scopedKeys) => scopedKeys.map(getConfig(s, _, compiledMap))
}
@ -800,8 +801,8 @@ private[sbt] object Continuous extends DeprecatedContinuous {
* Container class for all of the components we need to setup a watch for a particular task or
* input task.
*
* @param key the [[ScopedKey]] instance for the task we will watch
* @param inputs the transitive task inputs (see [[InputGraph]])
* @param key the [[ScopedKey]] instance for the task we will watch
* @param inputs the transitive task inputs (see [[SettingsGraph]])
* @param watchSettings the [[WatchSettings]] instance for the task
*/
private final class Config private[internal] (

View File

@ -21,7 +21,7 @@ import sbt.nio.Keys._
import scala.annotation.tailrec
private[sbt] object InputGraph {
private[sbt] object SettingsGraph {
private implicit class SourceOps(val source: Source) {
def toGlob: Glob = {
val filter = source.includeFilter -- source.excludeFilter

View File

@ -10,7 +10,7 @@ package nio
import java.nio.file.{ Files, Path }
import sbt.internal.{ Continuous, DynamicInput, InputGraph }
import sbt.internal.{ Continuous, DynamicInput, SettingsGraph }
import sbt.nio.FileStamp.{ fileStampJsonFormatter, pathJsonFormatter }
import sbt.nio.FileStamper.{ Hash, LastModified }
import sbt.nio.Keys._
@ -20,7 +20,7 @@ private[sbt] object Settings {
if (scopedKey.key == transitiveDynamicInputs.key) {
scopedKey.scope.task.toOption.toSeq.map { key =>
val updatedKey = Def.ScopedKey(scopedKey.scope.copy(task = Zero), key)
transitiveDynamicInputs in scopedKey.scope := InputGraph.task(updatedKey).value
transitiveDynamicInputs in scopedKey.scope := SettingsGraph.task(updatedKey).value
}
} else if (scopedKey.key == dynamicDependency.key) {
(dynamicDependency in scopedKey.scope := { () }) :: Nil