build

package
v13.2.0-beta8+incompat... Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

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 Init

func Init(state *core.BuildState)

Init initialises common resources for the build package.

func OutputHash

func OutputHash(state *core.BuildState, 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 TestWorkerCommand

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

TestWorkerCommand returns the worker & its arguments (if any) for a test, and the command to run for the test itself.

Types

This section is empty.

Jump to

Keyboard shortcuts

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