Skip to content

Commit

Permalink
Update to new stardoc so we can work with bzlmod. (bazelbuild#853)
Browse files Browse the repository at this point in the history
* 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 bazelbuild#808
  • Loading branch information
aiuto authored Apr 17, 2024
1 parent 626de3a commit 36433a9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .bazelci/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion doc_build/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
7 changes: 4 additions & 3 deletions doc_build/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import typing


ID_RE = re.compile(r'<a id="#(.*)">')
ID_RE = re.compile(r'<a id="(.*)">')
WRAPS_RE = re.compile(r'@wraps\((.*)\)')
SINCE_RE = re.compile(r'@since\(([^)]*)\)')
CENTER_RE = re.compile(r'<p align="center">([^<]*)</p>')
Expand Down Expand Up @@ -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))

0 comments on commit 36433a9

Please sign in to comment.