Skip to content

Releases: google/cel-go

Release v0.7.0

13 Jan 22:25
4c3317a
Compare
Choose a tag to compare

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

22 Sep 18:18
5ac7710
Compare
Choose a tag to compare

Improvements

  • [#362] Expose interfaces that allow users to write their own CEL expression decorators.
  • [#360] Optimize type conversion functions, spot errors in timestamp and duration program 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

22 May 00:07
199f791
Compare
Choose a tag to compare

Fixes

[#357] Implements timestamp(<unix_epoch>) which was supported in the checker, but not implemented.

Features

[#354] Introduces a feature flag mechanism for introducing new features behind flag guards.

Release v0.5.0

08 May 20:49
f3a4721
Compare
Choose a tag to compare

Improvements

  • [#342] Introduced decls.NewVar and decls.NewConst as a replacement for decls.NewIdent
  • [#343] Parse and check errors are stable sorted by their source location.
  • [#348] Added sync.Pool in 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

21 Apr 00:14
33f7127
Compare
Choose a tag to compare

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 Attribute values Stringer implementations 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

26 Mar 04:32
525447a
Compare
Choose a tag to compare

Bug fix release to address issues introduced in v0.4.0

Fixes

  • Enable support for index operations with global function calls as arguments #325
  • Ensure mutable shared state updates are appropriately synchronized #322

Release v0.4.0

06 Feb 05:44
0296b62
Compare
Choose a tag to compare

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.

Release v0.4.0-alpha.2

30 Oct 21:41
708de00
Compare
Choose a tag to compare
Pre-release

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.

Release v0.4.0-alpha.1

25 Oct 19:08
1188e2e
Compare
Choose a tag to compare
Pre-release

This is an alpha release of the planned 0.4.0 release which will feature the following changes:

  • Replace a handful of top-level interfaces with concrete structs.
  • Complete the known unknowns implementation.
  • Making it easier to embed CEL in larger rule engines.

The alpha releases will include breaking changes and bug fixes on the path to publishing the official 0.4.0 release.

Features

  • Support for parsing from common.Source objects.
  • Ability to override the creation of common.Location objects at parse time.
  • Instances of common.Errors and cel.Issues may be merged together.
  • New test case showing how to use custom macros.

Fixes

  • Fix for error propagation on != operations.
  • Fix for panic during type-check when the comprehension ranges are of invalid type.

Breaking Changes

  • The common.Source interface removes the IDOffset and IDLocation methods and adds NewLocation
  • The cel.Issues interface has been replaced by a concrete struct type.

Release v0.3.2

09 Oct 23:32
1844753
Compare
Choose a tag to compare

Features

  • Support for Env extension by copy with additional options.

Fixes

  • Lint fixes for go report card.