Chris Bracken 88f8104411
Eliminate platform-specific logging in core engine (#164522)
In f4d1c89df1329f8b868812e360409ec06f7abed1 (flutter/engine#25402),
logging was extracted into the embedder API. In subsequent patches, this
logic was extracted into the iOS, Android, macOS, Windows, and Linux
embedders. The platform-specific fallback logging in `ui_dart_state.cc`
is therefore no longer necessary and should not exist in the
platform-portable engine.

For referece, platform-specific logging can now be found in the
following locations:

iOS:
060e159d53/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm (L74-L84)

Android:
ad3d8f5934/engine/src/flutter/shell/platform/android/flutter_main.cc (L175-L179)

Embedder API:
ad3d8f5934/engine/src/flutter/shell/platform/embedder/embedder.cc (L2096-L2104)

macOS: 

ad3d8f5934/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm (L643-L649)

Windows and Linux are extracted in this patch, and the fallback to log
to stdout is moved into the embedder API shim.

No test changes since this is a refactoring with no behaviour changes,
and covered by existing tests, such as:

ad3d8f5934/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTest.mm (L205-L225)

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-03-04 02:34:32 +00:00
..

Flutter Engine

Setting up the Engine development environment

See here

gclient bootstrap

Flutter engine uses gclient to manage dependencies.

If you've already cloned the flutter repository:

  1. Copy one of the engine/scripts/*.gclient to the root folder as .gclient:
    1. Googlers: copy rbe.gclient to enable faster builds with RBE
    2. Everyone else: copy standard.gclient
  2. run gclient sync from the root folder