Skip to content

Commit 4d4a1a4

Browse files
TristonianJonescopybara-github
authored andcommitted
Sync with GitHub
PiperOrigin-RevId: 689541392
1 parent 1d852db commit 4d4a1a4

2 files changed

Lines changed: 43 additions & 47 deletions

File tree

conformance/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ cc_library(
9898
"@com_google_absl//absl/strings",
9999
"@com_google_absl//absl/types:optional",
100100
"@com_google_absl//absl/types:span",
101-
"@com_google_cel_spec//proto/test/v1/proto2:test_all_types_cc_proto",
102-
"@com_google_cel_spec//proto/test/v1/proto3:test_all_types_cc_proto",
101+
"@com_google_cel_spec//proto/cel/expr/conformance/proto2:test_all_types_cc_proto",
102+
"@com_google_cel_spec//proto/cel/expr/conformance/proto3:test_all_types_cc_proto",
103103
"@com_google_googleapis//google/api/expr/conformance/v1alpha1:conformance_cc_proto",
104104
"@com_google_googleapis//google/api/expr/v1alpha1:checked_cc_proto",
105105
"@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto",

conformance/service.cc

Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
#include "runtime/runtime.h"
8484
#include "runtime/runtime_options.h"
8585
#include "runtime/standard_runtime_builder_factory.h"
86-
#include "proto/test/v1/proto2/test_all_types.pb.h"
87-
#include "proto/test/v1/proto2/test_all_types_extensions.pb.h"
88-
#include "proto/test/v1/proto3/test_all_types.pb.h"
86+
#include "proto/cel/expr/conformance/proto2/test_all_types.pb.h"
87+
#include "proto/cel/expr/conformance/proto2/test_all_types_extensions.pb.h"
88+
#include "proto/cel/expr/conformance/proto3/test_all_types.pb.h"
8989
#include "google/protobuf/arena.h"
9090
#include "google/protobuf/descriptor.h"
9191
#include "google/protobuf/message.h"
@@ -271,34 +271,32 @@ class LegacyConformanceServiceImpl : public ConformanceServiceInterface {
271271
static auto* constant_arena = new Arena();
272272

273273
google::protobuf::LinkMessageReflection<
274-
google::api::expr::test::v1::proto3::TestAllTypes>();
274+
cel::expr::conformance::proto3::TestAllTypes>();
275275
google::protobuf::LinkMessageReflection<
276-
google::api::expr::test::v1::proto2::TestAllTypes>();
276+
cel::expr::conformance::google::protobuf::TestAllTypes>();
277277
google::protobuf::LinkMessageReflection<
278-
google::api::expr::test::v1::proto3::NestedTestAllTypes>();
278+
cel::expr::conformance::proto3::NestedTestAllTypes>();
279279
google::protobuf::LinkMessageReflection<
280-
google::api::expr::test::v1::proto2::NestedTestAllTypes>();
280+
cel::expr::conformance::google::protobuf::NestedTestAllTypes>();
281+
google::protobuf::LinkExtensionReflection(cel::expr::conformance::google::protobuf::int32_ext);
282+
google::protobuf::LinkExtensionReflection(cel::expr::conformance::google::protobuf::nested_ext);
281283
google::protobuf::LinkExtensionReflection(
282-
google::api::expr::test::v1::proto2::int32_ext);
284+
cel::expr::conformance::google::protobuf::test_all_types_ext);
283285
google::protobuf::LinkExtensionReflection(
284-
google::api::expr::test::v1::proto2::nested_ext);
286+
cel::expr::conformance::google::protobuf::nested_enum_ext);
285287
google::protobuf::LinkExtensionReflection(
286-
google::api::expr::test::v1::proto2::test_all_types_ext);
288+
cel::expr::conformance::google::protobuf::repeated_test_all_types);
287289
google::protobuf::LinkExtensionReflection(
288-
google::api::expr::test::v1::proto2::nested_enum_ext);
289-
google::protobuf::LinkExtensionReflection(
290-
google::api::expr::test::v1::proto2::repeated_test_all_types);
291-
google::protobuf::LinkExtensionReflection(
292-
google::api::expr::test::v1::proto2::Proto2ExtensionScopedMessage::
290+
cel::expr::conformance::google::protobuf::Proto2ExtensionScopedMessage::
293291
int64_ext);
294292
google::protobuf::LinkExtensionReflection(
295-
google::api::expr::test::v1::proto2::Proto2ExtensionScopedMessage::
293+
cel::expr::conformance::google::protobuf::Proto2ExtensionScopedMessage::
296294
message_scoped_nested_ext);
297295
google::protobuf::LinkExtensionReflection(
298-
google::api::expr::test::v1::proto2::Proto2ExtensionScopedMessage::
296+
cel::expr::conformance::google::protobuf::Proto2ExtensionScopedMessage::
299297
nested_enum_ext);
300298
google::protobuf::LinkExtensionReflection(
301-
google::api::expr::test::v1::proto2::Proto2ExtensionScopedMessage::
299+
cel::expr::conformance::google::protobuf::Proto2ExtensionScopedMessage::
302300
message_scoped_repeated_test_all_types);
303301

