3030import dev .cel .checker .CelStandardDeclarations ;
3131import dev .cel .checker .CelStandardDeclarations .StandardFunction ;
3232import dev .cel .checker .CelStandardDeclarations .StandardOverload ;
33+ import dev .cel .common .CelContainer ;
3334import dev .cel .common .CelFunctionDecl ;
3435import dev .cel .common .CelOptions ;
3536import dev .cel .common .CelOverloadDecl ;
@@ -195,7 +196,7 @@ public CelCompiler extend(CelCompiler celCompiler, CelOptions celOptions)
195196 celCompiler
196197 .toCompilerBuilder ()
197198 .setTypeProvider (celTypeProvider )
198- .setContainer (container ())
199+ .setContainer (CelContainer . ofName ( container () ))
199200 .addVarDeclarations (
200201 variables ().stream ()
201202 .map (v -> v .toCelVarDecl (celTypeProvider ))
@@ -206,7 +207,7 @@ public CelCompiler extend(CelCompiler celCompiler, CelOptions celOptions)
206207 .collect (toImmutableList ()));
207208
208209 if (!container ().isEmpty ()) {
209- compilerBuilder .setContainer (container ());
210+ compilerBuilder .setContainer (CelContainer . ofName ( container () ));
210211 }
211212
212213 addAllCompilerExtensions (compilerBuilder , celOptions );
@@ -240,8 +241,10 @@ private void addAllCompilerExtensions(
240241 for (ExtensionConfig extensionConfig : extensions ()) {
241242 CanonicalCelExtension extension = getExtensionOrThrow (extensionConfig .name ());
242243 if (extension .compilerExtensionProvider () != null ) {
243- CelCompilerLibrary celCompilerLibrary = extension .compilerExtensionProvider ()
244- .getCelCompilerLibrary (celOptions , extensionConfig .version ());
244+ CelCompilerLibrary celCompilerLibrary =
245+ extension
246+ .compilerExtensionProvider ()
247+ .getCelCompilerLibrary (celOptions , extensionConfig .version ());
245248 celCompilerBuilder .addLibraries (celCompilerLibrary );
246249 }
247250 }
@@ -252,8 +255,10 @@ private void addAllRuntimeExtensions(CelRuntimeBuilder celRuntimeBuilder, CelOpt
252255 for (ExtensionConfig extensionConfig : extensions ()) {
253256 CanonicalCelExtension extension = getExtensionOrThrow (extensionConfig .name ());
254257 if (extension .runtimeExtensionProvider () != null ) {
255- CelRuntimeLibrary celRuntimeLibrary = extension .runtimeExtensionProvider ()
256- .getCelRuntimeLibrary (celOptions , extensionConfig .version ());
258+ CelRuntimeLibrary celRuntimeLibrary =
259+ extension
260+ .runtimeExtensionProvider ()
261+ .getCelRuntimeLibrary (celOptions , extensionConfig .version ());
257262 celRuntimeBuilder .addLibraries (celRuntimeLibrary );
258263 }
259264 }
@@ -697,9 +702,7 @@ enum CanonicalCelExtension {
697702 SETS (
698703 (options , version ) -> CelExtensions .sets (options ),
699704 (options , version ) -> CelExtensions .sets (options )),
700- LISTS (
701- (options , version ) -> CelExtensions .lists (),
702- (options , version ) -> CelExtensions .lists ());
705+ LISTS ((options , version ) -> CelExtensions .lists (), (options , version ) -> CelExtensions .lists ());
703706
704707 @ SuppressWarnings ("ImmutableEnumChecker" )
705708 private final CompilerExtensionProvider compilerExtensionProvider ;
@@ -737,8 +740,7 @@ RuntimeExtensionProvider runtimeExtensionProvider() {
737740 }
738741
739742 /**
740- * LibrarySubset indicates a subset of the macros and function supported by a subsettable
741- * library.
743+ * LibrarySubset indicates a subset of the macros and function supported by a subsettable library.
742744 */
743745 @ AutoValue
744746 public abstract static class LibrarySubset {
@@ -766,6 +768,7 @@ public abstract static class LibrarySubset {
766768 * IncludeFunctions specifies a set of functions to include in the subset.
767769 *
768770 * <p>Note: the overloads specified in the subset need only specify their ID.
771+ *
769772 * <p>Note: if IncludedFunctions is non-empty, then ExcludedFunctions is ignored.
770773 */
771774 public abstract ImmutableSet <FunctionSelector > includedFunctions ();
0 commit comments