Repository navigation
modules: split module extensions out of repos.bzl into extensions.bzl - #10016
Conversation
|
Fixed: rebased onto current origin/main (one conflict in ruby/toolchain/repos.bzl: main's rubyinstaller_archive.patch carried into ruby/toolchain/extensions.bzl); MODULE.bazel.lock re-resolved with bazel mod deps --lockfile_mode=update, no drift from the committed lock. Passes: //tools/ci:repos_bzl_test. //modules:families_test still has 3 failures, none from lines this PR touches: stale families.json entries (gazelle/, swift_format_macos, ruby, cpan, composer), perl/php tests/bench missing from STARLARK_DOCS_PACKAGES, and families//third_party/rules_dx missing main's rules_dart.external_pkgsrcs.patch. The generate-check failures in proto_bindings, javascript/rules (framework_jest_config) and cpp_rust/apps (consumer_choice_test) are in packages this PR does not change. Not verified against a separate main build. Nested-Bazel and consumer tests were not run. 🤖 Generated with Claude Code |
dd90504 to
25c1e28
Compare
|
Review: changes requested
The behavior of the moved code looks unchanged. The moves are verbatim, and the pins and AGENTS.md style: no new rationale comments. 🤖 Generated with Claude Code |
25c1e28 to
5cd9500
Compare
|
Fixed: (1) breaking public load paths are intended with no shims since nothing is released; (2) every family lock regenerated with Not verified: 🤖 Generated with Claude Code |
|
Review: approve Checked at 5cd9500 against #9870:
No must-fix items. Optional follow-up: Not verified here: I did not build or run any tests. The PR's reported 🤖 Generated with Claude Code |
…closes #9870) Move every module_extension out of repos.bzl into a sibling extensions.bzl in the same package and relabel the use_extension references in MODULE.bazel, family MODULE.bazel files, modules/families.json, the lock, and the CLI and libs that parse those labels. dart and dotnet keep their extension entry points in pub.bzl and rules_dotnet.bzl so the extension does not load a file from a repo it generates. Add tools/ci repos_bzl_test to fail if any repos.bzl calls module_extension(. Co-Authored-By: Claude Haiku 5.5 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xut2hwESun1HL2eSVd1d5B
…y dart and dotnet repos.bzl Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xut2hwESun1HL2eSVd1d5B
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xut2hwESun1HL2eSVd1d5B
…olchain_type labels (part of #9870) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xut2hwESun1HL2eSVd1d5B
5cd9500 to
3bc7284
Compare
Closes #9870
What changed
module_extensionmoved fromrepos.bzlinto a siblingextensions.bzlin the same package (18 dirs). Helper code stays inrepos.bzl.dart/pub.bzlanddotnet/rules_dotnet.bzlare new entry points. The extensions stay indart/extensions.bzlanddotnet/extensions.bzl, so no extension loads a file from a repo it generates.use_extensionlabels relabeled in rootMODULE.bazel, familyMODULE.bazelfiles,modules/families.json,MODULE.bazel.lock(regenerated withbazel mod deps --lockfile_mode=update), and the Rust code that parses those labels (libs/module_bazel,cli/adopt).tools/cirepos_bzl_testfails if any coveredrepos.bzlcallsmodule_extension(.Verification
repos_bzl_test: passes.bazel build //:dx(with remote cache disabled): passes.//modules:families_test: 3 failures. The relabeled labels match. The remaining reported items are gazelle, perl, php, and google_benchmark entries infamilies.jsonthat my edits did not touch. Not yet verified against HEAD.dx checkgenerate phase: fails inproto_bindings,javascript/rules, andcpp_rust/apps. Those packages are unmodified. Not yet verified against HEAD.Not run / not covered
repos.bzlcheck does not cover 4 nested-modulerepos.bzlfiles (families/msixand others). Bazel rejects them from the root package, so their extensions were moved but are not checked by the test.tools/ci, so theirrepos.bzlfiles are also uncovered.dx check --applywas not used. It regenerates a duplicatepub_depsblock inMODULE.bazelthroughcli/adopt/src/lock_hubs.rs(a literalextension_bindingslabel compare). That is pre-existing and not fixed here.*_consumer_testtargets were not run, per the task constraints.docs/support-matrix.mdwas not regenerated; no diff was needed for this change as far as checked.🤖 Generated with Claude Code