Skip to content

Commit 50fb789

Browse files
committed
Update stardoc to v0.8.0
GitOrigin-RevId: 11496f6ba52aa4ac684f2f293dad2162d3e1c937
1 parent f8e7456 commit 50fb789

File tree

10 files changed

+158
-132
lines changed

10 files changed

+158
-132
lines changed

.github/workflows/tests.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
chmod +x "cache/bazel-${BAZEL_VERSION}-linux-x86_64"
4444
mkdir -p src/tools
4545
ln -s "../../cache/bazel-${BAZEL_VERSION}-linux-x86_64" src/tools/bazel
46+
47+
echo 'tools/stardoc' > src/.bazelignore
4648
env:
4749
BAZEL_VERSION: ${{ matrix.bazel.version }}
4850
- name: "bazel test //..."

MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bazel_dep(
1919
)
2020
bazel_dep(
2121
name = "stardoc",
22-
version = "0.5.3",
22+
version = "0.8.0",
2323
dev_dependency = True,
2424
repo_name = "io_bazel_stardoc",
2525
)

WORKSPACE

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ http_archive(
4747

4848
http_archive(
4949
name = "io_bazel_stardoc",
50-
sha256 = "3fd8fec4ddec3c670bd810904e2e33170bedfe12f90adf943508184be458c8bb",
50+
sha256 = "ca933f39f2a6e0ad392fa91fd662545afcbd36c05c62365538385d35a0323096",
5151
urls = [
52-
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
53-
"https://github.com/bazelbuild/stardoc/releases/download/0.5.3/stardoc-0.5.3.tar.gz",
52+
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.8.0/stardoc-0.8.0.tar.gz",
53+
"https://github.com/bazelbuild/stardoc/releases/download/0.8.0/stardoc-0.8.0.tar.gz",
5454
],
5555
)

docs/rules_flex.md

+121-69
Large diffs are not rendered by default.

flex/BUILD

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
load("//flex/internal:toolchain_alias.bzl", "flex_toolchain_alias")
22

3+
filegroup(
4+
name = "flex_bzl",
5+
srcs = ["flex.bzl"],
6+
visibility = ["//:__subpackages__"],
7+
)
8+
39
filegroup(
410
name = "bzl_srcs",
511
srcs = glob(["*.bzl"]) + [
6-
"//flex/extensions:bzl_srcs",
712
"//flex/internal:bzl_srcs",
813
"//flex/rules:bzl_srcs",
914
],

flex/extensions/BUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
filegroup(
2-
name = "bzl_srcs",
3-
srcs = glob(["*.bzl"]),
2+
name = "flex_repository_ext_bzl",
3+
srcs = ["flex_repository_ext.bzl"],
44
visibility = ["//:__subpackages__"],
55
)

tools/stardoc/BUILD

+18-12
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
1-
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
21
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")
32

4-
bzl_library(
5-
name = "rules_flex_bzl_srcs",
6-
srcs = ["//flex:bzl_srcs"],
3+
stardoc(
4+
name = "flex_md",
5+
out = "flex.md",
6+
header_template = ":header.vm",
7+
input = "//flex:flex_bzl",
8+
deps = ["//flex:bzl_srcs"],
79
)
810

911
stardoc(
10-
name = "rules_flex_raw_md",
11-
out = "rules_flex_raw.md",
12-
input = "rules_flex_md.bzl",
13-
deps = [":rules_flex_bzl_srcs"],
12+
name = "flex_repository_ext_md",
13+
out = "flex_repository_ext.md",
14+
header_template = ":empty.vm",
15+
input = "//flex/extensions:flex_repository_ext_bzl",
16+
deps = ["//flex:bzl_srcs"],
1417
)
1518

1619
# https://github.com/bazelbuild/stardoc/issues/78
1720
genrule(
1821
name = "rules_flex_md",
19-
srcs = [":rules_flex_raw.md"],
22+
srcs = [
23+
":flex_md",
24+
":flex_repository_ext_md",
25+
],
2026
outs = ["rules_flex.md"],
2127
cmd = """
22-
sed \\
28+
cat $(SRCS) | sed \\
2329
-e 's/C or C++ mode:/C or C++ mode:<ul>/g' \\
2430
-e 's/ - \\([^-]*\\) /<li>\\1<\\/li> /' \\
2531
-e 's/ - \\([^-]*\\) /<li>\\1<\\/li> /' \\
2632
-e 's/<br><br>The C++ output/<\\/ul>The C++ output/g' \\
27-
$< > $@
33+
> $@
2834
""",
2935
)
3036

3137
filegroup(
3238
name = "stardoc_outputs",
33-
srcs = [":rules_flex.md"],
39+
srcs = [":rules_flex_md"],
3440
visibility = ["//:__subpackages__"],
3541
)

tools/stardoc/empty.vm

Whitespace-only changes.

tools/stardoc/header.vm

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!-- Generated with Stardoc: http://skydoc.bazel.build -->
2+
3+
# rules_flex
4+
5+
${moduleDocstring}

tools/stardoc/rules_flex_md.bzl

-44
This file was deleted.

0 commit comments

Comments
 (0)