Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.2.0] Add a new include() directive to MODULE.bazel files #22204

Merged
merged 2 commits into from
May 1, 2024

Commits on Apr 30, 2024

  1. Add a new include() directive to MODULE.bazel files

    This new directive allows the root module to divide its `MODULE.bazel` into multiple segments. This directive can only be used by root modules; only files in the main repo may be included; variable bindings are only visible in the file they occur in, not in any included or including files. See the docs for `include()` (in `ModuleFileGlobals.java`) for more details.
    
    In follow-ups, we'll need to address:
    1. Enforcing the loaded files to have some sort of naming format (tentatively `foo.MODULE.bazel` where `foo` is anything)
    2. Making `bazel mod tidy` work with included files
    
    RELNOTES: Added a new `include()` directive to `MODULE.bazel` files.
    
    Fixes #17880.
    
    Closes #21855.
    
    PiperOrigin-RevId: 627034184
    Change-Id: Ifc2f616cf0791445daeeac9ca5ec4478e83382aa
    Wyverald committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    d251cc3 View commit details
    Browse the repository at this point in the history
  2. Enforce file name format for MODULE.bazel includes

    They must end in `.MODULE.bazel`.
    
    Follow-up for #17880
    
    Closes #22075.
    
    PiperOrigin-RevId: 627136756
    Change-Id: If9b1797f2e7ddc1aebd929646329e832288bfd8a
    Wyverald committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    1766473 View commit details
    Browse the repository at this point in the history