Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Absolute path to bazel workspace WorkspaceRoot string )
Functions ¶
func CalcTargetHashes ¶
CalcTargetHashes returns a map of (target name) -> (target hash) for all dependencies of the named universe (such as `//...`). If the hash changes for a given target, it is assumed that the target was affected by some change.
Types ¶
type TargetNode ¶
type TargetNode struct { Hash *uint32 Deps []*TargetNode *bpb.Target }
TargetNode wraps a Target proto message with a hash code and a list of dependent TargetNodes.
func (*TargetNode) GetDeps ¶
func (n *TargetNode) GetDeps() []string
func (*TargetNode) GetHash ¶
func (n *TargetNode) GetHash() uint32
GetHash returns a hash for the given TargetNode. If this hash changes, it is assumed that the corresponding Target was affected by some change. Targets are affected if source file contents change, or if rules' attributes or dependent targets change. Since dependent target changes are detected by changes in their respective hashes, GetHash will call GetHash on dependencies recursively down the build graph.
func (*TargetNode) GetName ¶
func (n *TargetNode) GetName() string
GetName fetches the target name, which is in one of a few embedded messages depending on the target type.
func (*TargetNode) String ¶
func (n *TargetNode) String() string