1291 Commits

Author SHA1 Message Date
Chinmay Garde
b5bc4a3868 Remove the DBC interpreter flag. (flutter/engine#53204)
Cleanup of unused flag.
2024-06-05 23:29:16 +00:00
Filip Filmar
2b043806f5 [icu] Manual roll of icu (flutter/engine#53199)
Manual roll of the ICU library. This normally happens automatically, but this
time around, ICU folks changed their license, so that needs to be fixed up.
I wish they would stop doing that. :)

This manual change should enable us to turn the auto-roller back on.

https://github.com/flutter/flutter/issues/149684

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-06-05 15:11:17 +00:00
John McDole
edeabda41b Remove RBE crud compile_commands.json (flutter/engine#53135)
Removes reported errors in VSCode when using `clangd`

* Parsing a 21MB json string is not performant
* RegExp replacing all occurrences in said 21MB string is (~61ms)
* Fixes #147767
2024-05-31 21:20:51 +00:00
Reid Baker
02d2b7c8e1 Google java format relocation and formatting update (flutter/engine#53118)
Fixes https://github.com/flutter/flutter/issues/149319
Caused by https://github.com/flutter/engine/pull/52582

Follow up required to add a flag that fails on missing jar files instead of skipping missing jar files.
2024-05-31 18:09:23 +00:00
Jonny Wang
cbe5184edf Fuchsia api level 18 (flutter/engine#53115)
b/335285098
## 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] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [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/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-05-30 19:26:47 +01:00
Gray Mackall
dab310ecb8 Manual revert of #53001 (flutter/engine#53075)
Revert label failed due to conflicts

`FlutterFragmentTest.java` was the only file that had merge issues, everything else is the output of `git revert 802e5d2cd3c9e73f336e3fe43487b64a5fdf98d8`

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-05-28 23:00:20 +00:00
Chinmay Garde
829947077f Remove --ios-cpu flag. Only the arm64 variant is supported. (flutter/engine#53044)
We don't support 32-bit arm iOS builds anymore. But adding the --ios-cpu=arm64 appends the "_arm" to the out subdirectory. This just causes confusion since the ios_debug_unopt is still arm64.

Just remove the flag that does nothing.
2024-05-28 22:26:16 +00:00
Gray Mackall
802e5d2cd3 Upgrade all[most] androidx dependencies to latest (flutter/engine#53001)
Upgrades every `androidx` dependency in the `src/third_party/android_embedding_dependencies` bundle to the latest version, except the `lifecycle` group*. Tested running a couple of apps as well because when updating these dependencies in the past I've been able to build the engine but then flutter run fail when trying to run an app.

Fixes https://github.com/flutter/flutter/issues/129307, also unblocks a feature that will eventually be needed for Scribe.

[*]`2.8.0` is the latest there, but I ran into an issue with dexing when I tried to upgrade, due to b/336164417, an AGP bug that had its fix backported to all >`8.0.0` versions, but we still support less than that so we will have to wait on that upgrade.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-05-28 16:58:59 +00:00
John McCutchan
88b596ca64 Reduce rebuild times when invoking 'et run' (flutter/engine#52883)
Android only for now but this avoids rebuilding a bunch of test targets that aren't necessary to do a `flutter run` with a custom engine.

I need to fill in some blanks for other platforms before landing.
2024-05-22 17:49:05 +00:00
Chinmay Garde
4e5093707f Remove --trace-gn from ./flutter/tools/gn (flutter/engine#52964)
This flag as originally introduced to see if it made the GN step slower. It did not do so in any measurable manner and the default was flipped to true. AFAICT, no one disables and its good to have tracelogs to debug GN slowdowns. Remove the flag.
2024-05-21 19:35:46 +00:00
Chinmay Garde
d746daecc1 [Impeller] Remove unused GN flags. (flutter/engine#52962)
Removes impeller_capture, impeller_use_prebuilt_impellerc, impeller_use_prebuilt_scenec, and impeller_trace_canvas.

Also removes setting these flags from ./flutter/tools/gn.
2024-05-21 19:25:59 +00:00
Matan Lurey
b0e791fce3 et generates {out}/{buildName} if missing on et {build|test|query} (flutter/engine#52866)
Closes https://github.com/flutter/flutter/issues/148442.

This restores functionality that existed prior in https://github.com/flutter/engine/pull/52832:

- Splits `runGn` to `ensureBuildDir`, which is in practice what it does.
2024-05-16 04:03:21 +00:00
Matan Lurey
eafc52c37d Include stdout on a failed gn desc call, and test for it. (flutter/engine#52863)
Fixes https://github.com/flutter/flutter/issues/148431, in that full error output is now shown.

I also filed an additional issue for how we could do better: https://github.com/flutter/flutter/issues/148442.
2024-05-16 01:09:13 +00:00
Matan Lurey
cb19eac08e Short-circuit crawling all targets in et {build|test|query} (flutter/engine#52832)
Closes https://github.com/flutter/flutter/issues/147666.

This is a large change, I'd be happy to either review synchronously or
change commands one at a time, but I think this is overall the right
approach. I also didn't see any reason to reuse the `BuildRunner` code
for these commands, the flow is basically:

```mermaid
graph LR
    A[et targetsOrPatterns] --> B[gn desc --format=json]
    B --> C[existing code that runs ninja/workers]
```

Quick summary of changes:
- Introduced a [`Label` and `TargetPattern`][1] type to avoid awkward
string parsing/manipulation all over
- Replaced `gn_utils` (i.e. `targetsFromCommandLine` and friends) with
[an invocation of `gn desc`][2]
- Some tests were brittle in terms of expected output, I mostly left
them alone and wrote TODOs where applicable

Here is the fun part, results (and some manual integration tests):
```sh
# build, previously was 10-15s, is now ~3s
flutter % time et build -c host_debug_unopt_arm64 //flutter/impeller:impeller_unittests
[2024-05-14T19:05:55.163][macos/host_debug_unopt_arm64: GN]: OK
[2024-05-14T19:05:56.119][macos/host_debug_unopt_arm64: RBE startup]: Proxy started successfully.
[macos/host_debug_unopt_arm64: ninja] 0.0% (0/1) Regenerating ninja files[2024-05-14T19:05:57.309][macos/host_debug_unopt_arm64: ninja]: OK
[2024-05-14T19:05:57.573][macos/host_debug_unopt_arm64: RBE shutdown]: Actions completed: 0
$ENGINE/flutter/bin/et build -c host_debug_unopt_arm64   3.20s user 0.87s system 107% cpu 3.776 total

# test, also benefits from speedup, but I didn't time it
flutter % et test -c host_debug_unopt_arm64 //flutter/fml:fml_unittests
[2024-05-14T19:07:01.843][macos/host_debug_unopt_arm64: GN]: OK
[2024-05-14T19:07:02.707][macos/host_debug_unopt_arm64: RBE startup]: Proxy started successfully.
[2024-05-14T19:07:07.400][macos/host_debug_unopt_arm64: ninja]: 100.0% (3/3) LINK ./fml_unittests
[2024-05-14T19:07:07.404][macos/host_debug_unopt_arm64: ninja]: OK
[2024-05-14T19:07:07.748][macos/host_debug_unopt_arm64: RBE shutdown]: Actions completed: 1 (1 racing local)
OKAY:         7s.95ms //flutter/fml:fml_unittests

# query, also benefits from speedup
flutter % time et query targets -c host_debug_unopt_arm64
//flutter/display_list:display_list_benchmarks
//flutter/display_list:display_list_builder_benchmarks
# ... many targets omitted ...
$ENGINE/flutter/bin/et query targets -c host_debug_unopt_arm64  1.27s user 0.18s system 147% cpu 0.978 total
```

In other words, ~5x improvement on `et build` and `et query` is _much_
faster as well.

[1]:
https://github.com/flutter/engine/compare/main...matanlurey:engine:gn-label?expand=1#diff-ac008475ce9e209f4ecf6594b0cd48d12d86a1ffa0aa7d555375ff43b983eb2b
[2]:
https://github.com/flutter/engine/compare/main...matanlurey:engine:gn-label?expand=1#diff-ad116b8504dd0a500bf758a327c7052e5733a2b465d3295e35b74458d483276f
2024-05-15 12:57:02 -07:00
Zachary Anderson
cd9cf6d62b [et] Print reproxy stats when RBE shuts down (flutter/engine#52818)
```
$ bin/et build -c ci/android_release_arm64                                                                                      ─╯
[2024-05-14T11:28:40.856][ci/android_release_arm64: GN]: OK
[2024-05-14T11:28:42.527][ci/android_release_arm64: RBE startup]: Proxy started successfully.
[2024-05-14T11:31:14.869][ci/android_release_arm64: ninja]: 100.0% (1096/1096) STAMP obj/flutter/lib/snapshot/snapshot.stamp
[2024-05-14T11:31:14.871][ci/android_release_arm64: ninja]: OK
[2024-05-14T11:31:15.182][ci/android_release_arm64: RBE shutdown]: Actions completed: 1021 (569 racing locals, 452 racing remotes)
```
2024-05-14 14:15:10 -07:00
Jason Simmons
6ee57afaf3 Migrate third_party/gradle to flutter/third_party/gradle (flutter/engine#52814)
Based on https://github.com/flutter/engine/pull/52030
2024-05-14 20:51:10 +00:00
Matan Lurey
d89f54dd65 Replace json_utils with a modern extension type, add tests. (flutter/engine#52769)
I started on a refactoring of
https://github.com/flutter/flutter/issues/147666, and was frustrated
with the JSON decoding of `gn desc --format=json`, so I used a similar
pattern from my micro-json library (https://pub.dev/packages/jsonut) and
encapsulated it as an extension type.

My favorite is the `JsonObject.map` function which replaces:

```dart
/// Construct a RunTarget from a JSON map.
factory RunTarget.fromJson(Map<String, Object> map) {
  final List<String> errors = <String>[];
  final String name = stringOfJson(map, _nameKey, errors)!;
  final String id = stringOfJson(map, _idKey, errors)!;
  final String targetPlatform =
      stringOfJson(map, _targetPlatformKey, errors)!;

  if (errors.isNotEmpty) {
    throw FormatException('Failed to parse RunTarget: ${errors.join('\n')}');
  }
  return RunTarget._(name, id, targetPlatform);
}
```

... with:

```dart
/// Construct a RunTarget from a JSON map.
factory RunTarget.fromJson(Map<String, Object> map) {
  return JsonObject(map).map((JsonObject json) => RunTarget._(
    json.string(_nameKey),
    json.string(_idKey),
    json.string(_targetPlatformKey),
  ));
}
```
2024-05-13 20:03:43 -07:00
Jason Simmons
3c17cf0357 Move libcxx to //flutter/third_party (flutter/engine#52773)
Fixes https://github.com/flutter/flutter/issues/144202
2024-05-13 19:26:04 -07:00
Chinmay Garde
f20b17a2ae [Impeller] Prepare a SkiaGPU-less iOS build. (flutter/engine#52748)
The size of the LTO build of the engine with the dylib compressed is as follows:

```sh
$ du -k libFlutter*
5236	libFlutter.dylib.tar.gz
4324	libFlutterSlimpeller.dylib.tar.gz
```

Sizes are in KiB. This represents a binary size reduction of 17.41% of the compressed artifacts. The compression ratios will likely differ based on the compression scheme.

Uncompressed, the sizes are:

```sh
$ du -k libFlutter*
16920	libFlutter.dylib
14044	libFlutterSlimpeller.dylib
```

This represents a binary size reduction of 16.99% which is in the same ballpark.

The really mucky bit was backing out the raster cache and persistent cache. I want to clean that up in a later patch so that those TUs are part of a separate submodule.

Opting out of Impeller will lead to a fatal log at startup saying the opt-out is disallowed.

Fixes https://github.com/flutter/flutter/issues/126606
2024-05-13 21:43:47 +00:00
Zachary Anderson
a1257de605 Simplify GN pools, use in more places (flutter/engine#52721)
This PR changes from using a different GN pool for each non-compiler tool, to using one GN pool for everything.

Additionally, since we are no longer linking remotely in any configuration, this PR uses the pool for linking.

ObjC and impellerc tasks also do not (yet) run on RBE, so they are also now governed by the pool.

Needs https://github.com/flutter/buildroot/pull/856
2024-05-10 22:43:23 +00:00
Matan Lurey
0a503306d4 Infer --rbe based on the existence of //flutter/build/rbe (flutter/engine#52700)
Closes https://github.com/flutter/flutter/issues/148006.
2024-05-10 11:49:44 -07:00
Matan Lurey
8ce9cf6200 When et is not attached to a terminal, still split lines for status updates. (flutter/engine#52681)
For illustrative purposes:

```sh
$ et build | grep '.*'
```

... should still get line-per-line status updates, but it does not without this patch.

It's hard to write tests because of global state, so I've declined to do so at the moment.

Closes https://github.com/flutter/flutter/issues/147903.
2024-05-09 18:09:05 +00:00
Zachary Anderson
f1ac521788 Roll reclient forward (flutter/engine#52632)
For https://github.com/flutter/flutter/issues/147750.

Depends on https://github.com/flutter/buildroot/pull/852.

This PR rolls forward reclient, the buildroot, and our RBE configs. The
new RBE configs do a few things. First they default the exec strategy to
`racing`. Second, they add a local wrapper script that passes the
correct value for `-fdebug-prefix-map` in both the local and remote
cases. Finally, they remove the canonicalization of the build's working
directory, so that the remote working directory will have the same name
as the local working directory. This solves the issue where the build
working directory contained a mysterious `set_by_reclient/a` component.
2024-05-08 08:07:25 -07:00
Matan Lurey
05ff169def Move Logger.test to an injected log output versus leaky abstraction. (flutter/engine#52639)
Previously, `Logger.test` was a leaky abstraction that stored a `@visibleForTesting` variable that was sometimes unused. It saved a few lines of code for tests, but doesn't seem necessary, so I swapped it out for a callback.
2024-05-07 22:56:17 +00:00
Matan Lurey
ea78cc7551 Move setting the logging level into the Logger constructor, refactor. (flutter/engine#52624)
Based on @zanderso's feedback here: https://github.com/flutter/engine/pull/52619#discussion_r1592868979.

I think this is the most succinct way to setup logging, it also doesn't seem to make sense to allow the level to be configured at runtime, so boom.
2024-05-07 21:00:54 +00:00
Matan Lurey
8618834019 Move verbose to environment.verbose, pass to ninja --verbose if provided. (flutter/engine#52619)
Closes https://github.com/flutter/flutter/issues/147894.

While doing this PR I realized we were basically passing `(bool verbose, Envrionment)` as a tuple around, so I just moved the concept _into_ `Environment` directly, and made the necessary code changes across the tool and tests.

To clarify, this does _not_ mimic the output of `ninja --verbose` _today_, because we also don't stream the output directly, and instead do terminal magic. Combined with a hypothetical fix for https://github.com/flutter/flutter/issues/147903, this would work exactly the same as before.

/cc @loic-sharma @johnmccutchan
2024-05-07 19:07:31 +00:00
Jason Simmons
c1e5a9c1a3 Migrate third_party/android_tools to flutter/third_party (flutter/engine#52582)
Continuation of https://github.com/flutter/engine/pull/52034
2024-05-06 20:54:06 +00:00
Jason Simmons
6964119253 Skip files in the clang-tidy driver if clang-tidy crashes when processing the file (flutter/engine#52379)
Recent versions of clang-tidy have been segfaulting when processing a few of the engine source files.  This patch skips over those errors so that the engine can roll Clang.

See https://github.com/flutter/flutter/issues/143178
2024-05-06 14:48:53 +00:00
Brandon DeRosier
dfed7164a1 et phone home (flutter/engine#52506)
<img width="684" alt="image" src="https://github.com/flutter/engine/assets/919017/2dcdc7e9-b0e1-434d-9078-1de6a3d57d35">
2024-05-02 01:36:30 +00:00
John McCutchan
1c441f353d Fix et run (flutter/engine#52477)
et run was broken in https://github.com/flutter/engine/pull/51803

this PR adds the missing calls to mangledConfigName before invoking flutter run
2024-05-01 14:20:04 +00:00
Zachary Anderson
448613ae74 Remove references to goma (flutter/engine#52411)
This removes goma most places except for the arguments to the `gn`
script, which are referenced by recipes. This does not remove goma
capabilities from the GN build entirely. That requires changes in the
buildroot which have to be staged after this change.
2024-04-29 09:40:16 -07:00
Jenn Magder
59cd6af303 Remove "gclient sync" warning call during pre-rebase (flutter/engine#52342)
Remove `pre-rebase` check from `gclient sync` warning, and instead remove the warning call from `pre_rebase_command`

Follow-up to https://github.com/flutter/engine/pull/52133#discussion_r1575447161
2024-04-25 23:12:03 +00:00
Zachary Anderson
c04e13ac47 Remove goma support from impeller-cmake-example (flutter/engine#52390) 2024-04-25 10:05:23 -07:00
Jason Simmons
97993d97a3 Move zlib to //flutter/third_party (flutter/engine#52366)
Fixes https://github.com/flutter/flutter/issues/146598
2024-04-24 21:07:47 +00:00
Zachary Anderson
f1ac2c5650 [et] Don't require the --verbose flag when requesting a ci/ build (flutter/engine#52339)
https://github.com/flutter/engine/pull/52021 introduced a bug where `ci`
build could only be specified when also passing the `--verbose` flag.
This PR fixes the issue so that by default the `help` message will only
show `ci` builds when `--verbose` is passed to `help`, but the `ci`
builds can be specified even without the `--verbose` flag.
2024-04-23 16:46:11 -07:00
Chris Bracken
2929b70726 Add containsCommand matcher (flutter/engine#52306)
Adds a `Matcher` that can be used against a `List<ExecutedProcess>` to check if a command that matches a predicate was executed. Fails if no such command was found.

An alternative would be to take a single regex instead of a closure.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-04-23 21:23:05 +00:00
Jonny Wang
b6195c24e7 [fuchsia] Update Fuchsia API version to 17 (flutter/engine#52266)
Update Fuchsia API version to 17

b/328121174

Changes are tested on device and in google3 in cl/626319415.

## 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] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [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/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-04-23 13:38:47 +01:00
Kaylee Lubick
17a78534c6 [skia] Remove no-op GN flag (flutter/engine#52121)
After <https://skia-review.googlesource.com/c/skia/+/826440> this flag
does nothing.

## 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] and the [C++,
Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [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/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-04-23 07:57:59 -04:00
Chris Bracken
0ce6126c47 [et] Lookup output filesystem path, not label (flutter/engine#52248)
Sets BuildTarget.executable to the `root_out_dir`-relative path of the
executable (e.g. `displaylist_unittests`) instead of its label (e.g.
`//out/host_debug/displaylist_unittests`). This is required since, in
the lines following the output lookup, we assume it to be a path
relative to the build output directory.

Also breaks out functions for:
* `_runGnDesc`: returns the JSON output of `gn desc buildDir target`
* `_runGnOutputs`: returns the output files listed by `gn outputs
buildDir target`

Noticed while working on:
https://github.com/flutter/flutter/issues/147071

## 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] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [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/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-04-22 11:13:16 -07:00
Chris Bracken
c9f3a89bf4 [et] Fix concurrent modification exception (flutter/engine#52247)
We cannot modify the list of build targets as we're iterating over it. Instead of removing non-test/non-executable elements, instead we add executable test targets to a separate testTargets list and use that.

Noticed while working on: https://github.com/flutter/flutter/issues/147071

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-04-20 03:40:59 +00:00
Jason Simmons
50771f3ad4 Roll reclient, libpng, and zlib (flutter/engine#52072)
Based on https://github.com/flutter/engine/pull/52067
2024-04-16 18:31:30 +00:00
Jenn Magder
cd1aa8d667 Only print "gclient sync" warning once during rebase (flutter/engine#52133)
Skip the "pre-rebase" message since it will also be printed "post-checkout" at the end.

Fixes https://github.com/flutter/flutter/issues/146781

Before this PR:

![rebase](https://github.com/flutter/engine/assets/682784/db7279c7-ca27-4ccf-9f6b-f9c4ad10c20a)

On this PR it's only printed once

![Screenshot 2024-04-15 at 2 06 24 PM](https://github.com/flutter/engine/assets/682784/bc80a6bc-9fd9-447f-b060-18f3a5b05775)

Fixes https://github.com/flutter/flutter/issues/146781
2024-04-16 18:03:20 +00:00
Jason Simmons
595f6bd256 Roll buildroot and set ios_use_simulator variable used by Skia GN scripts (flutter/engine#52101) 2024-04-15 17:54:04 +00:00
Zachary Anderson
0b6ce345a3 [et] Correctly plumb usage line length limit (flutter/engine#52039)
The `Command`s added to a `CommandRunner` don't automatically inherit
the `CommandRunner`'s usage line length limit. This PR does the
necessary plumbing. Help messages look nicer now.
2024-04-11 08:39:05 -07:00
William Hesse
05c21a0c8e Add additional dependencies to const_finder's pubspec.yaml (flutter/engine#52033)
The Dart commit https://dart-review.googlesource.com/c/sdk/+/361781 added dependencies upon packages meta and _fe_analyzer_shared to the kernel package.  Path overrides for these need to be added to the const_finder package in flutter/engine.
2024-04-10 21:22:22 +00:00
Zachary Anderson
2163fc1bc9 [et] Adds --lto flag to build. Plumbs verbose flag differently. (flutter/engine#52021)
This PR does two things. First, in many of the `ci` builds, LTO is
enabled by default. This is usually not what we want when doing local
builds, so this PR adds an `--lto` flag to the `build` command which is
disabled by default, causing `--no-lto` to be passed to GN. When `--lto`
is passed to the `build` command, `--lto` is passed to GN, which results
in the build using LTO.

Second, this PR eagerly parses the `--verbose` flag out of the command
line so that help messages can optionally show less information. In
particular, in this PR, `ci` and `web_test` builds are only displayed by
`help build` when `--verbose` is passed to the `help` command. There's
some extra text in the help message as well indicating that passing
`--verbose` to `help` will show more builds.
2024-04-10 11:09:14 -07:00
auto-submit[bot]
c0bd2a3ce0 Reverts "Delete engine v1 android embedding (#51229)" (flutter/engine#51996)
Reverts: flutter/engine#51229
Initiated by: gmackall
Reason for reverting: blocking engine->framework roll (I missed some framework code referencing the v1 embedding).
Original PR Author: gmackall

Reviewed By: {matanlurey, reidbaker}

This change reverts the following previous change:
Fixes https://github.com/flutter/flutter/issues/143531

Also fixes a random typo I found

~TODO to test this~ (no more todo):
-~test the framework against this as well, probably with a dummy PR changing the engine commit to my branch if this is possible~ not possible, made a best effort removal of framework code in https://github.com/flutter/flutter/pull/144726.
-~figure out if the old embedding is used in g3 at all~ removed all uses
-~figure out exactly what the ShimPluginRegistry/ShimRegistrar are doing, and if fully deleting them was right~ (see https://github.com/flutter/engine/pull/51229#issuecomment-1981757743)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-04-09 19:13:47 +00:00
Gray Mackall
797e1ad902 Delete engine v1 android embedding (flutter/engine#51229)
Fixes https://github.com/flutter/flutter/issues/143531

Also fixes a random typo I found

TODO to test this:
-test the framework against this as well, probably with a dummy PR changing the engine commit to my branch if this is possible
-figure out if the old embedding is used in g3 at all
-~figure out exactly what the ShimPluginRegistry/ShimRegistrar are doing, and if fully deleting them was right~ (see https://github.com/flutter/engine/pull/51229#issuecomment-1981757743)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-04-09 18:03:17 +00:00
Jason Simmons
f745408809 Move the Dart SDK to //flutter/third_party/dart (flutter/engine#51917) 2024-04-09 12:48:09 +00:00
Zachary Anderson
785386dc2f [et] Run GN before looking for targets. Default to build config targets (flutter/engine#51956)
Addresses the notes I left on
https://github.com/flutter/engine/pull/51868. Mainly fixes an issue in
which the `build`, `query`, and `test` commands would fail if GN had not
yet been run for the requested configuration. Instead, in this PR, if
the build output directory doesn't exist yet, then it will run GN before
querying the targets.

Additionally, for the `build` command, if no targets are specified on
the command line, the PR uses the targets in the build config as the
default rather than all targets. `query` and `test` keep the same
behavior.
2024-04-08 13:26:57 -07:00