Relations

sbt.internal.inc.Relations
See theRelations companion object
trait Relations

Provides mappings between source files, generated classes (products), and binaries. Dependencies that are tracked include internal: a dependency on a source in the same compilation group (project), external: a dependency on a source in another compilation group (tracked as the name of the class), library: a dependency on a class or jar file not generated by a source file in any tracked compilation group, inherited: a dependency that resulted from a public template inheriting, direct: any type of dependency, including inheritance.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Concatenates the two relations. Acts naively, i.e., doesn't internalize external deps on added files.

Concatenates the two relations. Acts naively, i.e., doesn't internalize external deps on added files.

Attributes

def --(sources: Iterable[VirtualFileRef]): Relations

Drops all dependency mappings a->b where a is in sources. Acts naively, i.e., doesn't externalize internal deps on removed files.

Drops all dependency mappings a->b where a is in sources. Acts naively, i.e., doesn't externalize internal deps on removed files.

Attributes

def allExternalDeps: Set[String]

All files in another compilation group (project) that are recorded as a source dependency of a source file in this group.

All files in another compilation group (project) that are recorded as a source dependency of a source file in this group.

Attributes

def allLibraryDeps: Set[VirtualFileRef]

All files that are recorded as a library dependency of a source file.

All files that are recorded as a library dependency of a source file.

Attributes

def allProducts: Set[VirtualFileRef]

All products associated with sources.

All products associated with sources.

Attributes

def allSources: Set[VirtualFileRef]

All sources with at least one product .

All sources with at least one product .

Attributes

def classNames(src: VirtualFileRef): Set[String]

Names (fully qualified, at the pickler phase) of classes defined in source file src.

Names (fully qualified, at the pickler phase) of classes defined in source file src.

Attributes

def classes: Relation[VirtualFileRef, String]

The relation between a source file and the fully qualified names of classes generated from it.

The relation between a source file and the fully qualified names of classes generated from it.

Attributes

def definesClass(name: String): Set[VirtualFileRef]

Source files that generated a class with the given fully qualified name. This is typically a set containing a single file.

Source files that generated a class with the given fully qualified name. This is typically a set containing a single file.

Attributes

def externalClassDep: Relation[String, String]

The dependency relation between internal and external classes.

The dependency relation between internal and external classes.

Attributes

def externalDeps(className: String): Set[String]

External source dependencies that internal source file src depends on. This includes both direct and inherited dependencies.

External source dependencies that internal source file src depends on. This includes both direct and inherited dependencies.

Attributes

def internalClassDep: Relation[String, String]

The dependency relation between internal classes.

The dependency relation between internal classes.

Attributes

def internalClassDeps(className: String): Set[String]

Internal source dependencies for src. This includes both direct and inherited dependencies.

Internal source dependencies for src. This includes both direct and inherited dependencies.

Attributes

def libraryClassName: Relation[VirtualFileRef, String]

The dependency relation between library JARs and class names.

The dependency relation between library JARs and class names.

Attributes

def libraryClassNames(lib: VirtualFileRef): Set[String]

The library class names for the library JAR file lib.

The library class names for the library JAR file lib.

Attributes

def libraryDefinesClass(name: String): Set[VirtualFileRef]

The library files that generated a class with the given fully qualified name. This is typically a set containing a single file.

The library files that generated a class with the given fully qualified name. This is typically a set containing a single file.

Attributes

def libraryDep: Relation[VirtualFileRef, VirtualFileRef]

The dependency relation between internal sources and library JARs.

The dependency relation between internal sources and library JARs.

Attributes

def libraryDeps(src: VirtualFileRef): Set[VirtualFileRef]

The library dependencies for the source file src.

The library dependencies for the source file src.

Attributes

def produced(prod: VirtualFileRef): Set[VirtualFileRef]

The source files that generated class file prod. This is typically a set containing a single file.

The source files that generated class file prod. This is typically a set containing a single file.

Attributes

def productClassName: Relation[String, String]

The relation between source and product class names.

The relation between source and product class names.

Only non-local classes, objects and traits are tracked by this relation. For classes, nested objects and traits it's 1-1 relation. For top level objects it's 1-2 relation. E.g., for

object A

The binaryClass will have two entries:

A -> A, A -> A$

This reflects Scala's compiler behavior of generating two class files per top level object declaration.

Attributes

def products(src: VirtualFileRef): Set[VirtualFileRef]

The classes that were generated for source file src.

The classes that were generated for source file src.

Attributes

def srcProd: Relation[VirtualFileRef, VirtualFileRef]

The relation between internal sources and generated class files.

The relation between internal sources and generated class files.

Attributes

def usesExternal(className: String): Set[String]

Internal source dependencies that depend on external source file dep. This includes both direct and inherited dependencies.

Internal source dependencies that depend on external source file dep. This includes both direct and inherited dependencies.

Attributes

def usesInternalClass(className: String): Set[String]

Internal source files that depend on internal source dep. This includes both direct and inherited dependencies.

Internal source files that depend on internal source dep. This includes both direct and inherited dependencies.

Attributes

def usesLibrary(dep: VirtualFileRef): Set[VirtualFileRef]

The source files that depend on library file dep.

The source files that depend on library file dep.

Attributes

Concrete methods

def addSource(src: VirtualFileRef, products: Iterable[VirtualFileRef], classes: Iterable[(String, String)], internalDeps: Iterable[InternalDependency], externalDeps: Iterable[ExternalDependency], libraryDeps: Iterable[(VirtualFileRef, String, Stamp)]): Relations

Records that the file src generates products products, has internal dependencies internalDeps, has external dependencies externalDeps and library dependencies libraryDeps.

Records that the file src generates products products, has internal dependencies internalDeps, has external dependencies externalDeps and library dependencies libraryDeps.

Attributes