304302
InterpreterOptions options;
@@ -322,13 +320,13 @@ class LegacyConformanceServiceImpl : public ConformanceServiceInterface {
322320
CreateCelExpressionBuilder(options);
323321
auto type_registry = builder->GetTypeRegistry();
324322
type_registry->Register(
325-
google::api::expr::test::v1::proto2::GlobalEnum_descriptor());
323+
cel::expr::conformance::google::protobuf::GlobalEnum_descriptor());
324+
type_registry->Register(
325+
cel::expr::conformance::proto3::GlobalEnum_descriptor());
326+
type_registry->Register(
327+
cel::expr::conformance::google::protobuf::TestAllTypes::NestedEnum_descriptor());
326328
type_registry->Register(
327-
google::api::expr::test::v1::proto3::GlobalEnum_descriptor());
328-
type_registry->Register(google::api::expr::test::v1::proto2::TestAllTypes::
329-
NestedEnum_descriptor());
330-
type_registry->Register(google::api::expr::test::v1::proto3::TestAllTypes::
331-
NestedEnum_descriptor());
329+
cel::expr::conformance::proto3::TestAllTypes::NestedEnum_descriptor());
332330
CEL_RETURN_IF_ERROR(
333331
RegisterBuiltinFunctions(builder->GetRegistry(), options));
334332
CEL_RETURN_IF_ERROR(cel::extensions::RegisterEncodersFunctions(
@@ -426,34 +424,32 @@ class ModernConformanceServiceImpl : public ConformanceServiceInterface {
426424
static absl::StatusOr<std::unique_ptr<ModernConformanceServiceImpl>> Create(
427425
bool optimize, bool use_arena, bool recursive) {
428426
google::protobuf::LinkMessageReflection<
429-
google::api::expr::test::v1::proto3::TestAllTypes>();
427+
cel::expr::conformance::proto3::TestAllTypes>();
430428
google::protobuf::LinkMessageReflection<
431-
google::api::expr::test::v1::proto2::TestAllTypes>();
429+
cel::expr::conformance::google::protobuf::TestAllTypes>();
432430
google::protobuf::LinkMessageReflection<
433-
google::api::expr::test::v1::proto3::NestedTestAllTypes>();
431+
cel::expr::conformance::proto3::NestedTestAllTypes>();
434432
google::protobuf::LinkMessageReflection<
435-
google::api::expr::test::v1::proto2::NestedTestAllTypes>();
433+
cel::expr::conformance::google::protobuf::NestedTestAllTypes>();
434+
google::protobuf::LinkExtensionReflection(cel::expr::conformance::google::protobuf::int32_ext);
435+
google::protobuf::LinkExtensionReflection(cel::expr::conformance::google::protobuf::nested_ext);
436436
google::protobuf::LinkExtensionReflection(
437-
google::api::expr::test::v1::proto2::int32_ext);
437+
cel::expr::conformance::google::protobuf::test_all_types_ext);
438438
google::protobuf::LinkExtensionReflection(
439-
google::api::expr::test::v1::proto2::nested_ext);
439+
cel::expr::conformance::google::protobuf::nested_enum_ext);
440440
google::protobuf::LinkExtensionReflection(
441-
google::api::expr::test::v1::proto2::test_all_types_ext);
441+
cel::expr::conformance::google::protobuf::repeated_test_all_types);
442442
google::protobuf::LinkExtensionReflection(
443-
google::api::expr::test::v1::proto2::nested_enum_ext);
444-
google::protobuf::LinkExtensionReflection(
445-
google::api::expr::test::v1::proto2::repeated_test_all_types);
446-
google::protobuf::LinkExtensionReflection(
447-
google::api::expr::test::v1::proto2::Proto2ExtensionScopedMessage::
443+
cel::expr::conformance::google::protobuf::Proto2ExtensionScopedMessage::
448444
int64_ext);
449445
google::protobuf::LinkExtensionReflection(
450-
google::api::expr::test::v1::proto2::Proto2ExtensionScopedMessage::
446+
cel::expr::conformance::google::protobuf::Proto2ExtensionScopedMessage::
451447
message_scoped_nested_ext);
452448
google::protobuf::LinkExtensionReflection(
453-
google::api::expr::test::v1::proto2::Proto2ExtensionScopedMessage::
449+
cel::expr::conformance::google::protobuf::Proto2ExtensionScopedMessage::
454450
nested_enum_ext);
455451
google::protobuf::LinkExtensionReflection(
456-
google::api::expr::test::v1::proto2::Proto2ExtensionScopedMessage::
452+
cel::expr::conformance::google::protobuf::Proto2ExtensionScopedMessage::
457453
message_scoped_repeated_test_all_types);
458454

459455
RuntimeOptions options;
@@ -491,16 +487,16 @@ class ModernConformanceServiceImpl : public ConformanceServiceInterface {
491487
std::make_unique<cel::extensions::ProtoTypeReflector>());
492488
CEL_RETURN_IF_ERROR(RegisterProtobufEnum(
493489
type_registry,
494-
google::api::expr::test::v1::proto2::GlobalEnum_descriptor()));
490+
cel::expr::conformance::google::protobuf::GlobalEnum_descriptor()));
495491
CEL_RETURN_IF_ERROR(RegisterProtobufEnum(
496492
type_registry,
497-
google::api::expr::test::v1::proto3::GlobalEnum_descriptor()));
493+
cel::expr::conformance::proto3::GlobalEnum_descriptor()));
498494
CEL_RETURN_IF_ERROR(RegisterProtobufEnum(
499-
type_registry, google::api::expr::test::v1::proto2::TestAllTypes::
500-
NestedEnum_descriptor()));
495+
type_registry,
496+
cel::expr::conformance::google::protobuf::TestAllTypes::NestedEnum_descriptor()));
501497
CEL_RETURN_IF_ERROR(RegisterProtobufEnum(
502-
type_registry, google::api::expr::test::v1::proto3::TestAllTypes::
503-
NestedEnum_descriptor()));
498+
type_registry,
499+
cel::expr::conformance::proto3::TestAllTypes::NestedEnum_descriptor()));
504500

505501
CEL_RETURN_IF_ERROR(cel::extensions::EnableOptionalTypes(builder));
506502
CEL_RETURN_IF_ERROR(cel::extensions::RegisterEncodersFunctions(

0 commit comments

Comments
 (0)