If a provider has init specified, we want to document it.
In other words,
def _my_info_init(a, c = "hello"):
"""
MyInfo constructor
Args:
a: Value of field a
c: Value to frobnicate
"""
return {"a": a, "b": frobnicate(c)}
MyInfo = provider(
doc = """This is my provider""",
fields = {
"a": "Field a",
"b": "Field b (frobnicated)",
},
init = _my_info_init,
)
If a provider has
init
specified, we want to document it.In other words,
should get documented as something like
MyInfo
This is my provider
MyInfo constructor
CONSTRUCTOR PARAMETERS
"hello"
FIELDS
This is a prerequisite for switching to stardoc / starlark_doc_extract for generating Bazel's own documentation.