Skip to content

Commit 38230a1

Browse files
jnthntatumcopybara-github
authored andcommitted
Remove references to now unused option use_legacy_container_builders.
After changes to the list builder implementation to consolidate the legacy and modern versions, use_legacy_container_builders no longer has any effect. PiperOrigin-RevId: 713773190
1 parent 340d108 commit 38230a1

File tree

6 files changed

+1
-27
lines changed

6 files changed

+1
-27
lines changed

eval/public/cel_options.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ cel::RuntimeOptions ConvertToRuntimeOptions(const InterpreterOptions& options) {
3939
options.enable_empty_wrapper_null_unboxing,
4040
options.enable_lazy_bind_initialization,
4141
options.max_recursion_depth,
42-
options.enable_recursive_tracing,
43-
options.use_legacy_container_builders};
42+
options.enable_recursive_tracing};
4443
}
4544

4645
} // namespace google::api::expr::runtime

eval/public/cel_options.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,6 @@ struct InterpreterOptions {
183183
// Unlike the stack machine implementation, supporting tracing can affect
184184
// performance whether or not tracing is requested for a given evaluation.
185185
bool enable_recursive_tracing = false;
186-
187-
// Use legacy containers for lists and maps when possible.
188-
//
189-
// For interoperating with legacy APIs, it can be more efficient to maintain
190-
// the list/map representation as CelValues. Requires using an Arena,
191-
// otherwise modern implementations are used.
192-
//
193-
// Default is true for the legacy options type.
194-
bool use_legacy_container_builders = true;
195186
};
196187
// LINT.ThenChange(//depot/google3/runtime/runtime_options.h)
197188

runtime/optional_types_test.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ class OptionalTypesTest
187187

188188
TEST_P(OptionalTypesTest, RecursivePlan) {
189189
RuntimeOptions opts;
190-
opts.use_legacy_container_builders = false;
191190
opts.enable_qualified_type_identifiers = true;
192191
opts.max_recursion_depth = -1;
193192
opts.short_circuiting = EnableShortCircuiting();
@@ -223,7 +222,6 @@ TEST_P(OptionalTypesTest, RecursivePlan) {
223222

224223
TEST_P(OptionalTypesTest, Defaults) {
225224
RuntimeOptions opts;
226-
opts.use_legacy_container_builders = false;
227225
opts.enable_qualified_type_identifiers = true;
228226
opts.short_circuiting = EnableShortCircuiting();
229227
const EvaluateResultTestCase& test_case = GetTestCase();

runtime/runtime_builder_factory.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "runtime/internal/runtime_impl.h"
2727
#include "runtime/runtime_builder.h"
2828
#include "runtime/runtime_options.h"
29-
#include "runtime/type_registry.h"
3029
#include "google/protobuf/descriptor.h"
3130

3231
namespace cel {
@@ -63,9 +62,6 @@ absl::StatusOr<RuntimeBuilder> CreateRuntimeBuilder(
6362
auto& type_registry = runtime_impl->type_registry();
6463
auto& function_registry = runtime_impl->function_registry();
6564

66-
type_registry.set_use_legacy_container_builders(
67-
options.use_legacy_container_builders);
68-
6965
return RuntimeBuilder(type_registry, function_registry,
7066
std::move(runtime_impl));
7167
}

runtime/runtime_options.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,6 @@ struct RuntimeOptions {
153153
// Unlike the stack machine implementation, supporting tracing can affect
154154
// performance whether or not tracing is requested for a given evaluation.
155155
bool enable_recursive_tracing = false;
156-
157-
// Use legacy containers for lists and maps when possible.
158-
//
159-
// For interoperating with legacy APIs, it can be more efficient to maintain
160-
// the list/map representation as CelValues. Requires using an Arena,
161-
// otherwise modern implementations are used.
162-
//
163-
// Default is false for the modern option type.
164-
bool use_legacy_container_builders = false;
165156
};
166157
// LINT.ThenChange(//depot/google3/eval/public/cel_options.h)
167158

runtime/type_registry.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class TypeRegistry {
9191

9292
// Returns the effective type provider.
9393
const TypeProvider& GetComposedTypeProvider() const { return type_provider_; }
94-
void set_use_legacy_container_builders(bool use_legacy_container_builders) {}
9594

9695
private:
9796
friend const runtime_internal::RuntimeTypeProvider&

0 commit comments

Comments
 (0)