[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36445)

[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK

These changes have been made using string replacement and regex.

Will not be replacing all instances of CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites. Only ones which are doable using very simple regex with least chance of failure will be replaced.

Given that we have 5000+ instances of GPR_ASSERT to edit, Doing it manually is too much work for both the author and reviewer.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #36445

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36445 from tanvi-jagtap:tjagtap_assert_tools c160ab231a
PiperOrigin-RevId: 628093687
pull/36454/head
Tanvi Jagtap 10 months ago committed by Copybara-Service
parent e640ac636f
commit c8f85ff037
  1. 4
      tools/codegen/core/gen_join.py
  2. 3
      tools/codegen/core/gen_seq.py

@ -39,7 +39,7 @@ struct JoinState<Traits, ${",".join(f"P{i}" for i in range(0,n))}> {
% endfor
}
JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none());
CHECK(other.ready.none());
% for i in range(0,n):
Construct(&promise${i}, other.promise${i});
% endfor
@ -108,6 +108,8 @@ front_matter = """
#include <grpc/support/port_platform.h>
#include "absl/log/check.h"
#include "src/core/lib/gprpp/construct_destruct.h"
#include "src/core/lib/promise/detail/promise_like.h"
#include "src/core/lib/promise/poll.h"

@ -110,7 +110,7 @@ tail${i}:
% endfor
}
SeqState(const SeqState& other) noexcept : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0);
CHECK(state == State::kState0);
Construct(&${"prior."*(n-1-i)}current_promise,
other.${"prior."*(n-1-i)}current_promise);
% for i in range(0,n-1):
@ -197,6 +197,7 @@ front_matter = """
#include <utility>
#include "absl/log/check.h"
#include "absl/base/attributes.h"
#include "absl/strings/str_cat.h"

Loading…
Cancel
Save