Skip to content

Commit f1db538

Browse files
abishekgiricopybara-github
authored andcommitted
docs: add missing load() statements in examples (#28448)
### What does this PR do? This PR adds missing `load()` statements to documentation examples that reference rules or symbols without showing how they are imported. Several examples currently assume implicit knowledge of where rules are defined, which can be confusing for new users. --- ### What’s included? - Added the appropriate `load()` statements to affected examples - No behavioral or semantic changes to the documented examples - Improves copy-paste usability and clarity --- ### Why is this useful? Without explicit `load()` statements, examples may not work as written and can lead to confusion for users learning Bazel rules and macros. This change makes the documentation more self-contained and accurate. --- ### Verification - Manually reviewed updated examples for correctness and consistency - Confirmed all added `load()` statements match the rules used in each example --- Fixes #16001 Closes #28448. PiperOrigin-RevId: 865520234 Change-Id: I0147ac8fc045fc473a5724cdc3de1ec5eb4acc02
1 parent ad2a52e commit f1db538

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

docs/docs/android-instrumentation-test.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ android_sdk_repository(
232232

233233
# Android Test Support
234234
ATS_COMMIT = "$COMMIT_HASH"
235+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
235236
http_archive(
236237
name = "android_test_support",
237238
strip_prefix = "android-test-%s" % ATS_COMMIT,

docs/docs/configurable-attributes.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,7 @@ You can even have a `bind()` target point to an `alias()`, if needed.
936936
$ cat WORKSPACE
937937
workspace(name = "myapp")
938938
bind(name = "openssl", actual = "//:ssl")
939+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
939940
http_archive(name = "alternative", ...)
940941
http_archive(name = "boringssl", ...)
941942

site/en/docs/android-instrumentation-test.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ android_sdk_repository(
233233

234234
# Android Test Support
235235
ATS_COMMIT = "$COMMIT_HASH"
236+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
236237
http_archive(
237238
name = "android_test_support",
238239
strip_prefix = "android-test-%s" % ATS_COMMIT,

site/en/docs/configurable-attributes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,7 @@ You can even have a `bind()` target point to an `alias()`, if needed.
937937
$ cat WORKSPACE
938938
workspace(name = "myapp")
939939
bind(name = "openssl", actual = "//:ssl")
940+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
940941
http_archive(name = "alternative", ...)
941942
http_archive(name = "boringssl", ...)
942943

0 commit comments

Comments
 (0)