Bump bazel dep and add docstring dedenting test cases (#170)
We want https://github.com/bazelbuild/bazel/commit/b71b2df2b22e052f8540a23051b589c6ef870d0a in order to dedent and trim doc strings from all sources (not just functions, but also rules, providers, attributes, etc.).
diff --git a/WORKSPACE b/WORKSPACE
index 3ac9188..749bf55 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -97,7 +97,7 @@
# Needed for generating the Stardoc release binary.
git_repository(
name = "io_bazel",
- commit = "c2394ca2d201bdc72887b3920680ca119d46a26e", # 2023-05-10
+ commit = "b71b2df2b22e052f8540a23051b589c6ef870d0a", # 2023-08-01
remote = "https://github.com/bazelbuild/bazel.git",
)
@@ -172,6 +172,17 @@
rules_proto_toolchains()
+# Needed as a transitive dependency of @io_bazel
+http_archive(
+ name = "blake3",
+ build_file = "@io_bazel//third_party:blake3/blake3.BUILD",
+ sha256 = "bb529ba133c0256df49139bd403c17835edbf60d2ecd6463549c6a5fe279364d",
+ strip_prefix = "BLAKE3-1.3.3",
+ urls = [
+ "https://github.com/BLAKE3-team/BLAKE3/archive/refs/tags/1.3.3.zip",
+ ],
+)
+
### END INTERNAL ONLY
# protobuf_deps() must not be called before @rules_python are loaded (if they are loaded).
protobuf_deps()
diff --git a/stardoc/stardoc_binary.jar b/stardoc/stardoc_binary.jar
index f10aece..0350f5d 100755
--- a/stardoc/stardoc_binary.jar
+++ b/stardoc/stardoc_binary.jar
Binary files differ
diff --git a/test/testdata/angle_bracket_test/legacy_golden.md b/test/testdata/angle_bracket_test/legacy_golden.md
index d6457b2..42f8fc6 100644
--- a/test/testdata/angle_bracket_test/legacy_golden.md
+++ b/test/testdata/angle_bracket_test/legacy_golden.md
@@ -12,7 +12,6 @@
(`\\<` becomes \<), or by using HTML entities (`<` becomes <).
Angle brackets are also preserved in inline code blocks (`#include <vector>`).
-
<a id="my_anglebrac"></a>
## my_anglebrac
@@ -106,7 +105,6 @@
```
which includes angle brackets.
-
**ASPECT ATTRIBUTES**
diff --git a/test/testdata/aspect_test/golden.md b/test/testdata/aspect_test/golden.md
index 8be6341..e1ef986 100644
--- a/test/testdata/aspect_test/golden.md
+++ b/test/testdata/aspect_test/golden.md
@@ -28,7 +28,9 @@
my_aspect(<a href="#my_aspect-name">name</a>, <a href="#my_aspect-first">first</a>, <a href="#my_aspect-second">second</a>)
</pre>
-This is my aspect. It does stuff.
+This is my aspect.
+
+It does stuff.
**ASPECT ATTRIBUTES**
diff --git a/test/testdata/aspect_test/input.bzl b/test/testdata/aspect_test/input.bzl
index 3e59e97..38ddde0 100644
--- a/test/testdata/aspect_test/input.bzl
+++ b/test/testdata/aspect_test/input.bzl
@@ -6,7 +6,11 @@
my_aspect = aspect(
implementation = my_aspect_impl,
- doc = "This is my aspect. It does stuff.",
+ doc = """
+ This is my aspect.
+
+ It does stuff.
+ """,
attr_aspects = ["deps", "attr_aspect"],
attrs = {
"first": attr.bool(mandatory = True),
diff --git a/test/testdata/aspect_test/legacy_golden.md b/test/testdata/aspect_test/legacy_golden.md
index b61e57a..283689a 100644
--- a/test/testdata/aspect_test/legacy_golden.md
+++ b/test/testdata/aspect_test/legacy_golden.md
@@ -28,7 +28,9 @@
my_aspect(<a href="#my_aspect-name">name</a>, <a href="#my_aspect-first">first</a>, <a href="#my_aspect-second">second</a>)
</pre>
-This is my aspect. It does stuff.
+This is my aspect.
+
+It does stuff.
**ASPECT ATTRIBUTES**
diff --git a/test/testdata/attribute_types_test/golden.md b/test/testdata/attribute_types_test/golden.md
index 994f154..1412f2f 100644
--- a/test/testdata/attribute_types_test/golden.md
+++ b/test/testdata/attribute_types_test/golden.md
@@ -10,7 +10,9 @@
my_rule(<a href="#my_rule-name">name</a>, <a href="#my_rule-a">a</a>, <a href="#my_rule-b">b</a>, <a href="#my_rule-c">c</a>, <a href="#my_rule-d">d</a>, <a href="#my_rule-e">e</a>, <a href="#my_rule-f">f</a>, <a href="#my_rule-g">g</a>, <a href="#my_rule-h">h</a>, <a href="#my_rule-i">i</a>, <a href="#my_rule-j">j</a>, <a href="#my_rule-k">k</a>, <a href="#my_rule-l">l</a>)
</pre>
-This is my rule. It does stuff.
+This is my rule.
+
+It does stuff.
**ATTRIBUTES**
diff --git a/test/testdata/attribute_types_test/input.bzl b/test/testdata/attribute_types_test/input.bzl
index 92c037c..3c1e8d5 100644
--- a/test/testdata/attribute_types_test/input.bzl
+++ b/test/testdata/attribute_types_test/input.bzl
@@ -6,7 +6,11 @@
my_rule = rule(
implementation = my_rule_impl,
- doc = "This is my rule. It does stuff.",
+ doc = """
+ This is my rule.
+
+ It does stuff.
+ """,
attrs = {
"a": attr.bool(mandatory = True, doc = "Some bool"),
"b": attr.int(mandatory = True, doc = "Some int"),
diff --git a/test/testdata/attribute_types_test/legacy_golden.md b/test/testdata/attribute_types_test/legacy_golden.md
index 4df4916..aa2ae91 100644
--- a/test/testdata/attribute_types_test/legacy_golden.md
+++ b/test/testdata/attribute_types_test/legacy_golden.md
@@ -10,7 +10,9 @@
my_rule(<a href="#my_rule-name">name</a>, <a href="#my_rule-a">a</a>, <a href="#my_rule-b">b</a>, <a href="#my_rule-c">c</a>, <a href="#my_rule-d">d</a>, <a href="#my_rule-e">e</a>, <a href="#my_rule-f">f</a>, <a href="#my_rule-g">g</a>, <a href="#my_rule-h">h</a>, <a href="#my_rule-i">i</a>, <a href="#my_rule-j">j</a>, <a href="#my_rule-k">k</a>, <a href="#my_rule-l">l</a>)
</pre>
-This is my rule. It does stuff.
+This is my rule.
+
+It does stuff.
**ATTRIBUTES**
diff --git a/test/testdata/proto_format_test/legacy_golden.binaryproto b/test/testdata/proto_format_test/legacy_golden.binaryproto
index a93d367..d158834 100644
--- a/test/testdata/proto_format_test/legacy_golden.binaryproto
+++ b/test/testdata/proto_format_test/legacy_golden.binaryproto
Binary files differ
diff --git a/test/testdata/provider_basic_test/golden.md b/test/testdata/provider_basic_test/golden.md
index 99cd944..7029581 100644
--- a/test/testdata/provider_basic_test/golden.md
+++ b/test/testdata/provider_basic_test/golden.md
@@ -44,6 +44,7 @@
</pre>
A provider with some really neat documentation.
+
Look on my works, ye mighty, and despair!
**FIELDS**
@@ -51,7 +52,7 @@
| Name | Description |
| :------------- | :------------- |
-| <a id="MyVeryDocumentedInfo-favorite_food"></a>favorite_food | A string representing my favorite food |
+| <a id="MyVeryDocumentedInfo-favorite_food"></a>favorite_food | A string representing my favorite food<br><br>Expected to be delicious. |
| <a id="MyVeryDocumentedInfo-favorite_color"></a>favorite_color | A string representing my favorite color |
diff --git a/test/testdata/provider_basic_test/input.bzl b/test/testdata/provider_basic_test/input.bzl
index 959986f..cc3068d 100644
--- a/test/testdata/provider_basic_test/input.bzl
+++ b/test/testdata/provider_basic_test/input.bzl
@@ -10,11 +10,16 @@
# buildifier: disable=unsorted-dict-items
MyVeryDocumentedInfo = provider(
doc = """
-A provider with some really neat documentation.
-Look on my works, ye mighty, and despair!
-""",
+ A provider with some really neat documentation.
+
+ Look on my works, ye mighty, and despair!
+ """,
fields = {
- "favorite_food": "A string representing my favorite food",
+ "favorite_food": """
+ A string representing my favorite food
+
+ Expected to be delicious.
+ """,
"favorite_color": "A string representing my favorite color",
},
)
diff --git a/test/testdata/provider_basic_test/legacy_golden.md b/test/testdata/provider_basic_test/legacy_golden.md
index a9d76bf..38dd0f6 100644
--- a/test/testdata/provider_basic_test/legacy_golden.md
+++ b/test/testdata/provider_basic_test/legacy_golden.md
@@ -43,17 +43,16 @@
MyVeryDocumentedInfo(<a href="#MyVeryDocumentedInfo-favorite_food">favorite_food</a>, <a href="#MyVeryDocumentedInfo-favorite_color">favorite_color</a>)
</pre>
-
A provider with some really neat documentation.
-Look on my works, ye mighty, and despair!
+Look on my works, ye mighty, and despair!
**FIELDS**
| Name | Description |
| :------------- | :------------- |
-| <a id="MyVeryDocumentedInfo-favorite_food"></a>favorite_food | A string representing my favorite food |
+| <a id="MyVeryDocumentedInfo-favorite_food"></a>favorite_food | A string representing my favorite food<br><br> Expected to be delicious. |
| <a id="MyVeryDocumentedInfo-favorite_color"></a>favorite_color | A string representing my favorite color |
diff --git a/test/testdata/repo_rules_test/golden.md b/test/testdata/repo_rules_test/golden.md
index 67a1074..de907c7 100644
--- a/test/testdata/repo_rules_test/golden.md
+++ b/test/testdata/repo_rules_test/golden.md
@@ -19,7 +19,7 @@
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="my_repo-name"></a>name | A unique name for this repository. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
| <a id="my_repo-repo_mapping"></a>repo_mapping | In `WORKSPACE` context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<br><br>For example, an entry `"@foo": "@bar"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`).<br><br>This attribute is _not_ supported in `MODULE.bazel` context (when invoking a repository rule inside a module extension's implementation function). | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | |
-| <a id="my_repo-useless"></a>useless | This argument will be ignored. You don't have to specify it, but you may. | String | optional | `"ignoreme"` |
+| <a id="my_repo-useless"></a>useless | This argument will be ignored.<br><br>You don't have to specify it, but you may. | String | optional | `"ignoreme"` |
**ENVIRONMENT VARIABLES**
diff --git a/test/testdata/repo_rules_test/input.bzl b/test/testdata/repo_rules_test/input.bzl
index 404d3a7..114c3bc 100644
--- a/test/testdata/repo_rules_test/input.bzl
+++ b/test/testdata/repo_rules_test/input.bzl
@@ -7,7 +7,10 @@
doc = "Minimal example of a repository rule.",
attrs = {
"useless": attr.string(
- doc = "This argument will be ignored. You don't have to specify it, but you may.",
+ doc = """This argument will be ignored.
+
+ You don't have to specify it, but you may.
+ """,
default = "ignoreme",
),
},
diff --git a/test/testdata/repo_rules_test/legacy_golden.md b/test/testdata/repo_rules_test/legacy_golden.md
index c0084fa..d705a32 100644
--- a/test/testdata/repo_rules_test/legacy_golden.md
+++ b/test/testdata/repo_rules_test/legacy_golden.md
@@ -19,6 +19,6 @@
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="my_repo-name"></a>name | A unique name for this repository. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
| <a id="my_repo-repo_mapping"></a>repo_mapping | A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<p>For example, an entry `"@foo": "@bar"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`). | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | required | |
-| <a id="my_repo-useless"></a>useless | This argument will be ignored. You don't have to specify it, but you may. | String | optional | `"ignoreme"` |
+| <a id="my_repo-useless"></a>useless | This argument will be ignored.<br><br>You don't have to specify it, but you may. | String | optional | `"ignoreme"` |