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

Upgrade to Bzlmod #5066

Open
smolkaj opened this issue Dec 13, 2024 · 3 comments
Open

Upgrade to Bzlmod #5066

smolkaj opened this issue Dec 13, 2024 · 3 comments
Labels
enhancement This topic discusses an improvement to existing compiler code. infrastructure Topics related to code style and build and test infrastructure.

Comments

@smolkaj
Copy link
Member

smolkaj commented Dec 13, 2024

Bazel finally added a external dependency management system, called "Bzlmod", a while back: https://bazel.build/external/overview
By now, Bzlmod is mature and the old system (WORKSPACE.bazel files) have been deprecated as of Bazel 8 and will be removed in Bazel 9: https://bazel.build/external/migration

It is time to migrate to future proof our code base. This issue is tracking that effort.

There is a related issue that tracks upgrading to Bazel 8: #5065

I created the same issue for p4runtime and p4-constraints:

@fruffy fruffy added enhancement This topic discusses an improvement to existing compiler code. infrastructure Topics related to code style and build and test infrastructure. labels Dec 13, 2024
@fruffy
Copy link
Collaborator

fruffy commented Dec 15, 2024

Could this help resolve some diamond dependency problems we have? (e.g., p4runtime vs p4-constraints vs p4c dependency conflicts)

Or fix #4640 where we can not export some feature flags?

@smolkaj
Copy link
Member Author

smolkaj commented Dec 16, 2024

Could this help resolve some diamond dependency problems we have? (e.g., p4runtime vs p4-constraints vs p4c dependency conflicts)

Yes, in the sense that it will make sure that exactly one version of each common dependency will be picked.
Though that should already be true for the legacy dependency definition scheme (using WORKSPACE and *_deps.bzl files) we use today. Just in a much more adhoc fashion.

Or fix #4640 where we can not export some feature flags?

Not that I know off, no.
I took a quick look at the issue to remind myself, but could not quite figure out what we're trying to achieve, and especially why. If this is still an important issue, I'd be open to discussing this via GVC more in depth some time.

@fruffy
Copy link
Collaborator

fruffy commented Dec 16, 2024

The issue is effectively: abseil/abseil-cpp#740

We are working around it by setting some options in CMake, but it would be nice to be consistent. Abseil is the only third-party system dependency in the compiler that requires quote includes.

katre added a commit to katre/p4c that referenced this issue Dec 17, 2024
This specifically enables the legacy WORKSPACE-based resolution, and
disables the new bzlmod-based resolution.

Related to p4lang#5065 and p4lang#5066.
katre added a commit to katre/p4c that referenced this issue Dec 17, 2024
This specifically enables the legacy WORKSPACE-based resolution, and
disables the new bzlmod-based resolution.

Related to p4lang#5065 and p4lang#5066.

Signed-off-by: John Cater <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Dec 17, 2024
This specifically enables the legacy WORKSPACE-based resolution, and
disables the new bzlmod-based resolution.

Related to #5065 and #5066.

---------

Signed-off-by: John Cater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This topic discusses an improvement to existing compiler code. infrastructure Topics related to code style and build and test infrastructure.
Projects
None yet
Development

No branches or pull requests

2 participants