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
andproto3
. - 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 functiondyn(<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
, andcel.EvalDetails
interfaces have been replaced with concrete types. - The
interpreter.NewAdaptingActivation
andinterpreter.AdaptingActivation
have been replaced by automatic propagation and use of theref.TypeAdapter
during variable resolution. - The
cel.Env
construction will defer environment validation until the firstenv.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. UseEnv.UnknownActivation()
andcel.EnvOptions(OptPartialEval)
to achieve the same behavior.
- ๐ Top-level support for partial evaluation