From 58c050c433005d80dec410e8023db82ffe830bb8 Mon Sep 17 00:00:00 2001 From: tanvi-jagtap Date: Tue, 30 Apr 2024 04:18:24 +0000 Subject: [PATCH] [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT --- CMakeLists.txt | 18 ++++++++++++++++++ build_autogenerated.yaml | 18 ++++++++++++++++++ src/core/BUILD | 17 +++++++++++++++-- 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7df7c227294..8280b9b5ef3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6027,6 +6027,7 @@ target_link_libraries(activity_test gtest absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -7352,6 +7353,7 @@ target_link_libraries(avl_test gtest absl::config absl::hash + absl::check gpr ) @@ -8582,6 +8584,7 @@ target_link_libraries(call_filters_test absl::inlined_vector absl::function_ref absl::hash + absl::check absl::type_traits absl::statusor absl::utility @@ -10242,6 +10245,7 @@ target_link_libraries(chunked_vector_test absl::config absl::function_ref absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -11634,6 +11638,7 @@ target_link_libraries(context_test ${_gRPC_ALLTARGETS_LIBRARIES} gtest absl::config + absl::check absl::type_traits gpr ) @@ -12295,6 +12300,7 @@ target_link_libraries(down_cast_test ${_gRPC_ALLTARGETS_LIBRARIES} gtest absl::config + absl::check gpr ) @@ -12816,6 +12822,7 @@ target_link_libraries(endpoint_config_test gtest absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -13385,6 +13392,7 @@ target_link_libraries(exec_ctx_wakeup_scheduler_test upb_message_lib absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -14340,6 +14348,7 @@ target_link_libraries(for_each_test absl::config absl::function_ref absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -17707,6 +17716,7 @@ target_link_libraries(inter_activity_pipe_test gtest absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -18093,6 +18103,7 @@ target_link_libraries(interceptor_list_test absl::config absl::function_ref absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -18851,6 +18862,7 @@ target_link_libraries(latch_test gtest absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -19286,6 +19298,7 @@ target_link_libraries(map_pipe_test absl::config absl::function_ref absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -20238,6 +20251,7 @@ target_link_libraries(mpsc_test gtest absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -20734,6 +20748,7 @@ target_link_libraries(observable_test gtest absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -22612,6 +22627,7 @@ target_link_libraries(promise_mutex_test gtest absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr @@ -30806,6 +30822,7 @@ target_link_libraries(thread_quota_test gtest absl::config absl::hash + absl::check gpr ) @@ -32221,6 +32238,7 @@ target_link_libraries(wait_for_callback_test gtest absl::config absl::hash + absl::check absl::type_traits absl::statusor gpr diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index dbcec3cf033..164d36413fd 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -5254,6 +5254,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -5746,6 +5747,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - gpr uses_polling: false - name: aws_request_signer_test @@ -6524,6 +6526,7 @@ targets: - absl/container:inlined_vector - absl/functional:function_ref - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - absl/utility:utility @@ -7778,6 +7781,7 @@ targets: - absl/base:config - absl/functional:function_ref - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -8383,6 +8387,7 @@ targets: deps: - gtest - absl/base:config + - absl/log:check - absl/meta:type_traits - gpr uses_polling: false @@ -8655,6 +8660,7 @@ targets: deps: - gtest - absl/base:config + - absl/log:check - gpr uses_polling: false - name: dual_ref_counted_test @@ -8952,6 +8958,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -9259,6 +9266,7 @@ targets: - upb_message_lib - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -10037,6 +10045,7 @@ targets: - absl/base:config - absl/functional:function_ref - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -11571,6 +11580,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -12291,6 +12301,7 @@ targets: - absl/base:config - absl/functional:function_ref - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -12722,6 +12733,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -12974,6 +12986,7 @@ targets: - absl/base:config - absl/functional:function_ref - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -13487,6 +13500,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -13784,6 +13798,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -14713,6 +14728,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr @@ -19727,6 +19743,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - gpr uses_polling: false - name: thread_stress_test @@ -20380,6 +20397,7 @@ targets: - gtest - absl/base:config - absl/hash:hash + - absl/log:check - absl/meta:type_traits - absl/status:statusor - gpr diff --git a/src/core/BUILD b/src/core/BUILD index 49e3acb72db..cd0a3247bb6 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -1154,6 +1154,9 @@ grpc_cc_library( grpc_cc_library( name = "ref_counted", + external_deps = [ + "absl/log:check", + ], language = "c++", public_hdrs = ["lib/gprpp/ref_counted.h"], deps = [ @@ -1167,6 +1170,9 @@ grpc_cc_library( grpc_cc_library( name = "dual_ref_counted", + external_deps = [ + "absl/log:check", + ], language = "c++", public_hdrs = ["lib/gprpp/dual_ref_counted.h"], deps = [ @@ -3043,7 +3049,10 @@ grpc_cc_library( "service_config/service_config.h", "service_config/service_config_call_data.h", ], - external_deps = ["absl/strings"], + external_deps = [ + "absl/log:check", + "absl/strings", + ], language = "c++", deps = [ "arena", @@ -4475,6 +4484,7 @@ grpc_cc_library( ], external_deps = [ "absl/base:core_headers", + "absl/log:check", "absl/meta:type_traits", "absl/random", "absl/status", @@ -5630,7 +5640,10 @@ grpc_cc_library( grpc_cc_library( name = "down_cast", hdrs = ["lib/gprpp/down_cast.h"], - external_deps = ["absl/base:config"], + external_deps = [ + "absl/base:config", + "absl/log:check", + ], deps = ["//:gpr"], )