-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)good first issuehelp wantedSomeone outside the Bazel team could own thisSomeone outside the Bazel team could own thisteam-DocumentationDocumentation improvements that cannot be directly linked to other team labelsDocumentation improvements that cannot be directly linked to other team labelsteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websiteIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: documentation (cleanup)
Description
Bazel documentation often lacks the relevant load statements and other information required for usage of rules, macros, functions, etc.
For example, after reading https://docs.bazel.build/versions/main/be/general.html, I placed the following in a .bzl file:
def ts_test(name, **kwargs):
....
test_suite(
name = name,
tests = [
suite_name + ".suite",
],
)I then get an error, name 'test_suite' is not defined. Presumably I need a load statement to use test_suite in a .bzl file. I have to resort to code search to figure out how to properly import test_suite. Actually, nope, I need to add native. before test_suite.
Related to this, bazel's error message name 'test_suite' is not defined could provide a hint like, Did you mean "native.test_suite?"
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)good first issuehelp wantedSomeone outside the Bazel team could own thisSomeone outside the Bazel team could own thisteam-DocumentationDocumentation improvements that cannot be directly linked to other team labelsDocumentation improvements that cannot be directly linked to other team labelsteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websiteIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: documentation (cleanup)