From 0257fb18938a1824ca8aeadcb3334f2fe2c604f1 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Wed, 11 Dec 2024 16:55:46 -0800 Subject: [PATCH] update stardoc --- MODULE.bazel | 23 +++++++++++++++++++---- doc/BUILD | 12 +++++++++++- doc/rules.md | 3 +++ 3 files changed, 33 insertions(+), 5 deletions(-) mode change 100644 => 100755 doc/rules.md diff --git a/MODULE.bazel b/MODULE.bazel index 4682331..187fc4b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -11,15 +11,30 @@ bazel_dep(name = "bazel_skylib", version = "1.3.0") bazel_dep(name = "platforms", version = "0.0.9") bazel_dep(name = "rules_cc", version = "0.0.8") +apple_cc_configure = use_extension("//crosstool:setup.bzl", "apple_cc_configure_extension") +use_repo(apple_cc_configure, "local_config_apple_cc", "local_config_apple_cc_toolchains") + +register_toolchains("@local_config_apple_cc_toolchains//:all") + bazel_dep(name = "rules_shell", version = "0.3.0", dev_dependency = True) bazel_dep( name = "stardoc", - version = "0.6.2", + version = "0.7.2", dev_dependency = True, repo_name = "io_bazel_stardoc", ) -apple_cc_configure = use_extension("//crosstool:setup.bzl", "apple_cc_configure_extension") -use_repo(apple_cc_configure, "local_config_apple_cc", "local_config_apple_cc_toolchains") +# TODO: Remove when https://github.com/bazelbuild/stardoc/pull/269 is in a release +bazel_dep(name = "rules_jvm_external", version = "6.6", dev_dependency = True) +bazel_dep(name = "protobuf", version = "29.1", dev_dependency = True) -register_toolchains("@local_config_apple_cc_toolchains//:all") +# bazel_dep(name = "rules_java", version = "8.6.2") + +# TODO: Remove override when a protobuf release is available that supports +# Bazel 8 +archive_override( + module_name = "protobuf", + integrity = "sha256-YhxaemCfJrKK2is5/vAitBuM4dosZZ2aT01UxfppMJg=", + strip_prefix = "protobuf-bb287be772454d63b411b73d60b1d92daa879f2e", + urls = ["https://github.com/protocolbuffers/protobuf/archive/bb287be772454d63b411b73d60b1d92daa879f2e.zip"], +) diff --git a/doc/BUILD b/doc/BUILD index e60ee0b..1745bc8 100644 --- a/doc/BUILD +++ b/doc/BUILD @@ -28,7 +28,7 @@ write_file( [ stardoc( name = file + "_doc", - out = file + ".md_", + out = file + ".md_pre", header_template = file + "_header.vm", input = "//rules:rules.doc.bzl", symbol_names = symbols, @@ -41,6 +41,16 @@ write_file( ] in _DOC_SRCS.items() ] +[ + genrule( + name = "fix_stardoc_" + file, + srcs = [file + ".md_pre"], + outs = [file + ".md_"], + cmd = "sed '/rules.doc.bzl/d' $(SRCS) > $(OUTS)", + ) + for file in _DOC_SRCS.keys() +] + [ diff_test( name = "test_" + file, diff --git a/doc/rules.md b/doc/rules.md old mode 100644 new mode 100755 index 5b5064c..830e3c2 --- a/doc/rules.md +++ b/doc/rules.md @@ -12,6 +12,7 @@ On this page: ## apple_genrule
+
 apple_genrule(name, srcs, outs, cmd, executable, message, no_sandbox, tools)
 
@@ -83,6 +84,7 @@ NOTE: `DEVELOPER_DIR` and `SDKROOT` are environment variables and *not* make ## toolchain_substitution
+
 toolchain_substitution(name, src, var_name)
 
@@ -123,6 +125,7 @@ ios_application( ## universal_binary
+
 universal_binary(name, binary)