Releases: google/cel-go
Release v0.22.1
Fixes
- Additional hardening on legacy macros [https://github.com//pull/1064]
- Additional nil-safety checks with corresponding test updates [https://github.com//pull/1073]
- Add two-variable comprehension support to cel-policy [https://github.com//pull/1074]
- Fix optional test to short-circuit [https://github.com//pull/1076]
- Fix nil-type when two-var comprehension has a dyn range [https://github.com//pull/1077]
New Contributors
- @aakash070 made their first contribution in #1069
Full Changelog: v0.22.0...v0.22.1
Release v0.22.0
What's Changed
Core CEL
- Add list flatten() by @fabriziosestito in #980
- Add sets and lists extensions to REPL by @l46kok in #1005
- CEL Spec and Proto Updates by @TristonianJones in #1011
- Implement native conformance test runner by @jcking in #1001
- Add support for no padding in base64 decode by @TristonianJones in #1017
- Allow configurable tag name overrides in native types by @matthchr in #1009
- Introduce helper trait types for lists and maps by @TristonianJones in #1026
- ext: add list.sort() by @cezar-guimaraes in #1021
- Foldable Maps and Lists by @TristonianJones in #995
- Update REPL examples by @jnthntatum in #1028
- Interop foldable maps and lists with map mutation helper by @TristonianJones in #1029
- Update the Go AST representation to handle a second iteration variable by @TristonianJones in #1031
- Runtime support for two-variable comprehensions by @TristonianJones in #1032
- Two-variable comprehension support by @TristonianJones in #1034
- Update tag-based parsing to use lambda for additional customization by @matthchr in #1039
- Fix string reverse member overload name by @TristonianJones in #1045
- Remove unused server directory by @TristonianJones in #1041
- Add functions to the lists extension. by @seirl in #1037
- Rename strings version test by @TristonianJones in #1047
- Fix doc strings and version support on math extensions by @TristonianJones in #1046
- Upgrade cel-go to support bazel-mod by @TristonianJones in #1049
- Fix out of range error for non-negative string indexing offsets by @TristonianJones in #1052
- Expand visibility of parser/gen package by @TristonianJones in #1057
- Ensure variables in comprehensions don't collide by @TristonianJones in #1062
Policy
- Support for typename import aliases by @TristonianJones in #993
- Error on condition-only match blocks by @TristonianJones in #1003
- Update context proto resolution to use type provider by @TristonianJones in #1013
- Support for context proto declarations by @TristonianJones in #1006
- CEL Policy Readme by @TristonianJones in #1025
- Support for cel.@block during policy composition by @TristonianJones in #1056
New Contributors
- @fabriziosestito made their first contribution in #980
- @matthchr made their first contribution in #1009
- @cezar-guimaraes made their first contribution in #1021
- @sreeram-venkitesh made their first contribution in #1035
Full Changelog: v0.21.0...v0.22.0
Release v0.21.0
Features
- Math extensions update to include bitwise ops and floating point helpers [#923]
- Better support custom types with custom type registries [#931]
- repl: implement %parse [#933]
- Fixed partial variables extended bug and split PartialVarsEnvExtended test into two [#955]
- Added partial evaluations example [#959]
- Enable conformance tests for extensions [#930]
- Update cel-spec and enable optional_type conformance tests [#919]
- Improve token representation in AST [#932]
- Add function accessor to Env [#978]
CEL Policy Compiler
Policies which use CEL often evolve to express complex logic using multiple statements
and decision criteria. The CEL Policy Compiler provides an extensible format for parsing,
compiling, and composing expression graphs. Below is a simple example which can easily
be compiled to a single CEL expression.
name: "my-policy"
rule:
variables:
- name: greeting
expression: "'%s, %s!'"
- name: people
expression: >
['Tristan', 'Calla', 'Antoine', 'Jonathan', 'Sokwhan', 'Rebecca']
match:
- condition: "request.user in variables.people"
output: "variables.greeting.format(['hello', request.user])"
- output: "variables.greeting.format(['goodbye', 'stranger'])"
- Simple Policy Compiler [#924]
- Introduce protobuf message testing to policies [#961]
- Generate policy explanations during compilation [#977]
- Variable and nested rule limits [#989]
- Improved support for nested rules #991]
Fixes
- Delete dangling source info from macro expansion [#934]
- Do not re-use ID twice in
exists_one
macro [#935] - Avoid iterating over the source multiple times during parse [#936]
- Fix for working with byte arrays by [#958]
- Stabilize macro id generation during optimization [#962]
- String formatting panic fix for non-literal format strings [#987]
- Add nil checking for wrapperspb's types [#960]
- Prevent self-append for
Issues
[#988] - Use bytes interface value for zero native type struct fields instead of dynamic list [#981]
Presence Test Semantics
The following two changes identified an issue where presence test was unexpectedly being performed over a scalar type and evaluating to absent
rather than erroring. It is strongly advised to set the flag cel.EnableErrorOnBadPresenceTest(true)
to avoid a logical correctness issue.
- Fix presence test to produce an error when it's not a map or a message [#922]
- Update the presence testing fix to be opt-out [#939]
Deprecation Cleanup
- Remove the deprecated protobuf function and type declarations [#921]
New Contributors
- @testwill made their first contribution in #911
- @patrickpichler made their first contribution in #941
- @seirl made their first contribution in #948
- @jduraniglesias made their first contribution in #955
- @goccy made their first contribution in #960
Full Changelog: v0.20.1...v0.21.0
v0.20.1
Minor release to capture a couple bug fixes and API / build visibility changes.
What's Changed
- Track sizes of comprehension results by [#901]
- Introduce new helper APIs for optimizers by [#903]
- Make the CEL ast package public. [#904]
New Contributors
- @ShahedAlMashni made their first contribution in #904
Full Changelog: v0.20.0...v0.21.0
Release v0.20.0
What's Changed
- Minor adjustment to inlining to fix a bad bind [#888]
- Ensure error typed variables are returned as errors from Resolve b [#889]
- ext.NativeTypes: Recursively add sub-types [#892]
- DefaultTypeAdapter: Add support for missing custom scalars [#893]
- Lists: Fix handling of go arrays [#894]
New Contributors
- @alvaroaleman made their first contribution in #892
Full Changelog: v0.19.0...v0.20.0
Release v0.19.0
Features
- Add AST node IDs to types.Err for errorable expressions [#862]
- Set membership test rewriting optimizer [#865]
- Introduce 'wither' method for changing type traits [#871]
- Add option to include test types in the repl [#855]
Fixes
- Fix MaxID to consider macro keys and expressions [#861]
- Update builtin macros to use unique IDs. [#866]
- Fix incorrect example in string formatting docs. [#873]
- Fix the optional type name and type identifier resolution [#870]
- Fix type substitution within parameterized type names [#880]
- Bump follow-redirects from 1.15.2 to 1.15.4 in /repl/appengine/web [882]
New Contributors
- @nicksnyder made their first contribution in #873
Full Changelog: v0.18.2...v0.19.0
Release v0.18.2
Release v0.17.7
What's Changed
Full Changelog: v0.17.6...v0.17.7
Release v0.18.1
What's Changed
- Add support for a relative offset within ast.SourceInfo by [#836]
- Fix last optional element to be retained as an optional index while folding [#841]
- Fix deprecation notice for string format validation [#840]
- Update cel-spec and enable wrappers conformance tests [#842]
- refactor: remove lexer and parser pools [#838]
New Contributors
Full Changelog: v0.18.0...v0.18.1
Release v0.18.0
Features
The latest release of CEL introduces validators (#775) and optimizers (#804, #827) and migrates the core CEL internals off of the
protobuf expression and type representations (#789).
- String format validator [#775]
- Create a Function that Reverses a String [#796]
- Introduce pre-order / post-order visitor pattern [#813]
- Add Libraries() function to Env [#822]
- Static optimizer for constant folding [#804]
- Inlining optimizer [#827]
- FindStructTypeFields support for types.Provider [#814]
Breaking Changes
The following PR changes the API signature of the checker.AstNode
method Expr
to return an ast.Expr
.
- Migrate the checker.Coster to the ast.Expr [#798]
Fixes
- Nil safety checks for cel.Ast [#784]
- Fix cost estimates to propagate result sizes [#787]
- Catch invalid literals created from expression factories [#810]
- Ensure stable ordering of overload candidates [#817]
- Clarify replace with/by empty string [#820]
- Fix functional exemptions for homogeneous literal checks [#832]
- Fix logical operator folding that only involve literals [#833]
- Upgrade go-genproto to latest [#831]
New Contributors
Full Changelog: v0.17.1...v0.18.0