From 36433a92a4eacd2faab9133278f7493679a7eed5 Mon Sep 17 00:00:00 2001 From: aiuto Date: Tue, 16 Apr 2024 22:17:21 -0400 Subject: [PATCH] Update to new stardoc so we can work with bzlmod. (#853) * Update to new stardoc so we can work with bzlmod. * Requires update to merge.py to account for stardoc changes. * put integration test back on bazel at head. Fixes #808 --- .bazelci/integration.yml | 4 ---- MODULE.bazel | 2 +- doc_build/BUILD | 2 +- doc_build/merge.py | 7 ++++--- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.bazelci/integration.yml b/.bazelci/integration.yml index 3cf24014..94ca75a6 100644 --- a/.bazelci/integration.yml +++ b/.bazelci/integration.yml @@ -11,8 +11,4 @@ tasks: integration: name: rolling_distro platform: ubuntu1804 - # See https://github.com/bazelbuild/rules_pkg/issues/808 - bazel: 7.0.0 - build_flags: - - "--noenable_bzlmod" <<: *common diff --git a/MODULE.bazel b/MODULE.bazel index f05b7417..725f54e9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -12,8 +12,8 @@ bazel_dep(name = "bazel_skylib", version = "1.2.0") # Only for development bazel_dep(name = "platforms", version = "0.0.9", dev_dependency = True) -bazel_dep(name = "stardoc", version = "0.5.3", dev_dependency = True) bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True) +bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True) # Find the system rpmbuild if one is available. find_rpm = use_extension("//toolchains/rpm:rpmbuild_configure.bzl", "find_system_rpmbuild_bzlmod", dev_dependency = True) diff --git a/doc_build/BUILD b/doc_build/BUILD index 1292aa5a..9a7ec754 100644 --- a/doc_build/BUILD +++ b/doc_build/BUILD @@ -20,7 +20,7 @@ How to: """ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("@bazel_stardoc//stardoc:stardoc.bzl", "stardoc") +load("@stardoc//stardoc:stardoc.bzl", "stardoc") load("//:version.bzl", "version") package(default_applicable_licenses = ["//:license"]) diff --git a/doc_build/merge.py b/doc_build/merge.py index 02eb8f1e..ae67d10d 100755 --- a/doc_build/merge.py +++ b/doc_build/merge.py @@ -23,7 +23,7 @@ import typing -ID_RE = re.compile(r'') +ID_RE = re.compile(r'') WRAPS_RE = re.compile(r'@wraps\((.*)\)') SINCE_RE = re.compile(r'@since\(([^)]*)\)') CENTER_RE = re.compile(r'

([^<]*)

') @@ -78,9 +78,10 @@ def main(argv: typing.Sequence[str]) -> None: for file in argv[1:]: merge_file(file, sys.stdout, wrapper_map) if wrapper_map: - print("We didn't use all the @wraps()", wrapper_map) + print("We didn't use all the @wraps()", wrapper_map, file=sys.stderr) sys.exit(1) + return 0 if __name__ == '__main__': - main(sys.argv) + sys.exit(main(sys.argv))