A rule that provides file(s) specific via DefaultInfo from a given target's DefaultInfo or OutputGroupInfo

Rules

output_files

A rule that provides file(s) specific via DefaultInfo from a given target's DefaultInfo or OutputGroupInfo

Example usage (generated)

load("@aspect_bazel_lib//lib:output_files.bzl", "output_files")

output_files(
    # A unique name for this target.
    name = "",
    # the paths of the file(s), relative to their roots, to provide via DefaultInfo from the given target's DefaultInfo or OutputGroupInfo
    paths = [],
    # the target to look in for requested paths in its' DefaultInfo or OutputGroupInfo
    target = "",
)

name

A unique name for this target.

output_group

if set, we look in the specified output group for paths instead of DefaultInfo

paths

the paths of the file(s), relative to their roots, to provide via DefaultInfo from the given target's DefaultInfo or OutputGroupInfo

target

the target to look in for requested paths in its' DefaultInfo or OutputGroupInfo


Macros and Functions

make_output_files

Helper function to generate a output_files target and return its label.

Example usage (generated)

load("@aspect_bazel_lib//lib:output_files.bzl", "make_output_files")

make_output_files(
    # unique name for the generated `output_files` target
    name = "",
    # `target` attribute passed to generated `output_files` target
    target = None,
    # `paths` attribute passed to generated `output_files` target
    paths = None,
)

name

unique name for the generated output_files target

target

target attribute passed to generated output_files target

paths

paths attribute passed to generated output_files target

kwargs

parameters to pass to generated output_files target