1 - al_alias_map
al_alias_map
load("@com_alwaldend_src//tools/bzl/rules:al_alias_map.bzl", "al_alias_map")
al_alias_map(aliases, visibility)
Generate aliases from an alias map
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| aliases | alias map, keys are names, values are alias arguments | none |
| visibility | default visibility | ["//:__subpackages__"] |
2 - al_bzl_generate_repository
al_bzl_generate_repository
load("@com_alwaldend_src//tools/bzl/rules:al_bzl_generate_repository.bzl", "al_bzl_generate_repository")
al_bzl_generate_repository(name, files)
Generate a repository
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this repository. | Name | required | |
| files | Files to generate, keys are paths, values are file contents | Dictionary: String -> String | optional | {} |
3 - al_bzl_library_map
al_bzl_library_map
load("@com_alwaldend_src//tools/bzl/rules:al_bzl_library_map.bzl", "al_bzl_library_map")
al_bzl_library_map(name, visibility, libs, deps, **kwargs)
Create bzl_library targets from a map
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| name | combined bzl_library target name | none |
| visibility | - | None |
| libs | bzl_library names | {} |
| deps | other al_bzl_library_map targets | [] |
| kwargs | bzl_library kwargs | none |
4 - al_bzl_target_doc
al_bzl_target_doc
load("@com_alwaldend_src//tools/bzl/rules:al_bzl_target_doc.bzl", "al_bzl_target_doc")
al_bzl_target_doc(name, visibility, subpackages)
Document bazel targets
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| name | target name | none |
| visibility | - | none |
| subpackages | list of subpackages | [] |
5 - al_genquery_write_to_source_file
al_genquery_write_to_source_file
load("@com_alwaldend_src//tools/bzl/rules:al_genquery_write_to_source_file.bzl", "al_genquery_write_to_source_file")
al_genquery_write_to_source_file(name, expression, scope, var_name, out_file)
Write genquery result to a bzl file
Example:
al_genquery_write_to_source_file(
name = "al_bzl_libs",
expression = """
filter(
"^//",
attr(
"srcs",
".{3,}",
kind(
"bzl_library",
deps("//bzl")
)
)
)
""",
out_file = "al_bzl_libs.bzl",
scope = ["//bzl"],
var_name = "AL_BZL_LIBS",
)
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| name | name prefix | none |
| expression | genquery expression | none |
| scope | genquery scope | none |
| var_name | variable name in the generated .bzl file | none |
| out_file | output bzl file | none |