Scope

sbt.Scope
See theScope companion class
object Scope

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Scope.type

Members list

Type members

Classlikes

object RefThenConfig

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Types

opaque type RefThenConfig

Temporary data structure to capture first two axis using slash syntax. In theory, we might be able to express this as type parameters of Scope, like Scope[Select[ThisBuild.type], Select[ConfigKey], This, This] but then scope becomes more complicated to deal with.

Temporary data structure to capture first two axis using slash syntax. In theory, we might be able to express this as type parameters of Scope, like Scope[Select[ThisBuild.type], Select[ConfigKey], This, This] but then scope becomes more complicated to deal with.

Attributes

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(project: ScopeAxis[Reference], config: ScopeAxis[ConfigKey], task: ScopeAxis[AttributeKey[_]], extra: ScopeAxis[AttributeMap]): Scope
def axisDelegates[T](direct: (ResolvedReference, T) => Seq[T], ref: ResolvedReference, init: T): (T, Seq[ScopeAxis[T]])
def buildResolve(uri: URI): Scope => Scope
def delegates[Proj](refs: Seq[(ProjectRef, Proj)], configurations: Proj => Seq[ConfigKey], resolve: Reference => ResolvedReference, rootProject: URI => String, projectInherit: ProjectRef => Seq[ProjectRef], configInherit: (ResolvedReference, ConfigKey) => Seq[ConfigKey], taskInherit: AttributeKey[_] => Seq[AttributeKey[_]]): Scope => Seq[Scope]
def delegates[Proj](refs: Seq[(ProjectRef, Proj)], configurations: Proj => Seq[ConfigKey], projectInherit: ProjectRef => Seq[ProjectRef], configInherit: (ResolvedReference, ConfigKey) => Seq[ConfigKey]): DelegateIndex
def display(config: ConfigKey): String
def display(scope: Scope, sep: String): String
def display(scope: Scope, sep: String, showProject: Reference => String): String
def displayConfigKey012Style(config: ConfigKey): String
def displayMasked(scope: Scope, sep: String, mask: ScopeMask): String
def displayMasked(scope: Scope, sep: String, mask: ScopeMask, showZeroConfig: Boolean): String
def displayMasked(scope: Scope, sep: String, showProject: Reference => String, mask: ScopeMask): String
def displayMasked(scope: Scope, sep: String, showProject: Reference => String, mask: ScopeMask, showZeroConfig: Boolean): String

unified slash style introduced in sbt 1.1.0. By default, sbt will no longer display the Zero-config, so name will render as name as opposed to {uri}proj/Zero/name. Technically speaking an unspecified configuration axis defaults to the scope delegation (first configuration defining the key, then Zero).

unified slash style introduced in sbt 1.1.0. By default, sbt will no longer display the Zero-config, so name will render as name as opposed to {uri}proj/Zero/name. Technically speaking an unspecified configuration axis defaults to the scope delegation (first configuration defining the key, then Zero).

Attributes

def equal(a: Scope, b: Scope, mask: ScopeMask): Boolean
def fillTaskAxis(scope: Scope, key: AttributeKey[_]): Scope
def globalProjectDelegates(scope: Scope): Seq[Scope]
def linearize[T](axis: ScopeAxis[T], appendZero: Boolean)(inherit: T => Seq[T]): Seq[ScopeAxis[T]]
def projectPrefix(project: ScopeAxis[Reference], show: Reference => String): String
def projectPrefix012Style(project: ScopeAxis[Reference], show: Reference => String): String
def replaceThis(thisScope: Scope): Scope => Scope
def resolveBuild(current: URI, ref: BuildReference): BuildReference
def resolveBuild(current: URI, uri: URI): URI
def resolveBuildOnly(current: URI, ref: Reference): Reference
def resolveBuildRef(current: URI, ref: BuildReference): BuildRef
def resolveBuildScope(thisScope: Scope, current: URI): Scope => Scope
def resolveProject(uri: URI, rootProject: URI => String): Scope => Scope
def resolveProjectRef(current: URI, rootProject: URI => String, ref: ProjectReference): ProjectRef
def resolveReference(current: URI, rootProject: URI => String, ref: Reference): ResolvedReference
def resolveScope(thisScope: Scope, current: URI, rootProject: URI => String): Scope => Scope
def showProject: Reference => String
def subThis[T](sub: ScopeAxis[T], into: ScopeAxis[T]): ScopeAxis[T]

Select(ThisProject) cannot be resolved by resolveProject (it doesn't know what to replace it with), so we perform this transformation so that replaceThis picks it up.

Select(ThisProject) cannot be resolved by resolveProject (it doesn't know what to replace it with), so we perform this transformation so that replaceThis picks it up.

Attributes

def topologicalSort[T](node: T, appendZero: Boolean)(dependencies: T => Seq[T]): Seq[ScopeAxis[T]]
def withGlobalScope(base: Scope): Seq[Scope]
def withZeroAxis[T](base: ScopeAxis[T]): Seq[ScopeAxis[T]]

Concrete fields

val Global: Scope
val customShowString: AttributeKey[String]

Allows the user to override the result of Scope.display or Scope.displayMasked for a particular scope. This can be used to enhance super shell and/or error reporting for tasks that use mangled names. For example, one might have:

Allows the user to override the result of Scope.display or Scope.displayMasked for a particular scope. This can be used to enhance super shell and/or error reporting for tasks that use mangled names. For example, one might have:

 val mangledKey = TaskKey[Unit]("foo_slash_bar")
 val attributeMap = AttributeMap.empty.put(Scope.customShowString("foo/bar"))
 val sanitizedKey = mangledKey.copy(scope = mangledKey.copy(extra = Select(attributeMap)))
 sanitizedKey := { ... }

Now whenever the foo_slash_bar task specified by sanitizedKey is evaluated, it will display "foo/bar" in super shell progress and in the error message if an error is thrown.

Attributes