Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: google/cel-cpp

v0.13.0

30 Jul 21:03

Choose a tag to compare

What's Changed

Full Changelog: v0.12.0...v0.13.0

v0.12.0

09 Jul 18:50

Choose a tag to compare

Features

  • Added support for subsetting standard library definitions in TypeChecker and Compiler.

Optimizations

  • Value stack was rewritten to reduce value churn cost during evaluation.

Bug Fixes

Type Checking

  • stdlib definitions that didn't match CEL Spec were removed
  • Type inference was updated to correctly handle comprehension results and list(enum)

Runtime

  • Added additional checks for malformed ASTs that could lead to undefined behavior.

Other

  • Misc portability and compiler warning fixes
  • Cleanups / renames

Commit Log

Full Changelog: v0.11.0...v0.12.0

Release v0.11.0

03 Apr 22:26

Choose a tag to compare

Release v0.11.0

Breaking Changes

This release includes significant breaking changes, notably switching the underlying protobuf definitions from google.api.expr to the canonical dev.cel protos. Additionally, the Reserve() method has been removed from MutableRepeatedFieldRef in the reflection utilities.

  • #1019: Breaking change: Use dev.cel (canonical) protos instead of google.api.expr
  • #1112: Breaking change: Remove MutableRepeatedFieldRef::Reserve() in reflection

Core Value System, Memory Management, and Internals Refactoring

A major focus was on refactoring the core value types, memory management, and internal representations. This involved removing the ValueManager, consolidating type providers, overhauling arena and message factory propagation, removing legacy type reflectors and builders, introducing hand-rolled variants for cel::Value, ListValue, MapValue, and StructValue for better performance and control, refining the ByteString implementation, adding ZeroCopyInputStream/OutputStream, devirtualizing cel::Data, finalizing parts of the Value API, and cleaning up legacy value handling. Dispatch tables were added for custom value types to improve extensibility.

  • #1014: Remove dependency on getting list/map value builders from factory/managers
  • #1023: Overhaul propagation of arenas and message factories
  • #1025: Remove TypeFactory from TypeIntrospector
  • #1027: Consolidate type providers into two: one for legacy and one for modern
  • #1028: Remove the usage of type reflectors for optional types
  • #1065: Reject legacy runtime type values with empty typenames when converting to
  • #1076: Improve error messages for Value type casting errors.
  • #1157: Remove references to now unused option use_legacy_container_builders.
  • #1174: Remove usages of native JSON and Any representations
  • #1177: Rename Parsed{List,Map,Struct}Value to Custom{List,Map,Struct}Value
  • #1186: Migrate includes from base/kind.h to common/kind.h
  • #1196: Remove now unused native JSON types
  • #1236: Remove ValueManager& from NewIterator()
  • #1251: Remove ValueManager 1
  • #1254: Remove ValueManager from Activation
  • #1255: Remove ValueManager from TraceableProgram::Trace.
  • #1258: Remove ValueManager
  • #1263: Delete cel::common_internal::DataInterface
  • #1269: Add ZeroCopyInputStream and ZeroCopyOutputStream for BytesValue
  • #1274: Update common_internal::ByteString
  • #1275: Add debug checks for valid duration and timestamp
  • #1280: Add missing common_internal::ByteString::Clone
  • #1281: Migrate from common_internal::SharedByteString to common_internal::ByteString
  • #1295: Do not clear the constant folding arena
  • #1296: Finalize more parts of the Value API
  • #1297: Cleanup Legacy values
  • #1298: Cleanup Legacy values
  • #1299: Cleanup Legacy values
  • #1302: Finalize TypeValue
  • #1303: absl::Cord& -> absl::Nonnull<absl::Cord*>
  • #1306: Drop cel::Value back down to 32 bytes
  • #1307: Devirtualize cel::Data
  • #1308: cel::Value::Clone(Allocator<>) -> cel::Value::Clone(absl::Nonnull<google::protobuf::Arena*>)
  • #1311: Switch from cel::Shared<T> to cel::Owned<T>
  • #1312: Delete Shared and SharedView
  • #1323: Fix handling of invalid values with optional elements/entries/fields
  • #1325: Fix error value handling in create map/struct
  • #1327: Add dispatch table support for CustomStructValue
  • #1334: Add dispatch table support for CustomListValue
  • #1335: Add dispatch table support for OpaqueValue
  • #1340: Add dispatch table support for CustomMapValue
  • #1349: Drop reference counting support from protobuf related values
  • #1350: Remove assignment operators
  • #1352: Implement hand-rolled variant for cel::Value
  • #1354: Implement hand-rolled variant for cel::ListValue
  • #1355: Implement hand-rolled variant for cel::MapValue
  • #1356: Implement hand-rolled variant for cel::StructValue
  • #1364: Remove manual construction workaround from TypeValue
  • #1375: Redo ArenaString
  • #1376: Remove common_internal::ByteStringView
  • #1377: Value::SerializeTo(..., absl::Cord*) -> Value::SerializeTo(..., ZeroCopyOutputStream*)
  • #1382: Lock down custom value interfaces
  • #1400: Check for in-range timestamp and duration values in Value conversion.

Type Checker Enhancements & Fixes

