Releases: google/cel-go
Release v0.17.1
Minor release to address documentation gaps and additional methods to make unknowns more useful
Fixes
- Helpers for accessing unknown state information [#781]
Full Changelog: v0.17.0...v0.17.1
Release v0.17.0
At a high-level this release introduces several changes which should improve ease of use
while also improving the evaluation safety and quality:
- Standard library functions may be extended by using
cel.Function
options. - The unknown type now contains information about which field references were unknown.
- Type representations have been consolidated to
*types.Type
. - New options have been added to add custom AST validations which are run after type-checking.
- Additional macros were added for optional types, and a new extension was added for list slicing.
- The
cel.ContextProtoVars
method has been added to bind proto fields to variable names,
complementingcel.DeclareContextProto
.
Features
- Unify decls.Type with types.Type [#745]
- Introduce optFlatMap and OptionalTypes documentation [#744]
- Include expression id on parser and checker errors [#725]
- Implement errors.Unwrap for types.Err. [#728]
- Allow extension of stdlib functions [#747]
- Add list library with slice method [#753]
- Export FormatCELType in the 'cel' package [#763]
- Validators for common literals and use cases [#765]
- Comprehension nesting limit validator [#769]
- Unify type adapter / provider representations [#770]
- Benchmark harness with some initial reference cases [#750]
- Simplified partial state evaluation [#766]
- Update types.Unknown with attribute trails [#776]
- ContextProtoVars() to simplify proto-based inputs [#779]
- Variadic logical operator AST support [#726]
Fixes
- Add the overload reference for optional field selection [#730]
- Correct a typo in the README [#731]
- Clear iteration variable data during expression pruning [#740]
- Restore iter range pruning on comprehension ASTs [#757]
Breaking Changes
The following API changes may break users of cel-go:
- Removal of
*types.TypeValue
, replaced by*types.Type
- Removal of
*exprpb.Type
from public interfaces such as thechecker.AstNode
- Change in type definition for
*types.Unknown
. Switch from a type alias for[]int64
to a structured type.
New Contributors
Full Changelog: v0.16.0...v0.17.0
Release v0.16.0
Features
- Expose ExpressionSizeCodePointLimit as env option. [#720]
- Presence test cost tracking options [#721]
- Support for optMap() optional value macro [#717]
Fixes
- Bump socket.io-parser from 4.2.2 to 4.2.3 in /repl/appengine/web [#713]
- Fix for macro call tracking with optional list elements by [#712]
- Bump google.golang.org/genproto [#714]
- Add vendor integrity check [#716]
- Fix overload collision checks by ignoring type param names [#718]
New Contributors
- @liggitt made their first contribution in #714
- @notyourusualaccountname2 made their first contribution in #720
Full Changelog: v0.15.3...v0.16.0
Release v0.15.3
Fixes
- Fix state tracking through optional field selections [#708]
- Support for pruning macro call nodes with limited optional support [#705]
- Update presence test state tracking and pruning [#711]
PR #711 also fixes an issue where optional values would not work
correctly with partial state tracking in some cases.
Full Changelog: v0.15.2...v0.15.3
Release v0.15.2
Fixes
- Make checker state concurrency safe [#702]
- AST scan to establish a non-conflicting expression ID for pruning [#703]
Full Changelog: v0.15.1...v0.15.2
Release v0.15.1
Fixes
- Bump engine.io from 6.4.1 to 6.4.2 [#697]
- Fix ID collision between partial eval and AST pruner [#700]
Full Changelog: v0.15.0...v0.15.1
Release v0.15.0
Features
This release introduces a new feature for CEL which allows you to package up local variable
bindings within your expression, using the following syntax:
cel.bind(<varName>, <varInitExpr>, <remainingExpr>)
An example would look as follows:
cel.bind(vals, msg.nested_msg.repeated_strings,
vals.size() > 2 &&
vals[0].startsWith('prefix') &&
vals[1].endsWith('suffix'))
- CEL variable bindings [#682]
- Expose optional types as a REPL option [#675]
- Extension library for set-based tests over lists [#689]
Fixes
- Parser error reporting limit [#672]
- Prune recursion fixes for nested logic [#677]
- Add help and compile options to the REPL [#676]
- Fix for type guard on optimized set membership step [#678]
- Fix numeric unparsing for floats which represent integer values by [#686]
- Update ANTLR v4 WORKSPACE references [#691]
- Fix error message generation for parse-only expressions [#693]
- Additional string.format() test for message field accesses [#694]
Breaking changes
- Update the
ConvertToNative
API documentation andstrings.join
implementation [#692]
The strings.join
implementation had previously been based on ConvertToNative
, but this
presented some usability issues and the implementation was shifted to rely on ref.Val
and
traits.Iterator
. The new implementation can be opted into by using ext.StringsVersion(2)
,
or opted out of by using a version < 2.
Full Changelog: v0.14.0...v0.15.0
Release v0.14.0
Features
- Support for protobuf JSON serialization of native object types [#616]
- Allow creation of custom types.Err structs [#630]
Optional Values
- Syntax, type-checking, and runtime support for optional list elements [#615]
- Support for optional on unparse [#673]
String Extensions
- Add string.format by [#617]
- Add version option to Strings extension library [#650]
- Add strings.quote [#639]
- Add estimated cost support to strings.quote [#664]
- Add compile-time string.format checking [#645]
REPL
- Appengine demo for web-based REPL [#646]
- Enable extensions for REPL [#653]
- Update REPL to use ext.Strings formatter when possible. [#659]
Fixes
- Fix long build times by upgrading gazelle [#637]
- Ensure that macro call tracking is updated during AST pruning [#619]
- Fix accidental alterations to 'decorators' slice [#620]
- Tests for race conditions in top-level cel package [#625]
- Potential index out of bounds fix by [#626]
- Fix conformance service proto field access for SourcePosition message [#627]
- Ensure that optional indices are within the range of elements [#663]
- Update repl README's standalone build commands [#636]
- Fix panic in optimized set membership test for byte values [#652]
- Fix regression of cost behavior for has() [#651]
Breaking Changes
- Remove the deprecated interpreter.Coster interface [#665]
Since the Env.EstimateCost() and Program.ActualCost() routines are available,
the deprecated cel.EstimateCost() routine is confusing and strictly less accurate
than the updated APIs.
While there are other cleanups desired for https://github.com/google/cel-go/issues/504,
this change will at least improves the clarity of the top-level APIs.
Note: this is a breaking change. Users should consult the referenced methods
to replace any legacy use of cel.EstimateCost()
New Contributors
- @inteon made their first contribution in #620
- @nlachfr made their first contribution in #630
- @davidjb made their first contribution in #636
- @dependabot made their first contribution in #647
- @SimonWaldherr made their first contribution in #670
Full Changelog: v0.13.0...v0.14.0
Release v0.12.6
Fixes
- Thread-safety fix for unprotected mutation of decorator set [#623]
Full Changelog: v0.12.5...v0.12.6
Release v0.11.6
Fixes
- Thread-safety fix for unprotected mutation of decorator set [#622]
Full Changelog: v0.11.5...v0.11.6