Skip to content

Release v0.4.0

Compare
Choose a tag to compare
@TristonianJones TristonianJones released this 06 Feb 05:44
· 492 commits to master since this release
0296b62

The v0.4.0 release of CEL-Go introduces several fixes, features, and breaking changes since v0.3.2.

Features

  • Top-level support for partial evaluation
    • Mark attributes (either whole variables or parts of them) as unknown.
    • Generate residual ASTs from partial evaluations using cel.EvalDetails.
  • Replaced several top-level interfaces with concrete structs.
  • Simplified the embedding of CEL into larger languages, such as CEL Policy Templates.
  • Improved field selection and indexing performance by 10x for proto2 and proto3.
  • Introduced a new cel.Library interface and extension library for dealing with string manipulation.

Fixes

  • Checker support for protobuf sfixed32, sfixed64 fields.
  • Convert certain type param resolution to dyn to prevent type resolution errors.
  • Disable short-circuiting in the exists_one macro to be consistent with CEL spec.
  • Remove dyn as a runtime type, and add it as an identity function dyn(<expr>) == expr.
  • Ensure strings must be valid unicode.
  • Remove support for!1 as a valid parse-only expression.
  • Fix recursive registration of imported proto files within a descriptor.
  • Enable proto supporting conformance tests.
  • Change the cel.AstToString function to behave like a single-line formatter.
  • Convert the text representation of byte literals to octal to be compatible with Google SQL.
  • Improved support for ConvertToNative for maps and lists.
  • Fix error propagation on !=.

Breaking Changes

  • The cel.Issues, cel.Ast, cel.Env, and cel.EvalDetails interfaces have been replaced with concrete types.
  • The interpreter.NewAdaptingActivation and interpreter.AdaptingActivation have been replaced by automatic propagation and use of the ref.TypeAdapter during variable resolution.
  • The cel.Env construction will defer environment validation until the first env.Check call.
  • The Program.Eval(Activation) method will result in an error if a declared variable appears in the expression, but not in the activation. Use Env.UnknownActivation() and cel.EnvOptions(OptPartialEval) to achieve the same behavior.