Add support for `LABEL_LIST_DICT` attribute type and `exec_group_compatible_with` common attribute (#279)
* Add support for `LABEL_LIST_DICT` attributes type and `exec_group_compatible_with` common attribute
* Buildifier fixes: use rules_shell, remove unnecessary tests for no-longer-native CC symbols
* Split symbolic_macro_inherit_attrs_test into bazel 8 and 9 flavors
* Fix CI pipelines
---------
Co-authored-by: Alexandre Rostovtsev <arostovtsev@google.com>
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index a40a6ca..d3ab59a 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -16,7 +16,9 @@
build_targets:
- "//..."
test_targets:
+ # Non-manual tests + manual tests requiring stable Bazel
- "//..."
+ - "//test:symbolic_macro_inherit_attrs_bazel_8_test"
.noenable_bzlmod_task_config: &noenable_bzlmod_task_config
build_flags: *noenable_bzlmod_flags
@@ -61,24 +63,36 @@
name: Build and test - Bazel last green
platform: ${{ platform }}
bazel: last_green
+ test_targets:
+ # Non-manual tests + manual tests requiring Bazel at HEAD
+ - "//..."
+ - "//test:symbolic_macro_inherit_attrs_test"
build_and_test_last_green_windows:
<<: *windows_task_config
name: Build and test - Bazel last green - Windows
platform: windows
bazel: last_green
+ test_targets:
+ # Non-manual tests + manual tests requiring Bazel at HEAD
+ - "//..."
+ - "//test:symbolic_macro_inherit_attrs_test"
bzlmod_usage:
<<: *common_task_config
name: Stardoc Bzlmod module usage test
platform: ${{ platform }}
working_directory: test/bzlmod
+ test_targets:
+ - "//..."
bzlmod_usage_windows:
<<: *windows_task_config
name: Stardoc Bzlmod module usage test - Windows
platform: windows
working_directory: test/bzlmod
+ test_targets:
+ - "//..."
bazel_7_tests:
name: Stardoc golden tests requiring Bazel 7
diff --git a/MODULE.bazel b/MODULE.bazel
index 263d39a..1122b8a 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -37,3 +37,4 @@
#
# Dev-only and test-only dependencies
bazel_dep(name = "rules_pkg", version = "1.0.1", dev_dependency = True)
+bazel_dep(name = "rules_shell", version = "0.4.0", dev_dependency = True)
diff --git a/WORKSPACE b/WORKSPACE
index a6f95e6..1263e3c 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -76,6 +76,20 @@
rules_pkg_dependencies()
+# Needed for tests
+http_archive(
+ name = "rules_shell",
+ sha256 = "3e114424a5c7e4fd43e0133cc6ecdfe54e45ae8affa14fadd839f29901424043",
+ strip_prefix = "rules_shell-0.4.0",
+ url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.4.0/rules_shell-v0.4.0.tar.gz",
+)
+
+load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains")
+
+rules_shell_dependencies()
+
+rules_shell_toolchains()
+
# Needed only for testing stardoc across local-repository bounds.
local_repository(
name = "stardoc", # alias the Bzlmod name of the Stardoc repo for local_repository_test
diff --git a/src/main/java/com/google/devtools/build/stardoc/renderer/RendererMain.java b/src/main/java/com/google/devtools/build/stardoc/renderer/RendererMain.java
index 85c580a..0c3244f 100644
--- a/src/main/java/com/google/devtools/build/stardoc/renderer/RendererMain.java
+++ b/src/main/java/com/google/devtools/build/stardoc/renderer/RendererMain.java
@@ -290,6 +290,7 @@
"deprecation",
"distribs",
"exec_compatible_with",
+ "exec_group_compatible_with",
"exec_properties",
"features",
"package_metadata",
diff --git a/src/main/java/com/google/devtools/build/stardoc/rendering/MarkdownUtil.java b/src/main/java/com/google/devtools/build/stardoc/rendering/MarkdownUtil.java
index 4567846..798c6e3 100644
--- a/src/main/java/com/google/devtools/build/stardoc/rendering/MarkdownUtil.java
+++ b/src/main/java/com/google/devtools/build/stardoc/rendering/MarkdownUtil.java
@@ -594,6 +594,8 @@
return "Dictionary: String -> String";
case STRING_LIST_DICT:
return "Dictionary: String -> List of strings";
+ case LABEL_LIST_DICT:
+ return "Dictionary: String -> List of labels";
case LABEL:
case OUTPUT:
return "Label";
diff --git a/stardoc/proto/stardoc_output.proto b/stardoc/proto/stardoc_output.proto
index 6c81b4d..8952e0b 100644
--- a/stardoc/proto/stardoc_output.proto
+++ b/stardoc/proto/stardoc_output.proto
@@ -13,7 +13,7 @@
// limitations under the License.
//
// Vendored from src/main/protobuf/stardoc_output.proto
-// in the Bazel source tree at commit 59e99b67533ebc5375cca98bc95ec0b74c4d4a69n
+// in the Bazel source tree at commit f99a46f150fb90ff2d5183130c3bd56f0a1b814b
//
// Protos for Stardoc data.
//
@@ -74,6 +74,7 @@
OUTPUT = 12;
OUTPUT_LIST = 13;
LABEL_DICT_UNARY = 14;
+ LABEL_LIST_DICT = 15;
}
// Representation of a Starlark rule definition.
diff --git a/test/BUILD b/test/BUILD
index 3cc74a9..e7037ed 100644
--- a/test/BUILD
+++ b/test/BUILD
@@ -1,5 +1,6 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
+load("@rules_shell//shell:sh_test.bzl", "sh_test")
load(":stardoc_test.bzl", "self_gen_test", "stardoc_test")
package(
@@ -47,12 +48,6 @@
)
stardoc_test(
- name = "cc_api_test",
- golden_file = "testdata/cc_api_test/golden.md",
- input_file = "testdata/cc_api_test/input.bzl",
-)
-
-stardoc_test(
name = "simple_test",
golden_file = "testdata/simple_test/golden.md",
input_file = "testdata/simple_test/input.bzl",
@@ -84,13 +79,6 @@
)
stardoc_test(
- name = "cpp_basic_test",
- golden_file = "testdata/cpp_basic_test/golden.md",
- input_file = "testdata/cpp_basic_test/input.bzl",
- symbol_names = ["cpp_related_rule"],
-)
-
-stardoc_test(
name = "multiple_files_test",
golden_file = "testdata/multiple_files_test/golden.md",
input_file = "testdata/multiple_files_test/input.bzl",
@@ -355,6 +343,22 @@
name = "symbolic_macro_inherit_attrs_test",
golden_file = "testdata/symbolic_macro_inherit_attrs_test/golden.md",
input_file = "testdata/symbolic_macro_inherit_attrs_test/input.bzl",
+ # Inherited default rule attributes vary depending on Bazel version
+ tags = [
+ "bazel_9",
+ "manual",
+ ],
+)
+
+stardoc_test(
+ name = "symbolic_macro_inherit_attrs_bazel_8_test",
+ golden_file = "testdata/symbolic_macro_inherit_attrs_test/bazel_8_golden.md",
+ input_file = "testdata/symbolic_macro_inherit_attrs_test/input.bzl",
+ # Inherited default rule attributes vary depending on Bazel version
+ tags = [
+ "bazel_8",
+ "manual",
+ ],
)
sh_test(
diff --git a/test/stardoc_test.bzl b/test/stardoc_test.bzl
index 085dc5b..3dddf00 100644
--- a/test/stardoc_test.bzl
+++ b/test/stardoc_test.bzl
@@ -14,6 +14,8 @@
"""Convenience macro for stardoc e2e tests."""
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
+load("@rules_shell//shell:sh_test.bzl", "sh_test")
load("//stardoc:html_tables_stardoc.bzl", "html_tables_stardoc")
load("//stardoc:stardoc.bzl", "stardoc")
@@ -75,7 +77,7 @@
actual_generated_doc = "%s.md" % stardoc_name
tags = kwargs.get("tags", [])
- native.sh_test(
+ sh_test(
name = test_name,
srcs = ["diff_test_runner.sh"],
args = [
@@ -102,7 +104,7 @@
tags = tags,
)
- native.sh_binary(
+ sh_binary(
name = regenerate_name,
srcs = [regenerate_sh],
data = [actual_generated_doc],
@@ -142,7 +144,7 @@
golden_file: Expected Stardoc output.
**kwargs: Additional arguments for the test.
"""
- native.sh_test(
+ sh_test(
name = name,
srcs = ["diff_test_runner.sh"],
args = [
diff --git a/test/testdata/cc_api_test/golden.md b/test/testdata/cc_api_test/golden.md
deleted file mode 100644
index 5d4bc25..0000000
--- a/test/testdata/cc_api_test/golden.md
+++ /dev/null
@@ -1,62 +0,0 @@
-<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-
-Input file for C++ api test
-
-<a id="cpp_related_rule"></a>
-
-## cpp_related_rule
-
-<pre>
-load("@stardoc//test:testdata/cc_api_test/input.bzl", "cpp_related_rule")
-
-cpp_related_rule(<a href="#cpp_related_rule-name">name</a>, <a href="#cpp_related_rule-first">first</a>, <a href="#cpp_related_rule-fourth">fourth</a>, <a href="#cpp_related_rule-second">second</a>, <a href="#cpp_related_rule-third">third</a>)
-</pre>
-
-This rule does C++-related things.
-
-**ATTRIBUTES**
-
-
-| Name | Description | Type | Mandatory | Default |
-| :------------- | :------------- | :------------- | :------------- | :------------- |
-| <a id="cpp_related_rule-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
-| <a id="cpp_related_rule-first"></a>first | - | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
-| <a id="cpp_related_rule-fourth"></a>fourth | - | Boolean | optional | `False` |
-| <a id="cpp_related_rule-second"></a>second | - | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | required | |
-| <a id="cpp_related_rule-third"></a>third | - | <a href="https://bazel.build/concepts/labels">Label</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | required | |
-
-
-<a id="exercise_the_api"></a>
-
-## exercise_the_api
-
-<pre>
-load("@stardoc//test:testdata/cc_api_test/input.bzl", "exercise_the_api")
-
-exercise_the_api()
-</pre>
-
-
-
-
-
-<a id="my_rule_impl"></a>
-
-## my_rule_impl
-
-<pre>
-load("@stardoc//test:testdata/cc_api_test/input.bzl", "my_rule_impl")
-
-my_rule_impl(<a href="#my_rule_impl-ctx">ctx</a>)
-</pre>
-
-
-
-**PARAMETERS**
-
-
-| Name | Description | Default Value |
-| :------------- | :------------- | :------------- |
-| <a id="my_rule_impl-ctx"></a>ctx | <p align="center"> - </p> | none |
-
-
diff --git a/test/testdata/cc_api_test/input.bzl b/test/testdata/cc_api_test/input.bzl
deleted file mode 100644
index 9a4365f..0000000
--- a/test/testdata/cc_api_test/input.bzl
+++ /dev/null
@@ -1,22 +0,0 @@
-"""Input file for C++ api test"""
-
-def exercise_the_api():
- var1 = CcInfo # @unused
-
-exercise_the_api()
-
-def my_rule_impl(ctx):
- _ignore = [ctx] # @unused
- return []
-
-# buildifier: disable=unsorted-dict-items
-cpp_related_rule = rule(
- implementation = my_rule_impl,
- doc = "This rule does C++-related things.",
- attrs = {
- "first": attr.label(mandatory = True, allow_single_file = True),
- "second": attr.string_dict(mandatory = True),
- "third": attr.output(mandatory = True),
- "fourth": attr.bool(default = False, mandatory = False),
- },
-)
diff --git a/test/testdata/cpp_basic_test/golden.md b/test/testdata/cpp_basic_test/golden.md
deleted file mode 100644
index c78c671..0000000
--- a/test/testdata/cpp_basic_test/golden.md
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- Generated with Stardoc: http://skydoc.bazel.build -->
-
-
-
-<a id="cpp_related_rule"></a>
-
-## cpp_related_rule
-
-<pre>
-load("@stardoc//test:testdata/cpp_basic_test/input.bzl", "cpp_related_rule")
-
-cpp_related_rule(<a href="#cpp_related_rule-name">name</a>, <a href="#cpp_related_rule-first">first</a>, <a href="#cpp_related_rule-fourth">fourth</a>, <a href="#cpp_related_rule-second">second</a>, <a href="#cpp_related_rule-third">third</a>)
-</pre>
-
-This rule does cpp-related things.
-
-**ATTRIBUTES**
-
-
-| Name | Description | Type | Mandatory | Default |
-| :------------- | :------------- | :------------- | :------------- | :------------- |
-| <a id="cpp_related_rule-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
-| <a id="cpp_related_rule-first"></a>first | - | <a href="https://bazel.build/concepts/labels">Label</a> | required | |
-| <a id="cpp_related_rule-fourth"></a>fourth | - | Boolean | optional | `False` |
-| <a id="cpp_related_rule-second"></a>second | - | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | required | |
-| <a id="cpp_related_rule-third"></a>third | - | <a href="https://bazel.build/concepts/labels">Label</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | required | |
-
-
diff --git a/test/testdata/cpp_basic_test/input.bzl b/test/testdata/cpp_basic_test/input.bzl
deleted file mode 100644
index 985ad0c..0000000
--- a/test/testdata/cpp_basic_test/input.bzl
+++ /dev/null
@@ -1,22 +0,0 @@
-# buildifier: disable=module-docstring
-# buildifier: disable=function-docstring
-def exercise_the_api():
- var1 = cc_common.CcToolchainInfo # @unused
-
-exercise_the_api()
-
-def my_rule_impl(ctx):
- _ignore = [ctx] # @unused
- return []
-
-# buildifier: disable=unsorted-dict-items
-cpp_related_rule = rule(
- implementation = my_rule_impl,
- doc = "This rule does cpp-related things.",
- attrs = {
- "first": attr.label(mandatory = True, allow_single_file = True),
- "second": attr.string_dict(mandatory = True),
- "third": attr.output(mandatory = True),
- "fourth": attr.bool(default = False, mandatory = False),
- },
-)
diff --git a/test/testdata/providers_for_attributes_test/input.bzl b/test/testdata/providers_for_attributes_test/input.bzl
index 4e580e4..9bcc2d9 100644
--- a/test/testdata/providers_for_attributes_test/input.bzl
+++ b/test/testdata/providers_for_attributes_test/input.bzl
@@ -25,11 +25,11 @@
doc = "This rule does things.",
attrs = {
"first": attr.label_keyed_string_dict(
- providers = [MyProviderInfo, cc_common.CcToolchainInfo],
+ providers = [MyProviderInfo, DefaultInfo],
doc = "this is the first attribute.",
),
"second": attr.label_list(
- providers = [[CcInfo], [OtherProviderInfo, DepProviderInfo]],
+ providers = [[DefaultInfo], [OtherProviderInfo, DepProviderInfo]],
),
"third": attr.label(
providers = [OtherProviderInfo],
diff --git a/test/testdata/symbolic_macro_inherit_attrs_test/bazel_8_golden.md b/test/testdata/symbolic_macro_inherit_attrs_test/bazel_8_golden.md
new file mode 100644
index 0000000..9bf788d
--- /dev/null
+++ b/test/testdata/symbolic_macro_inherit_attrs_test/bazel_8_golden.md
@@ -0,0 +1,100 @@
+<!-- Generated with Stardoc: http://skydoc.bazel.build -->
+
+Symbolic macro attribute inheritance tests
+
+<a id="inherit_from_common"></a>
+
+## inherit_from_common
+
+<pre>
+load("@stardoc//test:testdata/symbolic_macro_inherit_attrs_test/input.bzl", "inherit_from_common")
+
+inherit_from_common(*, <a href="#inherit_from_common-name">name</a>, <a href="#inherit_from_common-srcs">srcs</a>, <a href="#inherit_from_common-compatible_with">compatible_with</a>, <a href="#inherit_from_common-deprecation">deprecation</a>, <a href="#inherit_from_common-exec_compatible_with">exec_compatible_with</a>,
+ <a href="#inherit_from_common-exec_properties">exec_properties</a>, <a href="#inherit_from_common-features">features</a>, <a href="#inherit_from_common-package_metadata">package_metadata</a>, <a href="#inherit_from_common-restricted_to">restricted_to</a>, <a href="#inherit_from_common-tags">tags</a>,
+ <a href="#inherit_from_common-target_compatible_with">target_compatible_with</a>, <a href="#inherit_from_common-testonly">testonly</a>, <a href="#inherit_from_common-toolchains">toolchains</a>, <a href="#inherit_from_common-visibility">visibility</a>)
+</pre>
+
+Initializes some targets.
+
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="inherit_from_common-name"></a>name | A unique name for this macro instance. Normally, this is also the name for the macro's main or only target. The names of any other targets that this macro might create will be this name with a string suffix. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="inherit_from_common-srcs"></a>srcs | Source files | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
+| <a id="inherit_from_common-compatible_with"></a>compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_common-deprecation"></a>deprecation | <a href="https://bazel.build/reference/be/common-definitions#common.deprecation">Inherited rule attribute</a> | String; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_common-exec_compatible_with"></a>exec_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.exec_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_common-exec_properties"></a>exec_properties | <a href="https://bazel.build/reference/be/common-definitions#common.exec_properties">Inherited rule attribute</a> | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `None` |
+| <a id="inherit_from_common-features"></a>features | <a href="https://bazel.build/reference/be/common-definitions#common.features">Inherited rule attribute</a> | List of strings | optional | `None` |
+| <a id="inherit_from_common-package_metadata"></a>package_metadata | <a href="https://bazel.build/reference/be/common-definitions#common.package_metadata">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_common-restricted_to"></a>restricted_to | <a href="https://bazel.build/reference/be/common-definitions#common.restricted_to">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_common-tags"></a>tags | <a href="https://bazel.build/reference/be/common-definitions#common.tags">Inherited rule attribute</a> | List of strings; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_common-target_compatible_with"></a>target_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.target_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
+| <a id="inherit_from_common-testonly"></a>testonly | <a href="https://bazel.build/reference/be/common-definitions#common.testonly">Inherited rule attribute</a> | Boolean; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_common-toolchains"></a>toolchains | <a href="https://bazel.build/reference/be/common-definitions#common.toolchains">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
+| <a id="inherit_from_common-visibility"></a>visibility | The visibility to be passed to this macro's exported targets. It always implicitly includes the location where this macro is instantiated, so this attribute only needs to be explicitly set if you want the macro's targets to be additionally visible somewhere else. | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | |
+
+
+<a id="inherit_from_macro"></a>
+
+## inherit_from_macro
+
+<pre>
+load("@stardoc//test:testdata/symbolic_macro_inherit_attrs_test/input.bzl", "inherit_from_macro")
+
+inherit_from_macro(*, <a href="#inherit_from_macro-name">name</a>, <a href="#inherit_from_macro-deps">deps</a>, <a href="#inherit_from_macro-srcs">srcs</a>, <a href="#inherit_from_macro-args">args</a>, <a href="#inherit_from_macro-visibility">visibility</a>)
+</pre>
+
+Initializes some targets.
+
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="inherit_from_macro-name"></a>name | A unique name for this macro instance. Normally, this is also the name for the macro's main or only target. The names of any other targets that this macro might create will be this name with a string suffix. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="inherit_from_macro-deps"></a>deps | Dependencies | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
+| <a id="inherit_from_macro-srcs"></a>srcs | Source files | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
+| <a id="inherit_from_macro-args"></a>args | Arguments | List of strings | required | |
+| <a id="inherit_from_macro-visibility"></a>visibility | The visibility to be passed to this macro's exported targets. It always implicitly includes the location where this macro is instantiated, so this attribute only needs to be explicitly set if you want the macro's targets to be additionally visible somewhere else. | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | |
+
+
+<a id="inherit_from_rule"></a>
+
+## inherit_from_rule
+
+<pre>
+load("@stardoc//test:testdata/symbolic_macro_inherit_attrs_test/input.bzl", "inherit_from_rule")
+
+inherit_from_rule(*, <a href="#inherit_from_rule-name">name</a>, <a href="#inherit_from_rule-deps">deps</a>, <a href="#inherit_from_rule-srcs">srcs</a>, <a href="#inherit_from_rule-args">args</a>, <a href="#inherit_from_rule-compatible_with">compatible_with</a>, <a href="#inherit_from_rule-deprecation">deprecation</a>, <a href="#inherit_from_rule-exec_compatible_with">exec_compatible_with</a>,
+ <a href="#inherit_from_rule-exec_properties">exec_properties</a>, <a href="#inherit_from_rule-features">features</a>, <a href="#inherit_from_rule-package_metadata">package_metadata</a>, <a href="#inherit_from_rule-restricted_to">restricted_to</a>, <a href="#inherit_from_rule-tags">tags</a>,
+ <a href="#inherit_from_rule-target_compatible_with">target_compatible_with</a>, <a href="#inherit_from_rule-testonly">testonly</a>, <a href="#inherit_from_rule-toolchains">toolchains</a>, <a href="#inherit_from_rule-visibility">visibility</a>)
+</pre>
+
+Initializes some targets.
+
+**ATTRIBUTES**
+
+
+| Name | Description | Type | Mandatory | Default |
+| :------------- | :------------- | :------------- | :------------- | :------------- |
+| <a id="inherit_from_rule-name"></a>name | A unique name for this macro instance. Normally, this is also the name for the macro's main or only target. The names of any other targets that this macro might create will be this name with a string suffix. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
+| <a id="inherit_from_rule-deps"></a>deps | Dependencies | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
+| <a id="inherit_from_rule-srcs"></a>srcs | Source files | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
+| <a id="inherit_from_rule-args"></a>args | Arguments | List of strings | required | |
+| <a id="inherit_from_rule-compatible_with"></a>compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_rule-deprecation"></a>deprecation | <a href="https://bazel.build/reference/be/common-definitions#common.deprecation">Inherited rule attribute</a> | String; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_rule-exec_compatible_with"></a>exec_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.exec_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_rule-exec_properties"></a>exec_properties | <a href="https://bazel.build/reference/be/common-definitions#common.exec_properties">Inherited rule attribute</a> | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `None` |
+| <a id="inherit_from_rule-features"></a>features | <a href="https://bazel.build/reference/be/common-definitions#common.features">Inherited rule attribute</a> | List of strings | optional | `None` |
+| <a id="inherit_from_rule-package_metadata"></a>package_metadata | <a href="https://bazel.build/reference/be/common-definitions#common.package_metadata">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_rule-restricted_to"></a>restricted_to | <a href="https://bazel.build/reference/be/common-definitions#common.restricted_to">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_rule-tags"></a>tags | <a href="https://bazel.build/reference/be/common-definitions#common.tags">Inherited rule attribute</a> | List of strings; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_rule-target_compatible_with"></a>target_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.target_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
+| <a id="inherit_from_rule-testonly"></a>testonly | <a href="https://bazel.build/reference/be/common-definitions#common.testonly">Inherited rule attribute</a> | Boolean; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_rule-toolchains"></a>toolchains | <a href="https://bazel.build/reference/be/common-definitions#common.toolchains">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `None` |
+| <a id="inherit_from_rule-visibility"></a>visibility | The visibility to be passed to this macro's exported targets. It always implicitly includes the location where this macro is instantiated, so this attribute only needs to be explicitly set if you want the macro's targets to be additionally visible somewhere else. | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | |
+
+
diff --git a/test/testdata/symbolic_macro_inherit_attrs_test/golden.md b/test/testdata/symbolic_macro_inherit_attrs_test/golden.md
index 9bf788d..a2e291a 100644
--- a/test/testdata/symbolic_macro_inherit_attrs_test/golden.md
+++ b/test/testdata/symbolic_macro_inherit_attrs_test/golden.md
@@ -10,8 +10,8 @@
load("@stardoc//test:testdata/symbolic_macro_inherit_attrs_test/input.bzl", "inherit_from_common")
inherit_from_common(*, <a href="#inherit_from_common-name">name</a>, <a href="#inherit_from_common-srcs">srcs</a>, <a href="#inherit_from_common-compatible_with">compatible_with</a>, <a href="#inherit_from_common-deprecation">deprecation</a>, <a href="#inherit_from_common-exec_compatible_with">exec_compatible_with</a>,
- <a href="#inherit_from_common-exec_properties">exec_properties</a>, <a href="#inherit_from_common-features">features</a>, <a href="#inherit_from_common-package_metadata">package_metadata</a>, <a href="#inherit_from_common-restricted_to">restricted_to</a>, <a href="#inherit_from_common-tags">tags</a>,
- <a href="#inherit_from_common-target_compatible_with">target_compatible_with</a>, <a href="#inherit_from_common-testonly">testonly</a>, <a href="#inherit_from_common-toolchains">toolchains</a>, <a href="#inherit_from_common-visibility">visibility</a>)
+ <a href="#inherit_from_common-exec_group_compatible_with">exec_group_compatible_with</a>, <a href="#inherit_from_common-exec_properties">exec_properties</a>, <a href="#inherit_from_common-features">features</a>, <a href="#inherit_from_common-package_metadata">package_metadata</a>,
+ <a href="#inherit_from_common-restricted_to">restricted_to</a>, <a href="#inherit_from_common-tags">tags</a>, <a href="#inherit_from_common-target_compatible_with">target_compatible_with</a>, <a href="#inherit_from_common-testonly">testonly</a>, <a href="#inherit_from_common-toolchains">toolchains</a>, <a href="#inherit_from_common-visibility">visibility</a>)
</pre>
Initializes some targets.
@@ -26,6 +26,7 @@
| <a id="inherit_from_common-compatible_with"></a>compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="inherit_from_common-deprecation"></a>deprecation | <a href="https://bazel.build/reference/be/common-definitions#common.deprecation">Inherited rule attribute</a> | String; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="inherit_from_common-exec_compatible_with"></a>exec_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.exec_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_common-exec_group_compatible_with"></a>exec_group_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.exec_group_compatible_with">Inherited rule attribute</a> | Dictionary: String -> List of labels; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="inherit_from_common-exec_properties"></a>exec_properties | <a href="https://bazel.build/reference/be/common-definitions#common.exec_properties">Inherited rule attribute</a> | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `None` |
| <a id="inherit_from_common-features"></a>features | <a href="https://bazel.build/reference/be/common-definitions#common.features">Inherited rule attribute</a> | List of strings | optional | `None` |
| <a id="inherit_from_common-package_metadata"></a>package_metadata | <a href="https://bazel.build/reference/be/common-definitions#common.package_metadata">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
@@ -69,8 +70,8 @@
load("@stardoc//test:testdata/symbolic_macro_inherit_attrs_test/input.bzl", "inherit_from_rule")
inherit_from_rule(*, <a href="#inherit_from_rule-name">name</a>, <a href="#inherit_from_rule-deps">deps</a>, <a href="#inherit_from_rule-srcs">srcs</a>, <a href="#inherit_from_rule-args">args</a>, <a href="#inherit_from_rule-compatible_with">compatible_with</a>, <a href="#inherit_from_rule-deprecation">deprecation</a>, <a href="#inherit_from_rule-exec_compatible_with">exec_compatible_with</a>,
- <a href="#inherit_from_rule-exec_properties">exec_properties</a>, <a href="#inherit_from_rule-features">features</a>, <a href="#inherit_from_rule-package_metadata">package_metadata</a>, <a href="#inherit_from_rule-restricted_to">restricted_to</a>, <a href="#inherit_from_rule-tags">tags</a>,
- <a href="#inherit_from_rule-target_compatible_with">target_compatible_with</a>, <a href="#inherit_from_rule-testonly">testonly</a>, <a href="#inherit_from_rule-toolchains">toolchains</a>, <a href="#inherit_from_rule-visibility">visibility</a>)
+ <a href="#inherit_from_rule-exec_group_compatible_with">exec_group_compatible_with</a>, <a href="#inherit_from_rule-exec_properties">exec_properties</a>, <a href="#inherit_from_rule-features">features</a>, <a href="#inherit_from_rule-package_metadata">package_metadata</a>,
+ <a href="#inherit_from_rule-restricted_to">restricted_to</a>, <a href="#inherit_from_rule-tags">tags</a>, <a href="#inherit_from_rule-target_compatible_with">target_compatible_with</a>, <a href="#inherit_from_rule-testonly">testonly</a>, <a href="#inherit_from_rule-toolchains">toolchains</a>, <a href="#inherit_from_rule-visibility">visibility</a>)
</pre>
Initializes some targets.
@@ -87,6 +88,7 @@
| <a id="inherit_from_rule-compatible_with"></a>compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="inherit_from_rule-deprecation"></a>deprecation | <a href="https://bazel.build/reference/be/common-definitions#common.deprecation">Inherited rule attribute</a> | String; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="inherit_from_rule-exec_compatible_with"></a>exec_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.exec_compatible_with">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
+| <a id="inherit_from_rule-exec_group_compatible_with"></a>exec_group_compatible_with | <a href="https://bazel.build/reference/be/common-definitions#common.exec_group_compatible_with">Inherited rule attribute</a> | Dictionary: String -> List of labels; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
| <a id="inherit_from_rule-exec_properties"></a>exec_properties | <a href="https://bazel.build/reference/be/common-definitions#common.exec_properties">Inherited rule attribute</a> | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `None` |
| <a id="inherit_from_rule-features"></a>features | <a href="https://bazel.build/reference/be/common-definitions#common.features">Inherited rule attribute</a> | List of strings | optional | `None` |
| <a id="inherit_from_rule-package_metadata"></a>package_metadata | <a href="https://bazel.build/reference/be/common-definitions#common.package_metadata">Inherited rule attribute</a> | <a href="https://bazel.build/concepts/labels">List of labels</a>; <a href="https://bazel.build/reference/be/common-definitions#configurable-attributes">nonconfigurable</a> | optional | `None` |
diff --git a/update-stardoc-tests.sh b/update-stardoc-tests.sh
index dfdcec6..d5cb83e 100755
--- a/update-stardoc-tests.sh
+++ b/update-stardoc-tests.sh
@@ -62,6 +62,9 @@
update_non_manual_tests
update_manual_tests_with_tag "noenable_bzlmod" --noenable_bzlmod --enable_workspace
USE_BAZEL_VERSION="7.4.1" update_manual_tests_with_tag "bazel_7"
+USE_BAZEL_VERSION="8.0.1" update_manual_tests_with_tag "bazel_8"
+# last_green on 2025-02-04
+USE_BAZEL_VERSION="1cbed995fcd310f58ad06f9f046650301bc54584" update_manual_tests_with_tag "bazel_9"
echo "** Files copied."
echo "Please note that not all golden files are correctly copied by this script."