Skip to content

Commit 4109b3c

Browse files
thesayynalexeaglegregmagolan
authored
chore: cherry pick doc fixes (#800)
* chore: run gazelle (#584) Also delete the local_config_platform workaround for bazel 5 which made our docs setup complex (cherry picked from commit 6a4381b) * chore: test against bazel 7.0.0 (#713) (cherry picked from commit 5aaa785) --------- Co-authored-by: Alex Eagle <alex@aspect.dev> Co-authored-by: Greg Magolan <gmagolan@gmail.com>
1 parent 1be5424 commit 4109b3c

File tree

7 files changed

+376
-349
lines changed

7 files changed

+376
-349
lines changed

.github/workflows/ci.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@ jobs:
4343
run: echo "bazelversion=$(head -n 1 .bazelversion)" >> $GITHUB_OUTPUT
4444
- id: bazel_7
4545
run: echo "bazelversion=7.0.0" >> $GITHUB_OUTPUT
46-
- id: bazel_5
47-
run: echo "bazelversion=5.4.1" >> $GITHUB_OUTPUT
4846
outputs:
49-
# Will look like '["<version from .bazelversion>", "7.0.0", "5.4.1"]'
47+
# Will look like '["<version from .bazelversion>", "7.0.0"]'
5048
bazelversions: ${{ toJSON(steps.*.outputs.bazelversion) }}
5149

5250
matrix-prep-os:

docs/BUILD.bazel

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# These loads are in the docs/ package rather than anything users depend on
2-
# so that the dependency on stardoc doesn't leak to them.
31
load("//lib:docs.bzl", "stardoc_with_diff_test", "update_docs")
42

53
stardoc_with_diff_test(

lib/BUILD.bazel

+46-49
Original file line numberDiff line numberDiff line change
@@ -83,29 +83,19 @@ toolchain_type(
8383
name = "tar_toolchain_type",
8484
)
8585

86-
bzl_library(
87-
name = "docs",
88-
srcs = ["docs.bzl"],
89-
deps = ["//lib/private/docs"],
90-
)
91-
9286
bzl_library(
9387
name = "expand_make_vars",
9488
srcs = ["expand_make_vars.bzl"],
9589
deps = [
9690
":expand_template",
97-
"//lib/private/docs:expand_locations",
98-
"//lib/private/docs:expand_variables",
9991
],
10092
)
10193

10294
bzl_library(
10395
name = "expand_template",
10496
srcs = ["expand_template.bzl"],
10597
deps = [
106-
"//lib/private/docs:expand_locations",
107-
"//lib/private/docs:expand_template",
108-
"//lib/private/docs:expand_variables",
98+
"//lib/private:expand_template",
10999
"@bazel_skylib//lib:types",
110100
"@bazel_skylib//rules:write_file",
111101
],
@@ -114,64 +104,71 @@ bzl_library(
114104
bzl_library(
115105
name = "params_file",
116106
srcs = ["params_file.bzl"],
117-
deps = ["//lib/private/docs:params_file"],
107+
deps = ["//lib/private:params_file"],
118108
)
119109

120110
bzl_library(
121111
name = "paths",
122112
srcs = ["paths.bzl"],
123-
deps = ["//lib/private/docs:paths"],
113+
deps = ["//lib/private:paths"],
124114
)
125115

126116
bzl_library(
127117
name = "utils",
128118
srcs = ["utils.bzl"],
129-
deps = ["//lib/private/docs:utils"],
119+
deps = ["//lib/private:utils"],
130120
)
131121

132122
bzl_library(
133123
name = "jq",
134124
srcs = ["jq.bzl"],
135125
visibility = ["//visibility:public"],
136126
deps = [
137-
"//lib/private/docs:jq",
127+
"//lib/private:jq",
138128
],
139129
)
140130

141131
bzl_library(
142132
name = "directory_path",
143133
srcs = ["directory_path.bzl"],
144-
deps = ["//lib/private/docs:directory_path"],
134+
deps = ["//lib/private:directory_path"],
145135
)
146136

147137
bzl_library(
148138
name = "output_files",
149139
srcs = ["output_files.bzl"],
150-
deps = ["//lib/private/docs:output_files"],
140+
deps = ["//lib/private:output_files"],
151141
)
152142

153143
bzl_library(
154144
name = "copy_file",
155145
srcs = ["copy_file.bzl"],
156-
deps = ["//lib/private/docs:copy_file"],
146+
deps = ["//lib/private:copy_file"],
157147
)
158148

159149
bzl_library(
160150
name = "copy_directory",
161151
srcs = ["copy_directory.bzl"],
162-
deps = ["//lib/private/docs:copy_directory"],
152+
deps = ["//lib/private:copy_directory"],
163153
)
164154

165155
bzl_library(
166156
name = "copy_to_directory",
167157
srcs = ["copy_to_directory.bzl"],
168-
deps = ["//lib/private/docs:copy_to_directory"],
158+
deps = ["//lib/private:copy_to_directory"],
169159
)
170160

171161
bzl_library(
172162
name = "copy_to_bin",
173163
srcs = ["copy_to_bin.bzl"],
174-
deps = ["//lib/private/docs:copy_to_bin"],
164+
deps = ["//lib/private:copy_to_bin"],
165+
)
166+
167+
#keep
168+
bzl_library(
169+
name = "diff_test",
170+
srcs = ["diff_test.bzl"],
171+
deps = ["//lib/private:diff_test"],
175172
)
176173

177174
bzl_library(
@@ -180,57 +177,51 @@ bzl_library(
180177
deps = [
181178
":diff_test",
182179
":utils",
183-
"//lib/private/docs:fail_with_message_test",
184-
"//lib/private/docs:write_source_file",
180+
# "//lib/private:fail_with_message_test",
181+
"//lib/private:write_source_file",
185182
],
186183
)
187184

188-
bzl_library(
189-
name = "diff_test",
190-
srcs = ["diff_test.bzl"],
191-
deps = ["//lib/private/docs:diff_test"],
192-
)
193-
194185
bzl_library(
195186
name = "run_binary",
196187
srcs = ["run_binary.bzl"],
197-
deps = ["//lib/private/docs:run_binary"],
188+
deps = ["//lib/private:run_binary"],
198189
)
199190

200191
bzl_library(
201192
name = "repo_utils",
202193
srcs = ["repo_utils.bzl"],
203194
deps = [
204-
"//lib/private/docs:patch",
205-
"//lib/private/docs:repo_utils",
195+
"//lib/private:patch",
196+
"//lib/private:repo_utils",
206197
],
207198
)
208199

209200
bzl_library(
210201
name = "yq",
211202
srcs = ["yq.bzl"],
212-
deps = ["//lib/private/docs:yq"],
203+
deps = ["//lib/private:yq"],
213204
)
214205

215206
bzl_library(
216207
name = "glob_match",
217208
srcs = ["glob_match.bzl"],
218-
deps = ["//lib/private/docs:glob_match"],
209+
deps = ["//lib/private:glob_match"],
219210
)
220211

221212
bzl_library(
222213
name = "host_repo",
223214
srcs = ["host_repo.bzl"],
224215
deps = [
225-
"//lib/private/docs:host_repo",
216+
"//lib/private:host_repo",
226217
"@bazel_skylib//lib:versions",
227218
],
228219
)
229220

230221
bzl_library(
231222
name = "stamping",
232223
srcs = ["stamping.bzl"],
233-
deps = ["//lib/private/docs:stamping"],
224+
deps = ["//lib/private:stamping"],
234225
)
235226

236227
bzl_library(
@@ -257,15 +248,15 @@ bzl_library(
257248
srcs = ["repositories.bzl"],
258249
deps = [
259250
":utils",
260-
"//lib/private/docs:copy_directory_toolchain",
261-
"//lib/private/docs:copy_to_directory_toolchain",
262-
"//lib/private/docs:coreutils_toolchain",
263-
"//lib/private/docs:expand_template_toolchain",
264-
"//lib/private/docs:jq_toolchain",
265-
"//lib/private/docs:local_config_platform",
266-
"//lib/private/docs:source_toolchains_repo",
267-
"//lib/private/docs:tar_toolchain",
268-
"//lib/private/docs:yq_toolchain",
251+
"//lib/private:copy_directory_toolchain",
252+
"//lib/private:copy_to_directory_toolchain",
253+
"//lib/private:coreutils_toolchain",
254+
"//lib/private:expand_template_toolchain",
255+
"//lib/private:jq_toolchain",
256+
"//lib/private:local_config_platform",
257+
"//lib/private:source_toolchains_repo",
258+
"//lib/private:tar_toolchain",
259+
"//lib/private:yq_toolchain",
269260
],
270261
)
271262

@@ -280,13 +271,13 @@ bzl_library(
280271
bzl_library(
281272
name = "platform_utils",
282273
srcs = ["platform_utils.bzl"],
283-
deps = ["//lib/private/docs:platform_utils"],
274+
deps = ["//lib/private:platform_utils"],
284275
)
285276

286277
bzl_library(
287278
name = "base64",
288279
srcs = ["base64.bzl"],
289-
deps = ["//lib/private/docs:base64"],
280+
deps = ["//lib/private:base64"],
290281
)
291282

292283
bzl_library(
@@ -298,13 +289,19 @@ bzl_library(
298289
bzl_library(
299290
name = "strings",
300291
srcs = ["strings.bzl"],
301-
deps = ["//lib/private/docs:strings"],
292+
deps = ["//lib/private:strings"],
302293
)
303294

304295
bzl_library(
305296
name = "lists",
306297
srcs = ["lists.bzl"],
307-
deps = ["//lib/private/docs:lists"],
298+
deps = ["//lib/private:lists"],
299+
)
300+
301+
bzl_library(
302+
name = "docs",
303+
srcs = ["docs.bzl"],
304+
deps = ["//lib/private:docs"],
308305
)
309306

310307
bzl_library(

0 commit comments

Comments
 (0)