Skip to content

Commit 4875dab

Browse files
maskri17copybara-github
authored andcommitted
Deprecating the regex_functions.cc
PiperOrigin-RevId: 789462999
1 parent e454c2b commit 4875dab

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

extensions/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ cc_test(
173173
],
174174
)
175175

176+
# New users should use ":regex_ext" instead.
176177
cc_library(
177178
name = "regex_functions",
178179
srcs = ["regex_functions.cc"],
@@ -189,6 +190,7 @@ cc_library(
189190
"//runtime:function_adapter",
190191
"//runtime:function_registry",
191192
"//runtime:runtime_options",
193+
"@com_google_absl//absl/base:core_headers",
192194
"@com_google_absl//absl/base:no_destructor",
193195
"@com_google_absl//absl/base:nullability",
194196
"@com_google_absl//absl/status",

extensions/regex_functions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#ifndef THIRD_PARTY_CEL_CPP_EXTENSIONS_REGEX_FUNCTIONS_H_
2020
#define THIRD_PARTY_CEL_CPP_EXTENSIONS_REGEX_FUNCTIONS_H_
2121

22+
#include "absl/base/attributes.h"
2223
#include "absl/status/status.h"
2324
#include "absl/strings/string_view.h"
2425
#include "checker/type_checker_builder.h"
@@ -35,6 +36,9 @@ inline constexpr absl::string_view kRegexCaptureN = "re.captureN";
3536

3637
// Register Extract and Capture Functions for RE2
3738
// Requires options.enable_regex to be true
39+
// The canonical regex extensions supported by the CEL team are registered
40+
// via the `RegisterRegexExtensionsFunctions`. This extension is deprecated.
41+
ABSL_DEPRECATED("Use RegisterRegexExtensionsFunctions instead.")
3842
absl::Status RegisterRegexFunctions(
3943
google::api::expr::runtime::CelFunctionRegistry* registry,
4044
const google::api::expr::runtime::InterpreterOptions& options);

0 commit comments

Comments
 (0)