Skip to main content

target_label type

target_label.cell

target_label.cell: str

target_label.name

target_label.name: str

target_label.package

target_label.package: str

target_label.with_sub_target

def target_label.with_sub_target(subtarget_name = []) -> providers_label

Converts a TargetLabel into its corresponding ProvidersLabel given the subtarget names, which is a list for each layer of subtarget

Sample usage:

def _impl_sub_target(ctx):
owners = ctx.uquery().owner("bin/TARGETS.fixture")
for owner in owners:
unconfigured_label = owner.label
ctx.output.print(unconfigured_label.with_sub_target())
ctx.output.print(unconfigured_label.with_sub_target("subtarget1"))
ctx.output.print(unconfigured_label.with_sub_target(["subtarget1", "subtarget2"]))