Skip to content

Releases: bazelbuild/stardoc

0.6.2

11 Aug 19:02
99421bb
Compare
Choose a tag to compare

Release 0.6.2

Bugfix release: bumps rules_jvm_external dependency to support building with --incompatible_disable_starlark_host_transitions

Contributors

Alexandre Rostovtsev

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 = "62bd2e60216b7a6fec3ac79341aa201e0956477e7c8f6ccc286f279ad1d96432",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz",
    ],
)

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

stardoc_repositories()

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.

MODULE.bazel setup

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

For compatibility with WORKSPACE setup, add repo_name = "io_bazel_stardoc" to the bazel_dep call.

Using the rules

See the source.

0.6.1

04 Aug 20:18
9800c40
Compare
Choose a tag to compare

Release 0.6.1

Bugfix release: fix rules_jvm_external pin warnings.

This release temporarily restores compatibility with Bazel 5 (manually tested). Note that normally we only test Stardoc with the current stable Bazel and with Bazel at HEAD - not with older releases. We make no promises about maintaining compatibility with Bazel 5.

Contributors

Alexandre Rostovtsev

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 = "3082a199f39e1fd9ed608421516fdbe9e9af8eb34f52e46e9a8c4798c8e6bfad",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.6.1/stardoc-0.6.1.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.6.1/stardoc-0.6.1.tar.gz",
    ],
)

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

stardoc_repositories()

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()

MODULE.bazel setup

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

For compatibility with WORKSPACE setup, add repo_name = "io_bazel_stardoc" to the bazel_dep call.

Using the rules

See the source.

0.6.0

03 Aug 15:02
00b171f
Compare
Choose a tag to compare

Release 0.6.0

New Features

  • Stardoc no longer escapes HTML tags in documentation. Feel free to use HTML formatting in your docs! We now also have much-improved rendering for fenced code blocks in attribute docs, and render attribute default values using Markdown instead of HTML markup. (#161, #167)

  • Stardoc now dedents and trims all doc strings - not only in macros (#170). This means you can have

    my_rule = rule(
        doc = """
        This is my rule.
    
        Here is more info about it.
    
        ...
        """,
        ...
    )

    and Stardoc will dedent and trim the doc to

    This is my rule.
    
    Here is more info about it.
    
    ...
    
  • When using Bazel 7 or newer (or current Bazel HEAD), Stardoc will by default use the native starlark_doc_extract rule internally (#166).

    This means, in particular:

    • correct default values for rule attributes in all cases
    • documentation for module extensions
    • more complete documentation for repository rules
    • by default (this can be turned off via render_main_repo_name = False), we will render labels in your main repo with a repo component: your main module name (when using bzlmod) or WORKSPACE name (#168).

    You may temporarily disable the new extractor by calling Stardoc with use_starlark_doc_extract = False. However, after Bazel 7 is released, we plan to remove this argument and always use the new extractor.

Incompatible Changes

  • The Markdown renderer now uses Google EscapeVelocity instead of Apache Velocity for templating. The templating engines are almost compatible, with the exception of escapes in string literals: if in your template you had a string literal with a character escape, you would need to expand it.

    For example, instead of

    ${funcInfo.docString.replaceAll("\n", " ")}

    you would need

    ${funcInfo.docString.replaceAll("
    ", " ")}
  • When using the native starlark_doc_extract extractor, Stardoc requires two additional templates: repository_rule_template and
    module_extension_template. If you are using custom templates, you will probably want to define these, following the examples in
    stardoc/templates/markdown_tables.

  • When using the native starlark_doc_extract extractor, Stardoc cannot document generated .bzl files any more - because Bazel cannot load() generated .bzl files.

Other Notable Changes

  • The Markdown renderer's source now lives in the Stardoc repo; we build the renderer from source instead of using a bundled jar. Unfortunately, if you are not using bzlmod, this requires a rather complicated WORKSPACE setup; see below.

Contributors

Alexandre Rostovtsev, Fabian Meumertzheim

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 = "4441a965c97f8364c8eb901f951ca9a15c6e2c29ee0f10b56bf8b563463752ea",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.6.0/stardoc-0.6.0.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.6.0/stardoc-0.6.0.tar.gz",
    ],
)

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

stardoc_repositories()

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

MODULE.bazel setup

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

For compatibility with WORKSPACE setup (see above), add repo_name = "io_bazel_stardoc" to the bazel_dep call.

Using the rules

See the source.

0.5.6

31 May 18:47
437c79d
Compare
Choose a tag to compare

Release 0.5.6 (initially tagged as 0.5.5)

Bugfix release: update @rules_java dependency to fix breakage with Bazel at HEAD.

Contributors

Alexandre Rostovtsev

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 = "dfbc364aaec143df5e6c52faf1f1166775a5b4408243f445f44b661cfdc3134f",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.6/stardoc-0.5.6.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.5.6/stardoc-0.5.6.tar.gz",
    ],
)

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

stardoc_repositories()

MODULE.bazel setup

bazel_dep(name = "stardoc", version = "0.5.6", repo_name = "io_bazel_stardoc")

Using the rules

See the source.

0.5.4

16 May 20:25
8cd9ecf
Compare
Choose a tag to compare

Release 0.5.4

New Features

  • Stardoc supports bzlmod! (#141, special thanks to Fabian Meumertzheim)
  • Stardoc output files are now exposed in stardoc() target runfiles (#139)

Contributors

Alexandre Rostovtsev, Fabian Meumertzheim, Greg Estren, Ivo List, Keith Smiley, lberki, Philipp Schrader

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 = "ec57139e466faae563f2fc39609da4948a479bb51b6d67aedd7d9b1b8059c433",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.4/stardoc-0.5.4.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.5.4/stardoc-0.5.4.tar.gz",
    ],
)

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

stardoc_repositories()

MODULE.bazel setup

bazel_dep(name = "stardoc", version = "0.5.4", repo_name = "io_bazel_stardoc")

Using the rules

See the source.

0.5.3

30 Sep 14:10
50cb915
Compare
Choose a tag to compare

Release 0.5.3

Bugfix release: fixes angle bracket escaping and a crash on labels with @@

Contributors

Alexandre Rostovtsev, Jon Shea

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 = "3fd8fec4ddec3c670bd810904e2e33170bedfe12f90adf943508184be458c8bb",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
    ],
)

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

stardoc_repositories()

0.5.2

18 Jul 16:16
5c3882b
Compare
Choose a tag to compare

Bugfix release: fixes crash with config_common.toolchain_type.

Contributors

Alexandre Rostovtsev, Keith Smiley

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 = "05fb57bb4ad68a360470420a3b6f5317e4f722839abc5b17ec4ef8ed465aaa47",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.2/stardoc-0.5.2.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.5.2/stardoc-0.5.2.tar.gz",
    ],
)

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

stardoc_repositories()

0.5.1

04 Apr 20:55
4b7da9f
Compare
Choose a tag to compare

Bugfix release: minor fixes, including a fix for build failure due to missing zlib version.

Contributors

aiuto, Alexandre Rostovtsev, Brian Silverman, Casey, Xùdōng Yáng

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 = "aa814dae0ac400bbab2e8881f9915c6f47c49664bf087c409a15f90438d2c23e",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.1/stardoc-0.5.1.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.5.1/stardoc-0.5.1.tar.gz",
    ],
)

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

stardoc_repositories()

The load statement and function call after the io_bazel_stardoc repository
definition ensure that this repository's dependencies are loaded.

Using the rules

See the source.

0.5.0

06 Oct 18:24
b8c747f
Compare
Choose a tag to compare

This release includes many fixes for Stardoc's markdown output, plus:

New Features

  • Raw protobuf output via format = "proto" (#20)
  • Stardoc now outputs documentation for macro returns and deprecations (#75)
    as well as module (file) docstrings (#100)

Contributors

Alexandre Rostovtsev, Alex Eagle, Andrew Z Allen, Chris Rebert, c-parsons, Ivo
List, Jon Brandvein, Laurent Le Brun, Max Vorobev, pbatg, Philipp Wollermann,
Samuel Giddins, Thomas Van Lenten, Tiago Quelhas, Xùdōng Yáng, Yiting Wang

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 = "c9794dcc8026a30ff67cf7cf91ebe245ca294b20b071845d12c192afe243ad72",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.0/stardoc-0.5.0.tar.gz",
        "https://github.com/bazelbuild/stardoc/releases/download/0.5.0/stardoc-0.5.0.tar.gz",
    ],
)

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

stardoc_repositories()

The load statement and function call after the io_bazel_stardoc repository
definition ensure that this repository's dependencies are loaded.

Using the rules

See the source.

0.4.0

14 Oct 16:29
4378e9b
Compare
Choose a tag to compare

First release of Stardoc under the new repository location bazelbuild/stardoc. Please use this repository for future Stardoc releases instead of its old location. See Getting Started for updated setup information.

There are many new features since the last release. A summary of major features:

  • Changed the default Stardoc output format to use pure-markdown tables instead of HTML tables. This output format is fully compatible with markdown formatting constructs. For example, use **bold** instead of <b>bold</b>. The <. and > characters are escaped in this output format.
  • Stardoc now supports custom formatting. See Custom Output documentation for details.
  • aspect() definitions are now documented by Stardoc.
  • Module definitions (structs which combine series of functions in a 'namespace') are now documetned by Stardoc.
  • Attribute default-value information is now included in output.

Huge Thanks to kendalllaneee and blossommojekwu for their work on many of the features in this release.

WORKSPACE setup

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

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
    name = "io_bazel_stardoc",
    remote = "https://github.com/bazelbuild/stardoc.git",
    tag = "0.4.0",
)

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

The load statement and function call after the io_bazel_stardoc repository
definition ensure that this repository's dependencies are loaded.