bazel-contrib / bazel-contrib/rules_python

sphinxdocs: allow repo rules to document their environment variables

Open
#3,299 0 comments 0 reactions 0 assignees View on GitHub
sphinxdocs type: feature request
Dominant language
Starlark
Stars
688
Forks
721
Avg merge
14h 49m
Merged PRs (30d)
81

Description

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:
:::

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

Description of how its used.
:::
```

In all cases, it xrefs to `.. envvar` directives

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.