Skip to content

Releases: cel-expr/cel-java

v0.6.0

16 Jul 04:47

Choose a tag to compare

This release features CEL-based policy compilers with YAML support (example), adds a new extension library for handling set operations and includes minor bug fixes along with performance improvements.

Fixes

  • Copy the suppress warning annotations to autovalue gened celexpr in #359
  • Check for presence of optional indices to prevent autoboxing in #366
  • Adapt the function dispatch result to allow for automatic Any unpacking in #376

What's Changed

  • Implement CEL Set Extension in #360
  • Remove PartialMessage and IncompleteData in #365
  • Compute line offsets once when constructing CelCodePointArray #368
  • Remove celVarToDecl method in #371
  • Add an interface for encapsulating Source properties in #369
  • Add PolicySource in #370
  • Flag guard the function dispatch result adaptation change in #383
  • Implement YAML parser for policy configs in #372
  • Create a separate interface for validating required fields in a builder in #373
  • Add the capability to extend CEL environment from parsed config in #374
  • Add YAML policy test cases in #375
  • Implement YAML parser for policies in #377
  • Move computing offset location into CelSourceHelper for reuse in #379
  • Add AstMutator methods to construct cel.bind macro with varInit containing macros in #380
  • Add AstMutator methods to construct function calls in #381
  • Add Policy Compiler in #378
  • Add factories for policy parser and policy compiler in #382
  • Add capability to visit custom tags in #384
  • Pull getIssueString logic into CelIssue in #385
  • Introduce protobuf message testing to policies in #386
  • Validate required fields for policy variables in #387
  • Compute absolute source location correctly for multiline YAML strings in #395
  • Make iteration limit configurable for rule composer in #393
  • Decompose policy compile API into rule compilation and composition in #397
  • Surface type-mismatch errors in a readable fashion during rule composition in #399

Full Changelog: v0.5.2...v0.6.0

v0.5.2

28 May 20:12

Choose a tag to compare

What's Changed

  • Support evaluation of dynamic messages constructed via dynamic descriptors in #355
  • Remove deprecated create methods in #325
  • Mark CelDescriptorUtil as internal. Remove unused method in #352

Fixes

  • Retain source description post AST optimization in #342
  • Clear the source position for only the dangling macro expr ID instead of all exprs in #348

Miscellaneous

  • Fix extensions README.md formatting in #345
  • Variable name cleanups from removing create modifier in #322
  • Add documentation for codelab exercises 5 through 9 in #349
  • Add code for Exercise 8 Codelabs in #343
  • Add code for Exercise 9 Codelabs in #344

Full Changelog: v0.5.1...v0.5.2

v0.5.1

02 May 21:54

Choose a tag to compare

No actual changes from v0.5.0. The version was bumped to address an issue with pom.xml missing in Maven Central Repository.

v0.5.0

02 May 03:05

Choose a tag to compare

Note: Use 0.5.1 if you're using Maven Central

This release introduces mutable expressions to improve the performance of augmenting an AST via CEL optimizers. Roughly, the speed improvement ranges from 3x to 10x depending on the complexity of an AST.

Breaking Changes

Classes CelCreateList, CelCreateMap and CelCreateStruct have been renamed to CelList, CelMap and CelStruct respectively to be consistent across other canonical CEL implementations. There are no functional changes.

  • Remove modifier create from CelCreateList, CelCreateMap and CelCreateStruct in #318
  • Remove modifier create from mutable variants of list, map and struct in #323
  • Remove create modifiers from list,struct,map methods in #321

What's Changed

  • Accept a list as an argument to setParameterTypes in function overload decl in #278
  • Add a SubexpressionOptimizer baseline test case for fully extractable presence tests in #287
  • Implement CelMutableExpr in #289
  • Add CelMutableIdent in #291
  • Add CelMutableCreateList #292
  • Add CelMutableSelect in #297
  • Add CelMutableCreateStruct in #293
  • Add CelMutableCreateMap in #294
  • Add CelMutableComprehension in #295
  • Add CelMutableCall #298
  • Add copy constructor to deep copy mutable expressions in #296
  • Introduce a common expression tree interface between CelExpr and CelMutableExpr in #300
  • Compute Max IDs per subtree in NavigableExpr in #302
  • Add CelMutableAst in #303
  • Change MutableExprVisitor to visit using CelMutableExpr in #304
  • Change AST Mutator to accept mutable ASTs in #305
  • Change ConstantFoldingOptimizer to leverage mutable exprs in #308
  • Fully perform CSE on presence tests where possible in #311
  • Change AstMutator to augment macro source using mutable expr in #314
  • Drop expr suffix from CelExpr static constructors in #317
  • Specify better error message and code for invalid field selections in #316
  • Improve canEliminate logic by excluding nodes from ineligible comprehension branches in #312
  • Remove appending create modifier in ExprFormatter in #320
  • Remove modifier create from the common expression interface in #319
  • Change CelAstOptimizer interface signature. Cleanup unused methods in #310
  • Change SubexpressionOptimizer to leverage mutable exprs in #309
  • Add Mutable versions of NavigableExpr and AST in #307
  • Remove cached hashcode from MutableExpr in #306
  • Create a base navigable class that accepts a bound generic type of an expression in #301
  • Add a converter for adapting between CelExpr and CelMutableExpr #299
  • Rename MutableAst to AstMutator in #290
  • Use simple for loop instead of stream in CEL runtime equality #280

