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
65 files changed
tree: 422a8361e87994b417a520c55b17932b57da6e3e
  1. .bazelci/
  2. distro/
  3. docs/
  4. src/
  5. stardoc/
  6. test/
  7. .bazelignore
  8. .bazelrc
  9. .gitignore
  10. AUTHORS
  11. BUILD
  12. CHANGELOG.md
  13. CODEOWNERS
  14. CONTRIBUTING.md
  15. CONTRIBUTORS
  16. LICENSE
  17. maven_install.json
  18. MODULE.bazel
  19. README.md
  20. rules_jvm_external.patch
  21. setup.bzl
  22. update-release-binary.sh
  23. update-stardoc-docs.sh
  24. update-stardoc-tests.sh
  25. version.bzl
  26. WORKSPACE
README.md

Stardoc - Starlark Documentation Generator

Build status

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 .bzlfile.

Get Started

About Stardoc

Project Status

Skydoc deprecation

Stardoc is a replacement for the deprecated “Skydoc” documentation generator.

See Skydoc Deprecation for details on the deprecation and migration details.

Future plans

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.

Maintainer's guide

See the maintaner's guide for instructions for cutting a new release.