commit | f8fab820143a75810e6b7d9f764fc7552b82cbdb | [log] [tgz] |
---|---|---|
author | Alexandre Rostovtsev <arostovtsev@google.com> | Mon Jul 24 21:43:33 2023 -0400 |
committer | GitHub <noreply@github.com> | Mon Jul 24 21:43:33 2023 -0400 |
tree | 422a8361e87994b417a520c55b17932b57da6e3e | |
parent | 6b6acb39c69ca713420454a2e78d90e327cad08f [diff] |
Use native starlark_doc_extract rule for doc extraction if it is available * When available (i.e. in Bazel 7, or in current development Bazel at HEAD), try use the `starlark_doc_extract` native rule for doc extraction instead of the legacy pre-built extraction jar. This behavior can be disabled by passing `use_starlark_doc_extract = False` to the `stardoc` macro. * Add templates and markdown rendering functionality for repository rule and module extension info protos (which are output by `starlark_doc_extract`). * Temporary wart: for module extensions, by default we would want the summary blurb to look something like ``` my_ext = use_extension("@my_local_repo//some:file.bzl", "my_ext") my_ext.tag(foo, bar) ``` but alas, we don't have a good way to get the name of the local repo from Starlark when bzlmod is enabled. * ... and of course, update tests. Which means in some cases, we have to fork the golden files into current (i.e. `starlark_doc_extract`-enabled) and legacy flavors. Fixes #69 Fixes #76 Fixes #81 Fixes #123
Stardoc is a documentation generator for Bazel build rules written in Starlark.
Stardoc provides a Starlark rule (stardoc
, see documentation) that can be used to build documentation for Starlark rules in Markdown. Stardoc generates one documentation page per .bzl
file.
Stardoc is a replacement for the deprecated “Skydoc” documentation generator.
See Skydoc Deprecation for details on the deprecation and migration details.
See our future plans for refactoring Stardoc to be more consistent with how Bazel evaluates .bzl files, and what it means for maintenance of this project.
See the maintaner's guide for instructions for cutting a new release.