Shall we start using absl::StrFormat()?

144 views
Skip to first unread message

Dean Liao

unread,
Sep 25, 2019, 5:14:45 AM9/25/19
to Chromium-dev
Recently I feel base::StringPrintf() too verbose to convert std::string to C string for every parameters. Then I found a good replacement:  absl::StrFormat() in https://cs.chromium.org/chromium/src/third_party/abseil-cpp/absl/strings/str_format.h. However, I didn't see it being used anywhere in Chromium repository.

Do we have any concern / restriction from using absl lib? If not, I would like to use absl::StrFormat() to replace base::StringPrintf().

Hans Wennborg

unread,
Sep 25, 2019, 5:44:06 AM9/25/19
to dean...@google.com, Chromium-dev
My understanding is that absl isn't used by Chromium, except that some
third-party libraries depend on it.

I don't remember where it was discussed, but that's what it says here:
https://chromium.googlesource.com/chromium/src/third_party/+/master/abseil-cpp/README.chromium#11

Peter Kasting

unread,
Sep 25, 2019, 5:51:48 AM9/25/19
to Hans Wennborg, dean...@google.com, Chromium-dev, Daniel Cheng
On Wed, Sep 25, 2019 at 2:42 AM Hans Wennborg <ha...@chromium.org> wrote:
My understanding is that absl isn't used by Chromium, except that some
third-party libraries depend on it.

That's also my understanding.  There have been numerous discussions on cxx@ and elsewhere over the past year, since various bits of absl would be interesting (e.g. variant); the last word I heard was in April where dcheng@ was going to try to drive some kind of stakeholder agreement (or so I thought).  But barring changes, absl is banned AFAIK.

PK

Mirko Bonadei

unread,
Sep 25, 2019, 6:12:50 AM9/25/19
to pkas...@chromium.org, Hans Wennborg, dean...@google.com, Chromium-dev, Daniel Cheng, Gabriel Charette
As of today WebRTC is the only project that can use Abseil in Chromium because Abseil doesn't mark symbols as exported and this complicates the component build support (there is a small exception for openscreen since they need to use things without globals but aside from that visibility is locked down, see here).
I have been discussing with Abseil about this but lately I have been busy trying to finish the WebRTC component build support. On top of that there are other issues dcheng@ was working on (also gab@ has context on that). 

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFD178y72kJ8m6UrS6bodog5-TDvTN9fuxrmdKWWmPqfFQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages