Buck: Build Target Pattern

Build Target Pattern

A build target pattern is a string that describes a set of one or more build targets to match. These are used in the list of strings passed to the visibility argument of a build rule.

A build target is also a valid build target pattern that matches the build target of same name:

# Matches '//apps/myapp:app'.
'//apps/myapp:app'

A build target pattern that ends with a colon matches build targets that identify other rules in the same directory:

# Matches '//apps/myapp:app_debug' and '//apps/myapp:app_release'.
'//apps/myapp:'

A build target pattern that ends with /... matches any build target that identifies a rule in a build file in or under that directory:

# Matches '//apps:common' and '//apps/myapp:app'.
'//apps/...'