Skip to content

Commit

Permalink
chore: enable doc generation with bzlmod enabled. (#312)
Browse files Browse the repository at this point in the history
I forgot to enable doc generation when I updated stardoc to 0.5.6.
  • Loading branch information
cgrindel committed Jul 6, 2023
1 parent f625941 commit 1e20562
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions bazeldoc/private/stardoc_for_prov.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,22 @@

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

def stardoc_for_prov(doc_prov, **kwargs):
def stardoc_for_prov(doc_prov):
"""Defines a `stardoc` target for a document provider.
Args:
doc_prov: A `struct` as returned from `providers.create()`.
**kwargs: Common attributes that are applied to the underlying rules.
Returns:
None.
"""
target_compatible_with = kwargs.pop("target_compatible_with", select({
"@cgrindel_bazel_starlib//bzlmod:is_enabled": ["@platforms//:incompatible"],
"//conditions:default": [],
}))

stardoc(
name = doc_prov.name,
out = doc_prov.out_basename,
header_template = doc_prov.header_basename,
input = doc_prov.stardoc_input,
symbol_names = doc_prov.symbols,
deps = doc_prov.deps,
target_compatible_with = target_compatible_with,
)

def stardoc_for_provs(doc_provs):
Expand Down

0 comments on commit 1e20562

Please sign in to comment.