Releases: google/cel-go
Release v0.7.2
This release fixes minor gaps in the API between v0.6.0 and v0.7.*. Most users will be unaffected by these bugs,
but they are common enough to warrant a point release.
Fixes
Release v0.7.1
Release v0.7.0
Improvements
[#399] Support for Protobuf Golang API v2.
Fixes
[#394] Update CheckedExprToAst utility to handle constant expressions.
[#393] Update the conformance test version and Bazel build structure.
Breaking Changes
Value v. ConvertToNative
Calling Value() on a proto-based object will likely return a *dynamicpb.Message instance rather than the strongly typed proto message. Using ConvertToNative(reflect.TypeOf(&<DesiredType>{}) will produce the desired result.
DescriptorProto v. Descriptor
Top-level interfaces have shifted away from using the DescriptorProto and FileDescriptorProto messages directly in favor of the protobuf v2 API protoreflect.Descriptor and protoreflect.FileDescriptor.
Duration and Timestamp
The duration.go and timestamp.go object types are now derived from go-native time.Duration and time.Time respectively as the dependence on the protobuf counterparts was not actually necessary.
Release v0.6.0
Improvements
- [#362] Expose interfaces that allow users to write their own CEL expression decorators.
- [#360] Optimize type conversion functions, spot errors in
timestampanddurationprogram plan time. - [#328] Publish the CEL-Go Codelab source.
- [#372] Introduce upper / lower ASCII string functions.
- [#373, #379] Introduce base64 encode / decode.
- [#367] Aliased identifier support
Fixes
- [#361] Fix type map references for Attributes and id references within qualifiers.
- [#375] Support hexidecimal int literals.
- [#382] Support gogo protogen protos for better Kubernetes proto support.
- [#384, #386] Fix Residual computations to be non-mutating.
Breaking Changes
Aliased identifier support introduces breaking changes by replacing the Packager concept with a Container to better match the CEL specification. See #367 for more information about the specific changes.
Release v0.5.1
Release v0.5.0
Improvements
- [#342] Introduced
decls.NewVaranddecls.NewConstas a replacement fordecls.NewIdent - [#343] Parse and check errors are stable sorted by their source location.
- [#348] Added
sync.Poolin front of ANTLR lexer / parser to improve checker performance.
Fixes
- [#341] Support for namespaced functions. See Breaking Changes for more information before use.
- [#345] Doc fix to remove reference to a removed evaluation option.
Breaking Changes
Support for namespaced function resolution means that CEL extension functions can now have qualified names, such as base64.encode. This has always been supported by the CEL type-checker and the CEL specification, but was never properly supported by the evaluators. As part of this fix, the type-checker introduces AST rewrites to ensure that all identifiers in the checked AST are fully-qualified. This change simplifies the execution planning phase for the program, but may introduce structural differences between v0.5+ ASTs and those created with prior releases of CEL.
The structural difference introduced with this change should not affect evaluation. If anything v0.5+ ASTs will improve the conformance of the C++ evaluator with the CEL spec.
Release v0.4.2
Fixes
- Make the
has()macro consistent with cel-spec for proto2 and proto3 message types. - Improve type resolution when there are multiple overloads with the same return type.
- Remove shared state from the
Env#Extend()call. #issues/333 - Fix proto2 enum assignments during object constructions.
- Make
AttributevaluesStringerimplementations to make them human-readable in errors.
Breaking Changes
The Env#Extend() changes introduced a new method on the ref.TypeRegistry interface called Copy.
If the user has implemented a custom TypeRegistry, the Copy method is required in order to support
extension. If the TypeRegistry is immutable, it may trivially return itself.
Release v0.4.1
Release v0.4.0
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
proto2andproto3. - Introduced a new
cel.Libraryinterface and extension library for dealing with string manipulation.
Fixes
- Checker support for protobuf
sfixed32,sfixed64fields. - Convert certain type param resolution to
dynto prevent type resolution errors. - Disable short-circuiting in the
exists_onemacro to be consistent with CEL spec. - Remove
dynas a runtime type, and add it as an identity functiondyn(<expr>) == expr. - Ensure strings must be valid unicode.
- Remove support for
!1as a valid parse-only expression. - Fix recursive registration of imported proto files within a descriptor.
- Enable proto supporting conformance tests.
- Change the
cel.AstToStringfunction 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
ConvertToNativefor maps and lists. - Fix error propagation on
!=.
Breaking Changes
- The
cel.Issues,cel.Ast,cel.Env, andcel.EvalDetailsinterfaces have been replaced with concrete types. - The
interpreter.NewAdaptingActivationandinterpreter.AdaptingActivationhave been replaced by automatic propagation and use of theref.TypeAdapterduring variable resolution. - The
cel.Envconstruction will defer environment validation until the firstenv.Checkcall. - 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.
Release v0.4.0-alpha.2
Alpha release which improves the usability of CEL values. Another point release on the way toward v0.4.0.
Features
Improve type conversion capabilities for lists and maps.