Fixes

  • Fix timestamp and duration conversion for JSON in #332
  • Change comprehension variable mangling logic to always generate a unique index per comprehension expr in #330
  • Fix optional type resolution in #283
  • Fix optional field selection behavior on structs in #286
  • Clean up dangling source information from macro expansion in #337
  • Do not re-use ID twice in exists_one macro in #338
  • Dedupe enum types by enum descriptor's fully qualified name in ProtoMessageTypeProvider in #324

Miscellaneous

  • Remove main AutoValue dependency from the published jar in #315
  • Add load() statements for the builtin Bazel java rules in #284
  • Update bazel WORKSPACE dependencies #331
  • Remove maven artifacts for optimizer, validator and extensions in #327
  • Add capability to regenerate baseline tests into a file in #329

Full Changelog: v0.4.1...v0.5.0

v0.4.1

21 Mar 19:56

Choose a tag to compare

What's Changed

  • Optimize scoped variable access using an unmodifiable map in #274
  • Fix an issue with incorrect boolean evaluation when short-circuiting is disabled in #275

Full Changelog: v0.4.0...v0.4.1

v0.4.0

06 Mar 23:37

Choose a tag to compare

This release introduces a new static optimizer that performs Common Subexpression Elimination to improve upon evaluation efficiency.

Breaking Changes

ConstantFoldingOptimizer.INSTANCE is made inaccessible with the following PR. Callers must use getInstance or newInstance methods instead.

What's Changed

Fixes

  • Fix constant folding to work with list provided as an identifier by @l46kok in #199
  • Fix standard function 'type' to accept a parameter type of TypeParamType instead of Dyn by @copybara-service in #207
  • Fix constant folding when ternary arg is replaced with a comprehension by @copybara-service in #268
  • Fix constant folding with in operator involving comprehension identifiers by @copybara-service in #263
  • Prevent string.format injection when interpreter exception is being built by @copybara-service in #218
  • Fix optional list/map indexing with unknowns. Fix optional map indexing via field selection. by @copybara-service in #262
  • Fix replacing namespaced identifiers for accu_init by @copybara-service in #261
  • Optimize parsing a large string literal by avoiding making substring copies #270

Miscellaneous

New Contributors

Full Changelog: v0.3.1...v0.4.0

v0.3.1

28 Feb 19:29
b8c661f

Choose a tag to compare

What's Changed

  • Don't include protos (and some other dependencies) in jars by @smparkes in #251
  • Prepare 0.3.1 release by @l46kok in #259

New Contributors

Full Changelog: v0.3.0...v0.3.1

v0.3.0

20 Dec 01:26

Choose a tag to compare

This release brings the following changes to improve safety, ease of use and evaluation performance:

  • Static AST validators have been added. Canonical literal validators are available for timestamp, durations, regex and homogeneous aggregate literals (for lists and maps).
  • Static AST optimizers. Used for optimizing type-checked ASTs for improved evaluation efficiency. Constant Folding is available for use.
  • Introduction of CelValue and CelValueProviders. CelValue is a native value representation leveraged in the runtime. This can be used to bind non-protobuf structs for evaluation (ex: POJOs).

What's Changed

New Contributors

Full Changelog: v0.2.0...v0.3.0

v0.2.0

08 Aug 22:12

Choose a tag to compare

This represents the release of CEL-Java in its entirety, including the parser, type-checker and runtime.

Full Changelog: v0.1.0...v0.2.0

v0.1.0

22 Feb 19:07

Choose a tag to compare

Initial release of CEL-Java

Features:

  • Evaluation of a type-checked expression
  • Adapters for CEL protobuf messages (dev.cel.expr and com.google.api.expr.v1alpha1)

Note: Compilation (Parsing + Type-Checking) is not yet supported but will be made available in the future. Please consider using CEL-Go implementation to produce a type-checked expression for time being.