Skip to content

sphinxdocs: allow repo rules to document their environment variables #3299

@rickeylev

Description

@rickeylev

Starting with Bazel 7.1, repository rules can use repository_ctx.getenv() to get environment variable values, and they no longer have to be listed in the environ attribute of the repo rule.

This makes them hidden from docgen.

A directive or option should be added so that repo rule docs can describe what environment variables they use.

:::{repo-rule}
:uses-envvars: <csv list of names>
:::

:::{uses-envvar} env-var-name

Description of how its used.
:::

In all cases, it xrefs to .. envvar directives

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions