Documentation ¶
Overview ¶
Package buck implements the analyzer for Buck. https://buckbuild.com
A `BuildTarget` in Buck is defined as a Build Target by Buck which is in in the format of `//src/build:target`. Buck defines this as a string used to identify a Build Rule.
Understanding target patterns is helpful to understand how buck projects are built and managed. Documentation can be found on Bazel's website here: https://docs.bazel.build/versions/master/guide.html#target-patterns
This package is implemented by externally calling the `buck` build tool.
FAQ ¶
1. Why is analyzing manifest files not a supported strategy as it is for other tools?
`.buckconfig` can be used to discover cells but the `repository` field which defines cells is not required . `BUCK` files are written in Skylark (a dialect of Python) and are impossible to statically analyze. `buck audit` provides json formatted data for dependency and input information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverWithCommand ¶
func DiscoverWithCommand(dir string, opts map[string]interface{}, buckCommand func(string, ...string) (string, *errors.Error)) ([]module.Module, error)
DiscoverWithCommand finds a Buck project by first looking for a ".buckconfig" file and then a "BUCK" file.
- ".buckconfig" file is found and we know that that we are at the root of a Buck cell. a. Attempt to find user defined aliases in .buckconfig. b. No aliases, run `buck targets //` to find all local targets.
- "BUCK" file is found. a. Run `buck targets <directory>:` to find all local targets.