Skip to content

api: load visibility for private and internal .bzl files #13180

Closed

Description

@TrapsterDK

198 .bzl files outside private/, tests/, tools/ and third_party/ are loadable by users (e.g. core/quality/*, dx/generate.bzl, config/subject.bzl). Only 20 use visibility().

Add visibility("private") or package-scoped visibility([...]) to every non-public .bzl, plus a guard that fails when a non-public .bzl has none.

Done when: a consumer fixture that loads a private file fails analysis. Size M.

Activity

  1. added
    enhancement
    on Nov 17, 2026
  2. TrapsterDK commented on Nov 18, 2026

    @TrapsterDK
    CollaboratorAuthor

    PR #13287 is ready for review. CI: run 44214611491 (buf_breaking_analysis + bzl_visibility_test) passed; run 44211964076 passed the consumer fixture (nested_bazel_harness_test). Remaining: run 44214607727 (build //..., linux_x86_64) was cancelled with no failed step; re-run evidence.yml task=build //... before merging. Needs review (core/ paths).

  3. added 2 commits that reference this issue on Nov 18, 2026
    af7824f
    8f29b74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions