Skip to content

Migrate to Bzlmod#2

Draft
google-labs-jules[bot] wants to merge 1 commit intomasterfrom
migrate-bzlmod-inja-9659692541305597320
Draft

Migrate to Bzlmod#2
google-labs-jules[bot] wants to merge 1 commit intomasterfrom
migrate-bzlmod-inja-9659692541305597320

Conversation

@google-labs-jules
Copy link
Copy Markdown

Migrates the entire repository to use Bzlmod for dependency management. This includes creating a MODULE.bazel file, defining module extensions for custom repositories (like Inja), and overriding dependencies that are not yet fully Bzlmod-compatible (like P4Runtime and Rules Bison/Flex). The legacy WORKSPACE file is disabled. Additionally, bazel/bison.bzl and bazel/flex.bzl have been updated to utilize hermetic toolchains from rules_bison and rules_flex. Note: The build currently fails with a Clang 18 segmentation fault on Boost/Abseil compilation in this environment, but the dependency graph resolution is verified.


PR created automatically by Jules for task 9659692541305597320 started by @smolkaj

- Disable WORKSPACE.bazel (renamed to WORKSPACE.bazel.disabled).
- Create MODULE.bazel with all dependencies:
  - Inja (via module extension in repositories.bzl).
  - Z3 (from BCR, version 4.15.2).
  - Boost (via http_archive with local BUILD files derived from rules_boost e1854fb, due to BCR module issues).
  - P4Runtime (via bazel_dep + archive_override + patch to add MODULE.bazel).
  - Rules Bison/Flex/M4 (via git_override).
  - Standard deps: rules_cc, rules_proto, grpc, protobuf, abseil-cpp, googletest, rules_python, rules_foreign_cc, bazel_skylib, platforms, rules_license.
- Update .bazelrc to enable Bzlmod and disable workspace.
- Refactor `bazel/bison.bzl` and `bazel/flex.bzl` to use `rules_bison` and `rules_flex` toolchains instead of invoking system binaries.
- Update `backends/p4tools/BUILD.bazel` to use `@com_github_z3prover_z3//:z3`.
- Add local BUILD files for Boost and dependencies in `bazel/boost/`.
- Add `bazel/p4runtime.patch`.
@google-labs-jules
Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants