Release v0.4.0
TristonianJones
released this
06 Feb 05:44
·
492 commits
to master
since this release
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.