The type checker received several updates, including support for declaring an overall expected expression type, improved type widening logic to align with Go/Java, better handling of function declarations in conformance tests, support for iter_var2 in comprehensions, options for input size limits, filtering of bad line information, improved error reporting for type deduction failures, support for declaring context messages, and integration with an optional protobuf Arena instance. The builder pattern was also refined.

  • #1009: Add support for declaring an overall expected type to the type checker.
  • #1020: Fix forwarding checker options from CreateTypeCheckerBuilder overload.
  • #1031: Update type assignment widening behavior to more closely follow the 'MoreGeneral' check in the Go and Java implementations.
  • #1032: Update conformance to correctly handle applying function declarations from the test file to the TypeCheckerBuilder.
  • #1046: Update type checker to handle iter_var2
  • #1069: Add option to set input expression size limit in type checker.
  • #1072: TypeChecker updates to filter bad line information.
  • #1073: Refactor factory functions for TypeCheckerBuilders.
  • #1074: Make TypeCheckerBuilder class abstract.
  • #1075: Update type checker to fail (return a status) if it fails to deduce the type of subexpression.
  • #1077: Checker support for declaring context messages.
  • #1081: Add support for type checker type deduction conformance tests.
  • #1309: Add an optional protobuf Arena tied to TypeCheckerBuilder instances.

Compiler, Planner & Execution Optimizations

New cel::Compiler interfaces were introduced, along with initial implementations and support for optionals. Performance was improved through specialized implementations for common operators (!_, @not_strictly_false, ==, !=, @in), optimized string/bytes operations (concatenation, startsWith, endsWith, contains), optimized evaluator stack access, memoized enum lookups, reduced temporary allocations in the planner, optimized program builder bookkeeping, and direct visitor calls instead of std::invoke. Fixes were made for slot calculations and error handling in the planner.

  • #1042: Add interfaces and initial implementation for cel::Compiler.
  • [#1057](htt...
Read more

v0.10.0

25 Oct 16:55

Choose a tag to compare

Release covering updates over the last year including recent refactors for the updated Value type and initial implementation of type checker.

Note: Upcoming changes after this release will migrate many references to protobuf Message types to the canonical versions in CEL spec and will likely require client updates.

What's Changed

Read more

Release v0.9.0

24 May 05:18

Choose a tag to compare

Release v0.9.0

This release represents roughly one year plus of refactors aimed at improving performance and removing
protobuf as a core link time dependency of CEL. There are still many more changes in flight, but this release
represents a significant update in how CEL is designed and implemented within C++.

New Contributors

Full Changelog: v0.8.0...v0.9.0

Release v0.8.0

08 Jun 05:02
1e0fd3d

Choose a tag to compare

Changes

  • Removed UTF-8 library dependencies
  • Optimized performance of list append in tight loops
  • Introduced support for heterogeneous equality and cross-type numeric comparison
  • Update to the latest version of ANTLR
    • antlr: drop rules_antlr for custom rules [#153]
    • antlr: patch rule for external consumption [#154]

New Contributors

Full Changelog: v0.7.0...v0.8.0

Release v0.7.0

12 Oct 04:40
89d81b2

Choose a tag to compare

This release is primarily focused on security hardening and dead code elimination.

Fixes

  • Limit the number of characters that may be read when attempting error recovery (635951c)
  • Set the default comprehension iteration limit to 10000 (83fb851)
  • Check all arithmetic operations and type conversions for overflow (99ebd43)
  • Reject Timestamp values outside the string-expressible range
  • Reject Duration values which cannot be expressed within an int64 value
  • Heap buffer overrun for specialized binary and ternary operators (dfe31a4)
  • Ensure only valid map keys are supported in CreateStruct (3261a58)

Cleanups

This release also removes dependencies on the v1beta1 protos and deletes a lot of
related code which was otherwise used within CEL.

Release v0.6.1

28 Jun 16:18
128f215

Choose a tag to compare

Patch release with the following fixes:

Fixes

  • ensure compatibility with non-aliased absl and std types;
  • fix harmless undefined behavior on empty string_view access.

Release v0.6.0

25 Jun 23:30
ebcffc2

Choose a tag to compare

This is a minor release with the following changes:

Fixes

  • [61aeb51] Fix literal integer constant suffix.
  • [d20e1ef] Lower the size of the input expression to 100k codepoints.
  • [6faa5a0] Update CreateContainerBackedMap to use absl::StatusOr and fix ValueToCelValue.

Changes

  • [30af72e] Default enable .size() to return the number of unicode codepoints instead of the number of bytes.
  • [4f3bddf] Delete debug_string library. Prefer the CelValue.DebugString() method.
  • [e972c4b] Introduce new Has method for presence testing on CelMap values.

Release v0.5.0

31 Mar 20:30
3b7f706

Choose a tag to compare

Latest release of cel-cpp which raises cel-spec conformance from 78% to 94.2%. The major boost in coverage is support for serializing CelValue objects to the appropriate protobuf type, including to google.protobuf.Struct values.

Additionally, there are a number of hardening fixes for the parser and evaluator to address issues found by public and private fuzzers.

Fixes

  • [#85] The macro exists_one should not short-circuit false.
  • [#86] Map macro may produce empty values instead of erroring.
  • [#94] Missing string() conversion for timestamps and durations.
  • [#96] Proto2/3 well-known type conversion support to CEL values
  • [#104] duration() allows inf / -inf values
  • [663c2d8] Use unicode code point count for <string>.size()

Features

  • [8ad13052] Introduce an error recovery limit for the CEL Parser.