RE2 will take a dependency on Abseil

116 views
Skip to first unread message

Paul Wankadia

unread,
Apr 14, 2023, 12:30:43 PM4/14/23
to re2...@googlegroups.com
Hi, everyone.

Back in early 2018, I created the abseil branch of RE2. For the past five years, I have maintained the master main and abseil branches in lockstep so that existing users and package maintainers could continue to use and package RE2 without a dependency on Abseil. That's coming to an end.

What's changed? Abseil is now used and packaged pretty widely: Debian/Ubuntu, Fedora, Gentoo, Homebrew, vcpkg et cetera all support it; RE2 could take a dependency on it without unreasonable contortion or effort on anyone's part. Also, the existence of RE2 without and with a dependency on it is now confusing and disruptive: projects have already found themselves in the position of having to reconcile the diamond dependency; I want to solve that problem before it becomes much worse.

Therefore, RE2 will take a dependency on Abseil. I plan to continue supporting GNU make, CMake and Bazel across Linux, macOS and Windows. I also plan to leave re2::StringPiece as an alias for absl::string_view until whenever RE2 can require C++17 and move to std::string_view.

For those who don't know, RE2 is my "20% project", so things get done in my copious spare time... and thus I can't say for sure how long it will take for the changes to land and the dust to settle. Still, if you are a package maintainer and you would like to get some testing done before I tag a release in the coming weeks/months, please let me know so that we can coordinate our timing accordingly.

Thanks!

Paul Wankadia

unread,
May 19, 2023, 8:50:43 AM5/19/23
to re2...@googlegroups.com
I hit a snag or two, but the core work is essentially done now and I expect to tag the 2023-06-01 release. If you are a package maintainer, please try to get some testing done within the next two weeks just in case there are wrinkles or even showstoppers.

A couple of notes:

1. Your compiler must support C++14. (Visual Studio users: You need Visual Studio 2019 or later.)

2. For CMake, the RE2_BUILD_TESTING option now defaults to OFF. In hindsight, it should always have been that way.

3. Building the testing for RE2 requires GoogleTest (https://github.com/google/googletest) and Benchmark (https://github.com/google/benchmark) to be installed on your system. As per the now-green CI workflows, supporting GNU make, CMake and Bazel across Linux, macOS (via Homebrew) and Windows (via vcpkg) was achievable with only minor hair loss.

The abseil branch will linger a little longer yet, FWIW, but it will go away later this year. :)

Reply all
Reply to author
Forward
0 new messages