v0.11.0
Features
- Introduced a new extension library for Two-variable comprehensions support
- (example:
<list>.all(indexVar, valueVar, <predicate>) -> bool)
- (example:
- Added support for type name Aliasing and Abbreviations to perform name resolution across multiple namespaces.
- CEL Policy Compiler now supports the
importskeyword to abbreviate type names. - Added the capability to export a CEL environment, including its standard libraries and extensions, into YAML.
- Expanded the lists extension library with new functions:
slice,distinct,reverse,sort, andsortBy.
Breaking Changes
-
PR #769 removes
setContainer(String)method on theCel,CelCompiler, andCelCheckerbuilders. Callers must usesetContainer(CelContainer)instead, which supports aliasing and abbreviations in addition to existing container resolution. For a migration that preserves existing behavior, simply provideCelContainer.ofName(string). -
PR #789 changes the internal representation of CEL's
nullandbytesliterals (e.g.,b'foo') to their CEL-native Java type equivalents (dev.cel.common.Values.NullValueanddev.cel.common.values.CelByteString) instead of their Protobuf counterparts (com.google.protobuf.NullValueandcom.google.protobuf.ByteString). This is currently a breaking change only if your codebase references these literals through theCelConstantAST node. There are no observable changes in evaluation behavior, as this is currently controlled by a feature flag. We plan on enabling this by default in a future release.
Bug fixes
- Fixed the filter/map macro to be linear in time and space complexity in #746.
- Fixed unknown merging to be linear in space complexity when referenced in binds in #770.
- Prevented comprehension identifiers from being mangled if the AST was not optimized in #792.
- Fixed
replaceSubtreeto properly populate source info for the three-argument map macro in #794. - Corrected
CelContainer.toBuilder()to properly copy aliases in #775. - Excluded protobuf-javalite from the public artifacts for CEL in #777.
What's Changed
Aliasing and Abbreviations
CEL Policy Compiler
- Optimize composed policies using Constant Folding and Common Subexpression Elimination in #793
- Add display_name field to CelPolicy.Variable element in #741
- Adding description and display name at Cel Policy level in #744
- Support for typename import aliases in policy compiler in #771
CEL Environment
- Add support for stdlib subsetting via CelEnvironment in #736
- Add support for macro inclusion/exclusion to CelEnvironmentExporter in #756
- Add support for extension versions in #739
- Implement CelEnvironmentExporter in #753
- Update the "encoders" extension to be compatible with CelEnvironmentExporter in #763
- Update the "protos" extension to be compatible with CelEnvironmentExporter in #764
- Update the "regex" extension to be compatible with CelEnvironmentExporter in #765
- Update the "sets" extension to be compatible with CelEnvironmentExporter in #766
- Update the "strings" extension to be compatible with CelEnvironmentExporter in #767
- Update "bindings" extension to be compatible with CelEnvironmentExporter in #762
- Add versions to the 'optional' library to gradually expose new functions in #747
- Refactor CelExtensionLibrary to centralize version definitions in #761
Extensions
- Checker and parser changes to support comprehensionsV2 in #778
- Checker and parser changes to support two variable comprehensions for remaining Macros in #796
- Introduce 'list' extension functions: 'slice', 'distinct', 'reverse', 'sort', 'sortBy' in #740
- AST changes to support two variable comprehensions in #772
- Adding runtime support for two variable comprehensions in #799
- Adding
transformMapandtransformMapEntrymacros in #800 - Updating the README.md with CelComprehensionsExtensions docs in #801
Miscellaneous
- Internally accumulate unknowns to a mutable list in #750
- Migrate to Bzlmod in #328
- Support triggering runner library programmatically in #725
- Run conformance tests against published maven JARs in #788
- Add missing entries to REVERSE_OPERATORS in #798
- Remove cel.bind option from SubexpressionOptimizer in #795
Full Changelog: v0.10.1...v0.11.0