Skip to content

Commit 26d2323

Browse files
committed
Update dependencies: absl, protobuf, cel_cpp, re2
This updates: - absl from 20240722.0 to 20260107.0 - protobuf from 29.2 to 32.1 - cel_cpp from 0.11.0 to 0.14.0 - re2 from 2024-04-01 to 2025-11-05 The default standalone CMake C++ version is downgraded to C++17, with C++20 only being used for targets that actually need it. This is due to a bug in protobuf v30+ on MSVC: protocolbuffers/protobuf#21310 It doesn't have any impact in any other situation, and doesn't change anything when protovalidate-cc is used as a subproject. It does enable using protovalidate-cc as a subproject in an otherwise C++-17 project. The cel-cpp patch is reduced, since a lot of my previous patches were upstreamed since the last release. I still don't have a proper solution to the constinit problem, so that's still there. The re2 patch is removed. Google finally actually did resolve the problem with not having an option to control the re2 install targets with CMake. Coincidentally, it uses the same variable name I already used, so no adjustments are needed. All of these dependencies pretty much need to be updated together. They're updated to the latest available versions with the exception of protobuf, since v33 seems to fail to compile for reasons I have not figured out yet. It can't be held behind since v29 can't compile with a newer version of absl, but cel_cpp requires a newer version of absl. re2 has to be updated for the same reason.
1 parent 7231275 commit 26d2323

8 files changed

Lines changed: 43 additions & 354 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
1717
option(PROTOVALIDATE_CC_ENABLE_CONFORMANCE "Build conformance runner" OFF)
1818
else()
1919
# Only set C++ standard when not being embedded
20-
set(CMAKE_CXX_STANDARD 20)
20+
set(CMAKE_CXX_STANDARD 17)
2121
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2222

2323
# Standalone: set appropriate defaults for system-wide installation
@@ -73,7 +73,7 @@ set(PROTOVALIDATE_CC_TEST_SOURCES
7373
list(FILTER PROTOVALIDATE_CC_TEST_SOURCES INCLUDE REGEX ".*_test\\.cc$")
7474
list(FILTER PROTOVALIDATE_CC_CORE_SOURCES EXCLUDE REGEX ".*_test\\.cc$")
7575
add_library(protovalidate_cc ${PROTOVALIDATE_CC_CORE_SOURCES} ${PROTOVALIDATE_CC_CORE_HEADERS})
76-
target_compile_features(protovalidate_cc PUBLIC cxx_std_17)
76+
target_compile_features(protovalidate_cc PUBLIC cxx_std_20)
7777
target_link_libraries(protovalidate_cc PUBLIC ${PROTOVALIDATE_LIBS})
7878
target_include_directories(protovalidate_cc PUBLIC
7979
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

MODULE.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ module(
1919
version = "0.0.0",
2020
)
2121

22-
bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2")
22+
bazel_dep(name = "re2", version = "2025-11-05.bcr.1", repo_name = "com_googlesource_code_re2")
2323

24-
bazel_dep(name = "protobuf", version = "29.2", repo_name = "com_google_protobuf")
24+
bazel_dep(name = "protobuf", version = "32.1", repo_name = "com_google_protobuf")
2525

2626
bazel_dep(name = "rules_proto", version = "7.1.0")
2727

2828
bazel_dep(name = "rules_buf", version = "0.3.0")
2929

3030
bazel_dep(name = "googletest", version = "1.16.0.bcr.1", repo_name = "com_google_googletest")
3131

32-
bazel_dep(name = "abseil-cpp", version = "20240722.0", repo_name = "com_google_absl")
32+
bazel_dep(name = "abseil-cpp", version = "20260107.0", repo_name = "com_google_absl")
3333

34-
bazel_dep(name = "cel-cpp", version = "0.11.0", repo_name = "com_google_cel_cpp")
34+
bazel_dep(name = "cel-cpp", version = "0.14.0", repo_name = "com_google_cel_cpp")
3535

3636
bazel_dep(name = "protovalidate", version = "1.0.0", repo_name = "com_github_bufbuild_protovalidate")

MODULE.bazel.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module(
1919
version = "0.0.0",
2020
)
2121

22-
bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2")
22+
bazel_dep(name = "re2", version = "2025-11-05.bcr.1", repo_name = "com_googlesource_code_re2")
2323

2424
bazel_dep(name = "protobuf", version = "{{protobuf.meta.version}}", repo_name = "com_google_protobuf")
2525

cmake/Deps.cmake

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,11 @@ else()
218218
message(FATAL_ERROR "protovalidate-cc: Installation can not be enabled when using vendored re2. Install re2 system-wide, or disable installation using -DPROTOVALIDATE_CC_ENABLE_INSTALL=OFF.")
219219
endif()
220220
message(STATUS "protovalidate-cc: Fetching re2")
221-
set(RE2_PATCHES
222-
${CMAKE_CURRENT_SOURCE_DIR}/deps/patches/re2/0001-Add-RE2_INSTALL-option.patch
223-
)
224-
MakePatchCommand(RE2_PATCH_COMMAND "${RE2_PATCHES}")
225221
FetchContent_Declare(
226222
re2
227223
GIT_REPOSITORY "https://github.com/google/re2.git"
228-
GIT_TAG "2024-04-01"
224+
GIT_TAG "2025-11-05"
229225
GIT_SHALLOW TRUE
230-
PATCH_COMMAND ${RE2_PATCH_COMMAND}
231226
)
232227
set(RE2_INSTALL OFF)
233228
FetchContent_MakeAvailable(re2)
@@ -284,7 +279,7 @@ FetchContent_Declare(cel_cpp
284279
URL_HASH SHA256=${PROTOVALIDATE_CC_CEL_CPP_SHA256}
285280
PATCH_COMMAND ${CEL_CPP_PATCH_COMMAND}
286281

287-
# THis stops MakeAvailable from trying to add_subdirectory, so we can do it
282+
# This stops MakeAvailable from trying to add_subdirectory, so we can do it
288283
# ourselves after adding the embedded CMakeLists.txt.
289284
SOURCE_SUBDIR nonexistant
290285
)
@@ -299,7 +294,7 @@ file(COPY_FILE
299294
)
300295
message(STATUS "Added ${cel_cpp_SOURCE_DIR}/CMakeLists.txt")
301296
add_subdirectory(${cel_cpp_SOURCE_DIR} ${cel_cpp_BINARY_DIR})
302-
list(APPEND PROTOVALIDATE_CC_EXPORT_TARGETS
297+
list(APPEND PROTOVALIDATE_CC_EXPORT_TARGETS
303298
cel_cpp
304299
cel_cpp_parser
305300
cel_cpp_minimal_descriptor_set

cmake/cel-cpp/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ target_include_directories(cel_cpp PUBLIC
288288
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
289289
$<INSTALL_INTERFACE:include>
290290
)
291+
target_compile_features(cel_cpp PUBLIC cxx_std_20)
291292
target_compile_definitions(cel_cpp PRIVATE ANTLR4CPP_USING_ABSEIL)
292293
add_library(cel_cpp::cel_cpp ALIAS cel_cpp)
293294

0 commit comments

Comments
 (0)