Skip to content

Documentation issue: General Rules and other pages lack "load" statements #16001

@reddaly

Description

@reddaly

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

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)good first issuehelp wantedSomeone outside the Bazel team could own thisteam-DocumentationDocumentation improvements that cannot be directly linked to other team labelsteam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: documentation (cleanup)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions