diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch deleted file mode 100644 index 71ebb3f83b0aa..0000000000000 --- a/bazel/cel-cpp.patch +++ /dev/null @@ -1,217 +0,0 @@ -diff --git a/base/attribute.h b/base/attribute.h -index 9462c180..d6dcce83 100644 ---- a/base/attribute.h -+++ b/base/attribute.h -@@ -23,6 +23,7 @@ - #include - - #include "absl/status/statusor.h" -+#include "absl/strings/str_cat.h" - #include "absl/strings/string_view.h" - #include "absl/types/optional.h" - #include "absl/types/span.h" -diff --git a/base/memory.h b/base/memory.h -index 3552e19a..0fbe618b 100644 ---- a/base/memory.h -+++ b/base/memory.h -@@ -166,8 +166,8 @@ std::enable_if_t, Handle> HandleFactory::Make( - #if defined(__cpp_lib_is_pointer_interconvertible) && \ - __cpp_lib_is_pointer_interconvertible >= 201907L - // Only available in C++20. -- static_assert(std::is_pointer_interconvertible_base_of_v, -- "F must be pointer interconvertible to Data"); -+// static_assert(std::is_pointer_interconvertible_base_of_v, -+// "F must be pointer interconvertible to Data"); - #endif - if (memory_manager.memory_management() == MemoryManagement::kPooling) { - void* addr; -diff --git a/eval/eval/cel_expression_flat_impl.h b/eval/eval/cel_expression_flat_impl.h -index c2a027e6..801a1463 100644 ---- a/eval/eval/cel_expression_flat_impl.h -+++ b/eval/eval/cel_expression_flat_impl.h -@@ -51,7 +51,7 @@ class CelExpressionFlatImpl : public CelExpression { - CelExpressionFlatImpl(const CelExpressionFlatImpl&) = delete; - CelExpressionFlatImpl& operator=(const CelExpressionFlatImpl&) = delete; - CelExpressionFlatImpl(CelExpressionFlatImpl&&) = default; -- CelExpressionFlatImpl& operator=(CelExpressionFlatImpl&&) = default; -+ CelExpressionFlatImpl& operator=(CelExpressionFlatImpl&&) = delete; - - // Implement CelExpression. - std::unique_ptr InitializeState( -diff --git a/eval/internal/interop.cc b/eval/internal/interop.cc -index 3acde6c3..20f8ea31 100644 ---- a/eval/internal/interop.cc -+++ b/eval/internal/interop.cc -@@ -729,13 +729,14 @@ absl::StatusOr ToLegacyValue(google::protobuf::Arena* arena, - return CelValue::CreateMessageWrapper( - MessageWrapperAccess::Make(message, type_info)); - } -- if (ProtoStructValueToMessageWrapper) { -+ // This weak symbol is never defined in Envoy, and checking it causes linker failures on macOS -+ /*if (ProtoStructValueToMessageWrapper) { - auto maybe_message_wrapper = ProtoStructValueToMessageWrapper(*value); - if (maybe_message_wrapper.has_value()) { - return CelValue::CreateMessageWrapper( - std::move(maybe_message_wrapper).value()); - } -- } -+ }*/ - return absl::UnimplementedError( - "only legacy struct types and values can be used for interop"); - } -diff --git a/eval/public/cel_value.cc b/eval/public/cel_value.cc -index 6aeff6dc..c43864cf 100644 ---- a/eval/public/cel_value.cc -+++ b/eval/public/cel_value.cc -@@ -107,7 +107,7 @@ struct DebugStringVisitor { - - } // namespace - --const absl::string_view kPayloadUrlMissingAttributePath = -+ABSL_CONST_INIT const absl::string_view kPayloadUrlMissingAttributePath = - cel::runtime_internal::kPayloadUrlMissingAttributePath; - - CelValue CelValue::CreateDuration(absl::Duration value) { -diff --git a/eval/public/containers/container_backed_map_impl.h b/eval/public/containers/container_backed_map_impl.h -index 6092eefc..7548bbf4 100644 ---- a/eval/public/containers/container_backed_map_impl.h -+++ b/eval/public/containers/container_backed_map_impl.h -@@ -30,6 +30,7 @@ class CelMapBuilder : public CelMap { - return values_map_.contains(cel_key); - } - -+ using CelMap::ListKeys; - absl::StatusOr ListKeys() const override { - return &key_list_; - } -diff --git a/eval/public/containers/internal_field_backed_map_impl.h b/eval/public/containers/internal_field_backed_map_impl.h -index ec773d9d..caa2f3a5 100644 ---- a/eval/public/containers/internal_field_backed_map_impl.h -+++ b/eval/public/containers/internal_field_backed_map_impl.h -@@ -43,6 +43,7 @@ class FieldBackedMapImpl : public CelMap { - // Presence test function. - absl::StatusOr Has(const CelValue& key) const override; - -+ using CelMap::ListKeys; - absl::StatusOr ListKeys() const override; - - protected: -diff --git a/eval/public/structs/cel_proto_lite_wrap_util.cc b/eval/public/structs/cel_proto_lite_wrap_util.cc -index 4cb21e57..35fdf7fa 100644 ---- a/eval/public/structs/cel_proto_lite_wrap_util.cc -+++ b/eval/public/structs/cel_proto_lite_wrap_util.cc -@@ -172,6 +172,7 @@ class DynamicMap : public CelMap { - - int size() const override { return values_->fields_size(); } - -+ using CelMap::ListKeys; - absl::StatusOr ListKeys() const override { - return &key_list_; - } -diff --git a/eval/public/structs/cel_proto_wrap_util.cc b/eval/public/structs/cel_proto_wrap_util.cc -index fabb5941..86a314c7 100644 ---- a/eval/public/structs/cel_proto_wrap_util.cc -+++ b/eval/public/structs/cel_proto_wrap_util.cc -@@ -137,6 +137,7 @@ class DynamicMap : public CelMap { - - int size() const override { return values_->fields_size(); } - -+ using CelMap::ListKeys; - absl::StatusOr ListKeys() const override { - return &key_list_; - } -diff --git a/extensions/select_optimization.cc b/extensions/select_optimization.cc -index 292bb715..000d5754 100644 ---- a/extensions/select_optimization.cc -+++ b/extensions/select_optimization.cc -@@ -557,7 +557,6 @@ class OptimizedSelectStep : public ExpressionStepBase { - select_path_(std::move(select_path)), - qualifiers_(std::move(qualifiers)), - presence_test_(presence_test), -- enable_wrapper_type_null_unboxing_(enable_wrapper_type_null_unboxing), - options_(options) - - { -@@ -579,7 +578,6 @@ class OptimizedSelectStep : public ExpressionStepBase { - std::vector select_path_; - std::vector qualifiers_; - bool presence_test_; -- bool enable_wrapper_type_null_unboxing_; - SelectOptimizationOptions options_; - }; - -diff --git a/internal/proto_wire.h b/internal/proto_wire.h -index deb7fd97..0a0ccedc 100644 ---- a/internal/proto_wire.h -+++ b/internal/proto_wire.h -@@ -75,7 +75,7 @@ inline constexpr size_t VarintSize(bool x ABSL_ATTRIBUTE_UNUSED) { return 1; } - // Compile-time constant for the size required to encode any value of the - // integral type `T` using varint. - template --inline constexpr size_t kMaxVarintSize = VarintSize(static_cast(~T{0})); -+inline constexpr size_t kMaxVarintSize = VarintSize(static_cast(!T{0})); - - // Enumeration of the protocol buffer wire tags, see - // https://protobuf.dev/programming-guides/encoding/#structure. -diff --git a/internal/strings.cc b/internal/strings.cc -index dc5a1189..24457aba 100644 ---- a/internal/strings.cc -+++ b/internal/strings.cc -@@ -53,12 +53,12 @@ bool CheckForClosingString(absl::string_view source, - if (closing_str.empty()) return true; - - const char* p = source.data(); -- const char* end = source.end(); -+ const char* end = p + source.size(); - - bool is_closed = false; - while (p + closing_str.length() <= end) { - if (*p != '\\') { -- size_t cur_pos = p - source.begin(); -+ size_t cur_pos = p - source.data(); - bool is_closing = - absl::StartsWith(absl::ClippedSubstr(source, cur_pos), closing_str); - if (is_closing && p + closing_str.length() < end) { -@@ -132,7 +132,7 @@ bool UnescapeInternal(absl::string_view source, absl::string_view closing_str, - dest->reserve(source.size()); - - const char* p = source.data(); -- const char* end = source.end(); -+ const char* end = p + source.size(); - const char* last_byte = end - 1; - - while (p < end) { -@@ -446,7 +446,9 @@ std::string EscapeInternal(absl::string_view src, bool escape_all_bytes, - // byte. - dest.reserve(src.size() * 4); - bool last_hex_escape = false; // true if last output char was \xNN. -- for (const char* p = src.begin(); p < src.end(); ++p) { -+ const char* p = src.data(); -+ const char* end = p + src.size(); -+ for (; p < end; ++p) { - unsigned char c = static_cast(*p); - bool is_hex_escape = false; - switch (c) { -@@ -552,7 +554,9 @@ std::string EscapeString(absl::string_view str) { - std::string EscapeBytes(absl::string_view str, bool escape_all_bytes, - char escape_quote_char) { - std::string escaped_bytes; -- for (const char* p = str.begin(); p < str.end(); ++p) { -+ const char* p = str.data(); -+ const char* end = p + str.size(); -+ for (; p < end; ++p) { - unsigned char c = *p; - if (escape_all_bytes || !absl::ascii_isprint(c)) { - escaped_bytes += "\\x"; -diff --git a/tools/flatbuffers_backed_impl.cc b/tools/flatbuffers_backed_impl.cc -index 10c0b1cb..45ba72f1 100644 ---- a/tools/flatbuffers_backed_impl.cc -+++ b/tools/flatbuffers_backed_impl.cc -@@ -130,6 +130,7 @@ class ObjectStringIndexedMapImpl : public CelMap { - return absl::nullopt; - } - -+ using CelMap::ListKeys; - absl::StatusOr ListKeys() const override { return &keys_; } - - private: diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 5cb573770f0ae..3eabd0b2b7ae3 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -489,8 +489,6 @@ def _com_github_facebook_zstd(): def _com_google_cel_cpp(): external_http_archive( "com_google_cel_cpp", - patches = ["@envoy//bazel:cel-cpp.patch"], - patch_args = ["-p1"], ) def _com_github_google_perfetto(): diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index ead4a03e5e4b7..ce451d9ef0ef1 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -1254,8 +1254,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Common Expression Language (CEL) C++ library", project_desc = "Common Expression Language (CEL) C++ library", project_url = "https://opensource.google/projects/cel", - version = "0abd738f9f54388452e6ebb0955eb039f9162b3d", - sha256 = "d163805320a782c5194b7496cdd5e8c9d9604eeffc1e531770cf6b130bc182fd", + version = "b03438ae95cac305d672b56c35472894a09fba19", + sha256 = "0c5778861e427c704e0c07287269d8a490af623284c50b017132e77638c7bdfb", strip_prefix = "cel-cpp-{version}", urls = ["https://github.com/google/cel-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], @@ -1276,7 +1276,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( "envoy.matching.inputs.cel_data_input", "envoy.matching.matchers.cel_matcher", ], - release_date = "2023-12-20", + release_date = "2024-10-22", cpe = "N/A", ), com_github_google_flatbuffers = dict(