Skip to content

v0.11.1

Latest

Choose a tag to compare

@dmitriplotnikov dmitriplotnikov released this 20 Oct 22:52
· 10 commits to main since this release

Significant changes

  • CEL-Java evaluates the following expressions to their proto equivalent form:
timestamp(100) -> google.protobuf.Timestamp
duration("1h") -> google.protobuf.Duration

Starting with this release, the runtime can evaluate these literals to the following Java native type equivalents:

timestamp(100) -> java.time.Instant
duration("1h") -> java.time.Duration

This new behavior is not yet enabled by default. Call CelOptions.Builder.evaluateCanonicalTypesToNativeValues(true) to explicitly enable it.

  • Previously only identifiers containing a period were allowed to be aliased. This constraint has been removed, so the following aliasing is now allowed:
CelContainer.newBuilder().addAlias("short", "really_long_package_name").build();

What's Changed

Features

  • Evaluate CEL's timestamp and duration types to their native equivalent values in #790
  • Relax constraint for fully qualifying a package name when aliasing in #837

Optimizations

  • Enhance CSE to handle two variable comprehensions in #808
  • Override environment's expected result type during constant folding in #815
  • Allow constant folding to fold equals operator in #822
  • Enhance ConstantFoldingOptimizer to fold arithmetics involving timestamps and durations in #825

Safety

  • Add comprehension nesting validator. in #829

Bug fixes

  • Fixed negative zero comparison. "0.0 == -0.0" now evaluates to true
  • Fixed FileDescriptorSetConverter to always reference WellKnownTypes descriptors from generated ones in #833
  • Fixed bytes(string) standard function to respect evaluateCanonicalTypesToNativeValues flag in #828

Testing infra

  • Setup of the coverage index. in #811

Miscellaneous

  • Renaming the CelComprehensionsExtensions docs to align more closely with lib implementation in #807
  • Remove capability to serially increment mangled variable indices in #806
  • Add an overload for CelMutableExpr.ofComprehension. in #812
  • Fix Typo: "descedent" to "descendent". in #827
  • Include comprehensions in CelEnvironment in #838
  • Update evaluateCanonicalTypesToNativeValues documentation and fix tests in #840

Full Changelog: v0.11.0...v0.11.1