Skip to content

Commit c0f779e

Browse files
authored
refactor: delete stardoc_with_diff_test (#1188)
The stardoc module has heavy dependencies. See remaining justification in the attached issue. Fixes #1185 BREAKING CHANGE: bazel-lib no longer provides a convenience for checking in generated docs. Alternatives: - (recommended): publish `starlark_doc_extract` rules on releases instead of checking in generated files; see https://blog.aspect.build/stardocs-on-bcr - Copy the macro into your own repo like rules_go does, combining a stardoc target with a `diff_test` - Use `aspect_bazel_lib` 2.x along with `bazel_lib`; the former provides this rule.
1 parent cbdd3a8 commit c0f779e

File tree

10 files changed

+3
-97
lines changed

10 files changed

+3
-97
lines changed

.bazelignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# nested modules
2-
docs/
32
e2e/

.github/workflows/release_prep.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')
4646
# Add generated API docs to the release, see https://github.com/bazelbuild/bazel-central-registry/issues/5593
4747
docs="$(mktemp -d)"; targets="$(mktemp)"
4848
bazel --output_base="$docs" query --output=label --output_file="$targets" 'kind("starlark_doc_extract rule", //...)'
49-
bazel --output_base="$docs" build --target_pattern_file="$targets" --remote_download_regex='.*doc_extract\.binaryproto'
49+
bazel --output_base="$docs" build --target_pattern_file="$targets"
5050
tar --create --auto-compress \
5151
--directory "$(bazel --output_base="$docs" info bazel-bin)" \
5252
--file "$GITHUB_WORKSPACE/${ARCHIVE%.tar.gz}.docs.tar.gz" .

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
- id: check-symlinks
3333
- id: destroyed-symlinks
3434
- id: end-of-file-fixer
35-
exclude: &exclude_pattern "^(docs|e2e|lib/tests)/"
35+
exclude: "^(e2e|lib/tests)/"
3636
- id: mixed-line-ending
3737
- id: trailing-whitespace
3838
- repo: https://github.com/crate-ci/typos

.prettierignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
.circleci/config.yml
2-
docs/*.md
3-
e2e/*/docs.md
42
lib/lib/tests/write_source_files/*.js
53
lib/lib/tests/write_source_files/subdir/*.js
64
lib/lib/tests/write_source_files/subdir/subsubdir/*.js

MODULE.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module(
88
bazel_dep(name = "bazel_features", version = "1.9.0")
99
bazel_dep(name = "bazel_skylib", version = "1.8.1")
1010
bazel_dep(name = "platforms", version = "0.0.10")
11-
bazel_dep(name = "stardoc", version = "0.7.1")
1211
bazel_dep(name = "rules_shell", version = "0.4.1")
1312

1413
bazel_lib_toolchains = use_extension("@bazel_lib//lib:extensions.bzl", "toolchains")

e2e/api_entries/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ build_test(
1818
"@bazel_lib//lib:coreutils_toolchain_type",
1919
"@bazel_lib//lib:diff_test",
2020
"@bazel_lib//lib:directory_path",
21-
"@bazel_lib//lib:docs",
2221
"@bazel_lib//lib:enable_runfiles",
2322
"@bazel_lib//lib:expand_make_vars",
2423
"@bazel_lib//lib:expand_template",

lib/BUILD.bazel

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
load("@bazel_lib//:bzl_library.bzl", "bzl_library")
21
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
2+
load("//:bzl_library.bzl", "bzl_library")
33
load("//lib:utils.bzl", "is_bzlmod_enabled")
44
load("//lib/private:stamping.bzl", "stamp_build_setting")
55

6-
# Ensure that users building their own rules can dep on our bzl_library targets for their stardoc
76
package(default_visibility = ["//visibility:public"])
87

98
exports_files(
@@ -262,12 +261,6 @@ bzl_library(
262261
deps = ["//lib/private:lists"],
263262
)
264263

265-
bzl_library(
266-
name = "docs",
267-
srcs = ["docs.bzl"],
268-
deps = ["//lib/private:docs"],
269-
)
270-
271264
bzl_library(
272265
name = "windows_utils",
273266
srcs = ["windows_utils.bzl"],

lib/docs.bzl

Lines changed: 0 additions & 10 deletions
This file was deleted.

lib/private/BUILD.bazel

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,6 @@ bzl_library(
109109
],
110110
)
111111

112-
bzl_library(
113-
name = "docs",
114-
srcs = ["docs.bzl"],
115-
visibility = ["//lib:__subpackages__"],
116-
deps = [
117-
"//lib:write_source_files",
118-
"@stardoc//stardoc:stardoc_lib", #keep
119-
],
120-
)
121-
122112
bzl_library(
123113
name = "expand_template",
124114
srcs = ["expand_template.bzl"],

lib/private/docs.bzl

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)