Allow single-argument StrCat

and modify DEPS files accordingly.
This is done in support of the decision to encourage AbslStringify.

Bug: None
Change-Id: I26fee77978d1dd21be6d2ef011c4dfd78a7b43e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367204
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43338}
This commit is contained in:
Harald Alvestrand 2024-10-31 13:49:39 +00:00 committed by WebRTC LUCI CQ
parent 3fa21c89c0
commit aaaeb29ef5
5 changed files with 6 additions and 12 deletions

1
DEPS
View File

@ -2125,6 +2125,7 @@ include_rules = [
"+absl/strings/ascii.h",
"+absl/strings/escaping.h",
"+absl/strings/match.h",
"+absl/strings/str_cat.h", # note - allowed for single argument version only
"+absl/strings/str_replace.h",
"+absl/strings/string_view.h",
"+absl/types/variant.h",

View File

@ -261,8 +261,4 @@ specific_include_rules = {
"+video",
"+third_party",
],
"jsep_unittest\.cc": [
"+absl/strings/str_cat.h",
]
}

View File

@ -44,6 +44,7 @@ on a monolithic Abseil build target that will generate a shared library.
* The macros in `absl/base/attributes.h`, `absl/base/config.h` and
`absl/base/macros.h`.
* `absl/numeric/bits.h`
* Single argument absl::StrCat
* ABSL_FLAG is allowed in tests and tools, but disallowed in in non-test code.
@ -78,3 +79,7 @@ we will consider replacing `rtc::ArrayView` with `std::span`.
These are optimized for speed, not binary size. Even `StrCat` calls
with a modest number of arguments can easily add several hundred bytes
to the binary.
Exception: Single-argument absl::StrCat is allowed in order to make it
easy to use AbslStringify. See [TOTW #2015](https://abseil.io/tips/215) for
details on AbslStringify.

View File

@ -40,7 +40,4 @@ specific_include_rules = {
".*codec\.h": [
"+absl/strings/str_format.h",
],
".*codec_unittest\.cc": [
"+absl/strings/str_cat.h",
],
}

View File

@ -8,10 +8,6 @@ include_rules = [
specific_include_rules = {
"checks.h": [
"+absl/strings/has_absl_stringify.h",
"+absl/strings/str_cat.h",
],
"string_encode.h": [
"+absl/strings/str_cat.h"
],
"protobuf_utils.h": [
"+third_party/protobuf",
@ -27,7 +23,6 @@ specific_include_rules = {
],
"logging.h": [
"+absl/strings/has_absl_stringify.h",
"+absl/strings/str_cat.h",
],
"trace_event\.h": [
"+third_party/perfetto",