build

package
v12.1.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2018 License: Apache-2.0 Imports: 29 Imported by: 10 modules, 72 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package build houses the core functionality for actually building targets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(tid int, state *core.BuildState, label core.BuildLabel)

Build implements the core logic for building a single target.

func OutputHash

func OutputHash(target *core.BuildTarget) ([]byte, error)

OutputHash calculates the hash of a target's outputs.

func PrintHashes

func PrintHashes(state *core.BuildState, target *core.BuildTarget)

PrintHashes prints the various hashes for a target to stdout. It's used by plz hash --detailed to show a breakdown of the input hashes of a target.

func RemoveOutputs

func RemoveOutputs(target *core.BuildTarget) error

RemoveOutputs removes all generated outputs for a rule.

func ReplaceSequences

func ReplaceSequences(state *core.BuildState, target *core.BuildTarget, command string) string

ReplaceSequences replaces escape sequences in the given string.

func ReplaceTestSequences

func ReplaceTestSequences(state *core.BuildState, target *core.BuildTarget, command string) string

ReplaceTestSequences replaces escape sequences in the given string when running a test.

func RuleHash

func RuleHash(state *core.BuildState, target *core.BuildTarget, runtime, postBuild bool) []byte

RuleHash calculates a hash for the relevant bits of this rule that affect its output. Optionally it can include parts of the rule that affect runtime (most obviously test-time). Note that we have to hash on the declared fields, we obviously can't hash pointers etc. incrementality_test will warn if new fields are added to the struct but not here.

func RuntimeHash

func RuntimeHash(state *core.BuildState, target *core.BuildTarget) ([]byte, error)

RuntimeHash returns the target hash, source hash, config hash & runtime file hash, all rolled into one. Essentially this is one hash needed to determine if the runtime state is consistent.

func StopWorkers

func StopWorkers()

StopWorkers stops any running worker processes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL