Skip to content

[Bazel] Migrate to Bzlmod and Bazel 8.#5454

Merged
smolkaj merged 1 commit into
p4lang:mainfrom
4ward-p4:bzlmod
Dec 24, 2025
Merged

[Bazel] Migrate to Bzlmod and Bazel 8.#5454
smolkaj merged 1 commit into
p4lang:mainfrom
4ward-p4:bzlmod

Conversation

@smolkaj

@smolkaj smolkaj commented Dec 20, 2025

Copy link
Copy Markdown
Member

Fixes #5065 and fixes #5066.

NOTE: This PR touches only Bazel files (*.bzl, *.bazel, bazel/**).

This currently requires one temporary ugliness since P4Runtime has not yet been added to the Bazel Central Registry (p4lang/p4runtime#572).

Acknowledgements: Google Antigravity/Gemini 3 did most of the heavy lifting on this PR. I reviewed, refined some details, and provided guidance.

@fruffy fruffy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust the LLM on this :)

Comment thread BUILD.bazel Outdated
@fruffy fruffy added the infrastructure Topics related to code style and build and test infrastructure. label Dec 23, 2025
Fixes p4lang#5065 and fixes p4lang#5066.

Signed-off-by: smolkaj <smolkaj@google.com>
@smolkaj smolkaj enabled auto-merge December 24, 2025 02:24
@smolkaj smolkaj added this pull request to the merge queue Dec 24, 2025
Merged via the queue into p4lang:main with commit e9629f4 Dec 24, 2025
19 checks passed
@smolkaj smolkaj deleted the bzlmod branch December 24, 2025 04:54
smolkaj added a commit to smolkaj/bazel-central-registry that referenced this pull request Mar 2, 2026
p4c (https://github.com/p4lang/p4c) is the P4_16 reference compiler.
This is the first submission of p4c to the BCR, made possible by the
Bzlmod migration in v1.2.5.11 (p4lang/p4c#5454, p4lang/p4c#5497).

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit to smolkaj/bazel-central-registry that referenced this pull request Mar 2, 2026
p4c (https://github.com/p4lang/p4c) is the P4_16 reference compiler.
This is the first submission of p4c to the BCR, made possible by the
Bzlmod migration in v1.2.5.11 (p4lang/p4c#5454, p4lang/p4c#5497).

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit to smolkaj/bazel-central-registry that referenced this pull request Mar 2, 2026
p4c (https://github.com/p4lang/p4c) is the P4_16 reference compiler.
This is the first submission of p4c to the BCR, made possible by the
Bzlmod migration in v1.2.5.11 (p4lang/p4c#5454, p4lang/p4c#5497).

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit to smolkaj/bazel-central-registry that referenced this pull request Mar 2, 2026
p4c (https://github.com/p4lang/p4c) is the P4_16 reference compiler.
This is the first submission of p4c to the BCR, made possible by the
Bzlmod migration in v1.2.5.11 (p4lang/p4c#5454, p4lang/p4c#5497).

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit to smolkaj/bazel-central-registry that referenced this pull request Mar 2, 2026
p4c (https://github.com/p4lang/p4c) is the P4_16 reference compiler.
This is the first submission of p4c to the BCR, made possible by the
Bzlmod migration in v1.2.5.11 (p4lang/p4c#5454, p4lang/p4c#5497).

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit to smolkaj/bazel-central-registry that referenced this pull request Mar 3, 2026
p4c (https://github.com/p4lang/p4c) is the P4_16 reference compiler.
This is the first submission of p4c to the BCR, made possible by the
Bzlmod migration in v1.2.5.11 (p4lang/p4c#5454, p4lang/p4c#5497).

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
smolkaj added a commit to smolkaj/bazel-central-registry that referenced this pull request Mar 3, 2026
p4c (https://github.com/p4lang/p4c) is the P4_16 reference compiler.
This is the first submission of p4c to the BCR, made possible by the
Bzlmod migration in v1.2.5.11 (p4lang/p4c#5454, p4lang/p4c#5497).

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
keith pushed a commit to bazelbuild/bazel-central-registry that referenced this pull request Mar 3, 2026
## Description

Adds [p4c](https://github.com/p4lang/p4c) v1.2.5.11 — the P4_16
reference compiler — to the BCR. This is the first p4c submission, made
possible by the Bzlmod migration completed in this release
([p4lang/p4c#5454](p4lang/p4c#5454),
[p4lang/p4c#5497](p4lang/p4c#5497)).

## Module
- **Name:** `p4c`
- **Version:** `1.2.5.11`
- **Source:** https://github.com/p4lang/p4c/releases/tag/v1.2.5.11

## Notes

- The `inja` dependency is not yet in the BCR and is loaded via a module
extension defined in p4c's own `bazel/repositories.bzl`. This is
self-contained and requires no BCR changes.
- The `p4c_ir_extensions` module extension provides an opt-in mechanism
for downstream users to register custom IR extensions; it has no effect
unless explicitly used.
- Presubmit builds `@p4c//...` on Ubuntu 22.04 and 24.04 against Bazel
7.x, 8.x, and 9.x.

## Checklist

- [x] Module added under `modules/p4c/`
- [x] `metadata.json` with homepage, maintainers, and repository
- [x] `source.json` pointing to the release tarball with verified
SHA-256 integrity
- [x] `MODULE.bazel` with correct version
- [x] `presubmit.yml` covering Ubuntu 22.04/24.04 × Bazel 7/8/9

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
ileitch pushed a commit to ileitch/bazel-central-registry that referenced this pull request Apr 7, 2026
## Description

Adds [p4c](https://github.com/p4lang/p4c) v1.2.5.11 — the P4_16
reference compiler — to the BCR. This is the first p4c submission, made
possible by the Bzlmod migration completed in this release
([p4lang/p4c#5454](p4lang/p4c#5454),
[p4lang/p4c#5497](p4lang/p4c#5497)).

## Module
- **Name:** `p4c`
- **Version:** `1.2.5.11`
- **Source:** https://github.com/p4lang/p4c/releases/tag/v1.2.5.11

## Notes

- The `inja` dependency is not yet in the BCR and is loaded via a module
extension defined in p4c's own `bazel/repositories.bzl`. This is
self-contained and requires no BCR changes.
- The `p4c_ir_extensions` module extension provides an opt-in mechanism
for downstream users to register custom IR extensions; it has no effect
unless explicitly used.
- Presubmit builds `@p4c//...` on Ubuntu 22.04 and 24.04 against Bazel
7.x, 8.x, and 9.x.

## Checklist

- [x] Module added under `modules/p4c/`
- [x] `metadata.json` with homepage, maintainers, and repository
- [x] `source.json` pointing to the release tarball with verified
SHA-256 integrity
- [x] `MODULE.bazel` with correct version
- [x] `presubmit.yml` covering Ubuntu 22.04/24.04 × Bazel 7/8/9

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Topics related to code style and build and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Bzlmod Upgrade to Bazel 8

2 participants