Skip to content

stardoc fails to generate documentation for module extensions #123

@nathaniel-brough

Description

@nathaniel-brough

Stardoc fails when trying to generate documentation for a bzlmod extension;

Steps to reproduce;

Create a module extension;

# //:some_module.bzl
some_tag = tag_class(attrs = {
    "path": attr.string(),
    "id": attr.string(),
})

def foo_impl(module_ctx):
    pass

foo = module_extension(
    implementation = foo_impl,
    tag_classes = {"foo_tag": some_tag},
)

Then attempt to generate docs for the module extension;

# //:BUILD.bazel
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")

stardoc(
    name = "module_doc",
    out = "module_doc.md",
    input = ":some_module.bzl",
)

Expected error;

 name 'tag_class' is not defined
 name 'module_extension' is not defined

EDIT: This is my .bazelrc, in case you find it useful.

common --experimental_enable_bzlmod

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions