stardoc
0.8.0
published 1 month ago
108 stars
45 forks
14 watchers
Apache License 2.0
public
1 assets
4,560,362 downloads
36 KB
Compatibility level 1
ypM/OfKm4K05L6kf1mJUWvy9NsBcYjZVODhdNaAyMJY=
0.8.0
January 23, 2025

Release 0.8.0

New Features

  • Adds support for documenting symbolic macros when using Bazel 8.0.1 or newer. (Note that the original Bazel 8.0.0 release had a bug causing macro documentation emitted by Stardoc to be be incomplete.) (#267)

Contributors

Alexandre Rostovtsev, Keith Smiley, Richard Levasseur

MODULE.bazel setup

bazel_dep(name = "stardoc", version = "0.8.0")

By default - in other words, when using Bzlmod for dependency management - Stardoc uses @stardoc as its repo name. The legacy WORSKSPACE setup (see below) used @io_bazel_stardoc instead. For compatibility with the legacy WORKSPACE setup, you may add repo_name = "io_bazel_stardoc" to the bazel_dep call.

Legacy WORKSPACE setup

To use Stardoc, add the following to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "io_bazel_stardoc",
    sha256 = "ca933f39f2a6e0ad392fa91fd662545afcbd36c05c62365538385d35a0323096",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.8.0/stardoc-0.8.0.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.8.0/stardoc-0.8.0.tar.gz",
    ],
)

load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories")

stardoc_repositories()

load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")

rules_java_dependencies()

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")

rules_jvm_external_deps()

load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")

rules_jvm_external_setup()

load("@io_bazel_stardoc//:deps.bzl", "stardoc_external_deps")

stardoc_external_deps()

load("@stardoc_maven//:defs.bzl", stardoc_pinned_maven_install = "pinned_maven_install")

stardoc_pinned_maven_install()

The sequence of function calls and load statements after the io_bazel_stardoc repository definition ensures that this repository's dependencies are loaded (each function call defines additional repositories for Stardoc's dependencies, which are then used by subsequent load statements).

Note that WORKSPACE files are sensitive to the order of dependencies. If, after updating to a newer version of Stardoc, you encounter "not a valid maven_install.json file" or other repository fetch errors (example: #186), try moving the Stardoc dependency block above or below other dependencies in your WORKSPACE file.

Using the rules

See the source.

Deps:
Assets:

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.