Documentation ¶
Overview ¶
Package parse implements parsing of the BUILD files via an embedded Python interpreter.
The actual work here is done by an embedded PyPy instance. Various rules are built in to the binary itself using go-bindata to embed the .py files; these are always available to all programs which is rather nice, but it does mean that must be run before 'go run' etc will work as expected.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitParser ¶
func InitParser(state *core.BuildState)
InitParser initialises the parser engine. This is guaranteed to be called exactly once before any calls to Parse().
func Parse ¶
func Parse(tid int, state *core.BuildState, label, dependor core.BuildLabel, noDeps bool, include, exclude []string, forSubinclude bool)
Parse parses the package corresponding to a single build label. The label can be :all to add all targets in a package. It is not an error if the package has already been parsed.
By default, after the package is parsed, any targets that are now needed for the build and ready to be built are queued, and any new packages are queued for parsing. When a specific label is requested this is straightforward, but when parsing for pseudo-targets like :all and ..., various flags affect it: If 'noDeps' is true, then no new packages will be added and no new targets queued. 'include' and 'exclude' refer to the labels of targets to be added. If 'include' is non-empty then only targets with at least one matching label are added. Any targets with a label in 'exclude' are not added. 'forSubinclude' is set when the parse is required for a subinclude target so should proceed even when we're not otherwise building targets.
func PrintRuleArgs ¶
func PrintRuleArgs(state *core.BuildState, labels []core.BuildLabel)
PrintRuleArgs prints the arguments of all builtin rules (plus any associated ones from the given targets)
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package main implements a simple binary to print out builtin rules.
|
Package main implements a simple binary to print out builtin rules. |
Package asp implements an experimental BUILD-language parser.
|
Package asp implements an experimental BUILD-language parser. |
fuzz
Package fuzz implements a fuzzing entry point for asp using go-fuzz.
|
Package fuzz implements a fuzzing entry point for asp using go-fuzz. |
main
Package main implements a compiler for the builtin build rules, which is used at bootstrap time.
|
Package main implements a compiler for the builtin build rules, which is used at bootstrap time. |