@bazelrc-preset.bzl//:bazelrc-preset.bzl
Rule/Macro pair to produce a bazelrc preset file.
Typical usage:
load("@bazelrc-preset.bzl", "bazelrc_preset") bazelrc_preset( name = "preset", strict = False, # Change to True to opt-in to flags that are flipped in the upcoming major release )
Then run bazel run //tools:preset.update
to create the preset file, and import that in your .bazelrc
file.
See the project's README.md for more details.
Functions & Macros
bazelrc_preset
Creates a bazelrc preset file.
Parameters
*name | The name of the preset. |
out_file | The file to write the preset to. If not provided, the preset will be written to Default: None |
kwargs | Additional named arguments to pass to the |
bazelrc_preset_test
Verify that the bazelrc preset file can be generated from the given inputs.
Parameters
*name | |
kwargs |
Rules
generate_preset
Attribute | Type | Description |
---|---|---|
*name | name | A unique name for this target. |
doc_link_template | string | A template for the link to the flag documentation.
Default: "https://registry.build/flag/bazel@{version}?filter={flag}" |
extra_presets | string | A json encoded string of presets to add to the preset generation matching the format of the FLAGS dictionary. Default: "" |
out | label | Default: None |
strict | boolean | Whether to generate a strict preset, which includes all flags that are marked as "strict" in the registry. Default: False |
@bazelrc-preset.bzl//:flags.bzl
Database of Bazel flags which apply across every Bazel use-case
@bazelrc-preset.bzl//private:parse.bzl
Internal functions to parse versions.
Functions & Macros
parse_version
Parses the given Bazel version string into a comparable value.
Parameters
*v | version string |
@bazelrc-preset.bzl//private:util.bzl
Internal-only utility functions.
Functions & Macros
le
Parameters
*v |
lt
Parameters
*v |
ne
Parameters
*v |
ge
Parameters
*v |
ge_same_major
Parameters
*v |
gt
Parameters
*v |