Skip to content

Add ABSL to flutter/engine #134741

@gaaclarke

Description

@gaaclarke

The Google C++ style guide recommends the usage of absl in many cases but we do not have it available in the flutter engine. In some cases this has caused us to duplicate and maintain similar functionality in fml (example: fml::SharedMutex and fml::Status), in other cases it has hurt our designs (example: IsValid() methods in impeller instead of using absl::status_or).

@zanderso has made a good point that we should be careful about binary size. This could be a problem especially if we use absl's offerings simultaneously with fml offerings which is complicated by the upfront cost to migrate existing code.

Chromium has already adopted absl so it should be easy to drop in technically.

There may some functionality in absl that doesn't exist today that could help us too. I don't have experience with absl::GetStackTrace, but just the other day a user was asking for stacktraces when debugging c++ asserts. If that works on any of our target platforms that could save us some debugging time too if FML_CHECK's print out the stacktrace in debug builds. I didn't explore more potential usages since what I've listed already seems valuable enough.

cc @matanlurey

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions