google / re2

RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.
BSD 3-Clause "New" or "Revised" License
8.88k stars 1.12k forks source link

Error loading '@pybind11_bazel~2.11.1.bzl.2//:python_configure.bzl' in re2 2024-02-01 #478

Closed lalten closed 6 months ago

lalten commented 6 months ago

Upgrading to pybind_bazel 2.11.1.bzl.2 in a root repo causes errors in re2 2024-02-01 because of https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/re2/2024-02-01/MODULE.bazel#L25: ERROR: Error loading '@pybind11_bazel~2.11.1.bzl.2//:python_configure.bzl' for module extensions, requested by https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/modules/re2/2023-09-01/MODULE.bazel:22:33: cannot load '@pybind11_bazel~2.11.1.bzl.2//:python_configure.bzl': no such file: cannot load '@pybind11_bazel~2.11.1.bzl.2//:python_configure.bzl': no such file. Type 'bazel help mod' for syntax and help.

I see this is already fixed with https://github.com/google/re2/commit/2aa303b697ee0511cc3095b93877631fe26ca43c -- would it be possible to make a new 2024-03-01 release to BCR?

lalten commented 6 months ago

Since the 2.11.1.bzl.2 seems to be a breaking change over 2.11.1.bzl.1 it might have been good to increase the compatibility_level in https://github.com/pybind/pybind11_bazel/commit/5afa2e202fcb916bedf18e5140a1c715bfdfb21e

junyer commented 6 months ago

I could very well be wrong here, but I don't think bumping compatibility_level would have helped to avoid breakage. From the documentation:

Modules with different compatibility levels participate in version resolution as if they're modules with different names, but the final dependency graph cannot contain multiple modules with the same name but different compatibility levels (unless multiple_version_override is in effect).

That aside, yes, the 2024-03-01 release should be tagged ~24h from now and hopefully merged into BCR shortly thereafter.

junyer commented 6 months ago

2024-03-01 is available via BCR as of a couple of minutes ago. :)

lalten commented 6 months ago

2024-03-01 is available via BCR as of a couple of minutes ago. :)

Haha ahead of time because of a leap year bug?

junyer commented 6 months ago

It's already Friday here in Australia. ;)