cel-go v0.4.0 Release Notes

Release Date: 2020-02-06 // about 4 years ago
  • ๐Ÿš€ 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.