@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_presetCreates 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_testVerify 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_versionParses 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
leParameters
*v |
ltParameters
*v |
neParameters
*v |
geParameters
*v |
ge_same_majorParameters
*v |
gtParameters
*v |