1262 Commits

Author SHA1 Message Date
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
Jason Simmons
209b89244a Use the AOT snapshot built by the Dart SDK for the frontend server (flutter/engine#51943)
Dart will be removing the frontend server JIT snapshot.
(see https://dart.googlesource.com/sdk/+/e6c9eaaf6b63e5d3d0eefd7e95df9d10d9a25569)
2024-04-08 18:38:03 +00:00
Zachary Anderson
a7eaa48c9a Adds human readable descriptions to build configs (flutter/engine#51929)
Step 4 of https://github.com/flutter/flutter/issues/145263

Hopefully these descriptions will be more useful than the list of GN
args.
2024-04-05 13:43:04 -07:00
Zachary Anderson
72ea5c99e3 [et] Fixup help text a bit (flutter/engine#51930)
The multiline string literal retains the newlines.
2024-04-05 09:23:12 -07:00
auto-submit[bot]
ee494ad4dd Reverts "Manual Dart roll to 0ac840ba1 and update frontend server snapshot filename (#51921)" (flutter/engine#51927)
Reverts: flutter/engine#51921
Initiated by: zanderso
Reason for reverting: This Dart roll is blocking the roll of the engine to the framework. Unblocking the rolls depends on addressing https://github.com/flutter/flutter/issues/146164.
Original PR Author: jason-simmons

Reviewed By: {zanderso, jonahwilliams}

This change reverts the following previous change:
The Dart SDK is now only building an AOT snapshot for the frontend server (see https://dart-review.googlesource.com/c/sdk/+/359100)
2024-04-05 02:27:25 +00:00
Jason Simmons
564fc1e2d4 Manual Dart roll to 0ac840ba1 and update frontend server snapshot filename (flutter/engine#51921)
The Dart SDK is now only building an AOT snapshot for the frontend server (see https://dart-review.googlesource.com/c/sdk/+/359100)
2024-04-04 22:14:02 +00:00
John McCutchan
6b4db1f60a Expand understanding of build targets in et (flutter/engine#51868)
- s/TestTarget/BuildTarget.
- Use a more informative way of querying for build targets from gn
- Port existing code to use new interfaces
- Replace 'query tests' with 'query targets' and a --testonly flag
- Extend 'et build' with support for build target selectors.
- Extend 'et query targets' with support for build target selectors.
2024-04-04 11:28:04 -07:00
Zachary Anderson
87162bdc8a [et] Prepare local_engine.json for CI, teach et to understand local build names (flutter/engine#51803)
This is steps (2) and (3) of
https://github.com/flutter/flutter/issues/145263.

The next steps after this are to:
1. Fix any issues that come up when running `local_engine.json` in CI.
1. Step (4) of https://github.com/flutter/flutter/issues/145263
1. Fill in some missing builds in `local_engine.json`.
2024-04-02 19:21:15 -07:00
Chinmay Garde
2a07f9e53a Allow creating slimpeller engine variants. (flutter/engine#51824)
Fixes https://github.com/flutter/flutter/issues/144432
2024-04-02 20:21:53 +00:00
Matan Lurey
a16ee1a7ac Remove testing/android_background_image which does not run/exist on CI. (flutter/engine#51815)
I am guessing this just either served it's purpose (https://github.com/flutter/flutter/issues/26654, https://github.com/flutter/flutter/issues/26728) or didn't and was never followed up. I can't find any examples of it running on CI - I suspect if we want a test like this, we're better off just adding it to `scenario_app` versus creating more 1-off Android integration test environments.
2024-04-01 18:59:50 +00:00
Zachary Anderson
2512c698ae Prefix non-local build config names with ci/ (flutter/engine#51474)
Part 1 of https://github.com/flutter/flutter/issues/145263

This PR updates the names of builds outside of `local_engine.json` to be
prefixed with the string `ci/` (or `ci\` on Windows). For better or
worse, the "name" field of a build is used to construct a path used as
the source directory of a copy operation (I think the CAS archive
step?). Because of that, changing the name of a build also requires
updating the build output directory of the ninja build.

This PR also adds tests to make sure the naming of these builds remains
consistent.
2024-03-31 12:43:02 -07:00
Matan Lurey
42daa3bb56 Add a minimal example of using package:test. (flutter/engine#51726)
Work towards https://github.com/flutter/flutter/issues/133569.

This PR is a proof of concept that shows we're able to use `package:test` in `flutter/engine` instead of `package:litetest`.

I think it also shows that, if we're going to continue to vend dependencies this way, we might want to re-think our strategy in terms of using `pub` as a management tool - it's quite unwieldy already. For example, here is every `pubspec.yaml` file in the repo:

```sh
$ find . -name 'pubspec.yaml' -exec sh -c 'echo "$0 $(wc -l < "$0")"' {} \;

# Some files omitted in third_party or similar.
./impeller/tessellator/dart/pubspec.yaml       11
./tools/const_finder/pubspec.yaml       35
./tools/api_check/pubspec.yaml       90
./tools/build_bucket_golden_scraper/pubspec.yaml       47
./tools/licenses/pubspec.yaml       53
./tools/path_ops/dart/pubspec.yaml       26
./tools/engine_tool/pubspec.yaml       76
./tools/dir_contents_diff/pubspec.yaml       19
./tools/compare_goldens/pubspec.yaml        3
./tools/golden_tests_harvester/pubspec.yaml       55
./tools/gen_web_locale_keymap/pubspec.yaml       37
./tools/githooks/pubspec.yaml       63
./tools/android_lint/pubspec.yaml       35
./tools/clang_tidy/pubspec.yaml       76
./tools/pkg/engine_repo_tools/pubspec.yaml       41
./tools/pkg/process_fakes/pubspec.yaml       36
./tools/pkg/engine_build_configs/pubspec.yaml       73
./tools/pkg/git_repo_tools/pubspec.yaml       60
./tools/header_guard_check/pubspec.yaml       70
./sky/packages/sky_engine/pubspec.yaml        8
./shell/vmservice/pubspec.yaml        8
./ci/pubspec.yaml       57
./testing/benchmark/pubspec.yaml       77
./testing/skia_gold_client/pubspec.yaml       66
./testing/pkg_test_demo/pubspec.yaml      116
./testing/smoke_test_failure/pubspec.yaml       31
./testing/dart/pubspec.yaml       71
./testing/android_background_image/pubspec.yaml       22
./testing/litetest/pubspec.yaml       33
./testing/symbols/pubspec.yaml       24
./testing/scenario_app/pubspec.yaml       67
./web_sdk/web_engine_tester/pubspec.yaml       14
./web_sdk/web_test_utils/pubspec.yaml       22
./web_sdk/pubspec.yaml       60
./lib/snapshot/pubspec.yaml        8
./lib/gpu/pubspec.yaml       14
./lib/web_ui/pubspec.yaml       60
./flutter_frontend_server/pubspec.yaml       39
```

I'll file a follow-up issue to discuss pub-package management in the engine.
2024-03-29 18:44:04 +00:00
John McCutchan
7245fef9ad Add et query tests and et test commands (flutter/engine#51605)
- `et query tests` enumerates all test binaries encoded in BUILD.gn
files.
- `et test` builds, then, runs a set of tests in parallel
- Tests
2024-03-28 16:11:24 -07:00
Matan Lurey
0141f514a4 Test that clangd --check works at HEAD. (flutter/engine#50901)
Closes https://github.com/flutter/flutter/issues/141641.

Basically, this should verify "it's possible to use VSCode+LSC, at least in theory".

I'm open to writing a test, but given it _is_ a test I'm less sure it's valuable. Feel free to push back.
2024-03-28 21:05:24 +00:00
Jason Simmons
7ab0f69480 Add local paths for the Dart macros package, which is now a dependency of the analyzer package (flutter/engine#51709) 2024-03-27 17:27:02 +00:00
lauren n. liberda
8e74e57981 font_subset tests: name correct variant in exception (flutter/engine#51492)
font_subset tests now respect `--variant`, but the exception message hasn't been changed

*List which issues are fixed by this PR. You must list at least one issue.*
closes https://github.com/flutter/flutter/issues/145412

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-25 17:39:13 +00:00
Gray Mackall
48710ab05d Make the et feature request link properly add the github label (flutter/engine#51594)
The label has a space in it, so it doesn't get properly added with the current link.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-21 23:34:06 +00:00
Jason Simmons
762d37fd2e Move //buildtools to //flutter/buildtools (flutter/engine#51526) 2024-03-21 17:06:44 +00:00
gaaclarke
d527dd959e [golden_test_harvester]: Put back sending the dimensions to the SkiaGoldClient (flutter/engine#51536)
fixes https://github.com/flutter/flutter/issues/145413

## 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-03-20 15:49:16 -07:00
zijiehe@
1b0240f093 [Fuchsia] Remove the legacy tools/fuchsia/target_api_level file (flutter/engine#51497)
After https://github.com/flutter/buildroot/pull/839, the fuchsia_target_api_level becomes a variable in `build/config/fuchsia/gn_configs.gni`, so the target_api_level file and the related gn-args are obsolete and can be removed.

Since this change will also bring e9c4eebe21 in, add @jason-simmons as one of the reviewers.

Bug: http://b/40935282

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-19 17:36:14 +00:00
Brandon Castellano
37c82da210 Update fuchsia_libs.gni (flutter/engine#51447)
### Motivation of the change:

The Fuchsia SDK target //sdk/lib/vfs/cpp is being migrated to a shared
library in https://fxrev.dev/981373. The shared library has already been
included in the SDK as a dependency, but is missing from the OOT copies
of the runners used in tests
([shell/platform/fuchsia/flutter/BUILD.gn](https://github.com/flutter/engine/blob/main/shell/platform/fuchsia/flutter/BUILD.gn)).
This change adds the missing .so to these prebuilts.

### Blocking issue:

As part of an ongoing Fuchsia SDK migration effort, this library
requires migration in order to continue ongoing maintenance efforts. See
https://fxbug.dev/293936429 for details.

### Solutions:

This library is already included licensed under the exsting Fuchsia SDK
license. It can be verified as already existing in the distributed IDKs
due to it being added as a dependency early. The OOT test archives are
the last remaining step before switching the library to start using the
new .so.

Bug: [b/293936429](https://fxbug.dev/293936429)

FYI: @zijiehe

## 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]. (I am a Googler)
* [x]  All existing and new tests are passing.

<!-- 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-03-19 09:42:59 -07:00
Chinmay Garde
cf0b9e869c A native Android unit-testing harness. (flutter/engine#51479)
Sets up rules to create an APK that is comprised of solely native code. Existing executable targets (like GTests) can then use this to run on Android devices while having access to activities, windows, etc.. This allows for broader test coverage. Basically, anything that needed an ANativeWindow could only be tested in an integration test.

Executables that need access to the native activity must provide an implementation of `NativeActivityMain` that returns a custom subclass of `flutter::NativeActivity`. The `native_activity_apk` reads like an `executable` or `shared_library` target. Just one that packages that executable in an APK.

The APK is built using the Android Tools and does not use Gradle. Creating a new APK after invalidating some code takes ~200ms on my machine. The edit, compile, run cycle for only a tiny bit worse than testing on the host.

Builds on top of this new infrastructure to create a `GTestActivity` that runs an existing test suites. This works really well except the GTest suite logs to `STDOUT` whereas the engine logs to `logcat`. To quickly work around this, a custom test status listener has been wired up. This only displays the test results to logcat today but a similar mechanism can be used to talk to the test runner in the host. I will wire this up in an upcoming patch as there is no hooks into this from CI right now.

Creates an APK variant of the `impeller_toolkit_android_unittests` harness.
2024-03-18 22:32:08 +00:00
Zachary Anderson
66fa3dd66c Pass some missing --disable-dart-dev and --suppress-analytics to dart (flutter/engine#51473) 2024-03-17 08:46:11 -07:00
Jim Graham
95ce640b6a Silence gn warning about unused Skia flag (flutter/engine#51464)
This flag was generating an unused warning when running gn. The builds
would still be created and would build fine, but the warning is noise.
2024-03-15 19:20:22 -07:00
zijiehe@
fb4d1819e7 [Fuchsia] Remove the use of //build/ in fuchsia (flutter/engine#51072)
### Motivation of the change:

Both dart and flutter are using fairly outdated gn-sdk without properly maintained. Currently @hjfreyer is working on version'ed IDK / SDK libs which requires changes in gn-sdk to use the right version of the libs in fuchsia/sdk/obj/{arch}-api-{level} rather than the one in the fuchsia/sdk/arch. But current implementation does not support choosing the right version.

### Blocking issue:

The new gn-sdk (in flutter/tools/fuchsia/gn-sdk) generates multiple BUILD.gn files rather than a large BUILD.gn the previous version created. So most of the build rules need to switch from the old `fidl:{api}` build rule to `fidl/{api}` rule. The same change will happen in the dart/sdk, i.e. http://go/dart-reviews/356924. But since the two repos cannot have one single atomic change, changing either side first will cause flutter to break. E.g. the linkage error caused by duplicated symbols will happen if we change the dart/sdk first, since in flutter, it will still refer to the old build rules in the middle.

### Solutions:

Ideally we can create redirect rules in the current `build/fuchsia` buildroot tree to redirect the old rules into the new one, so we can make the change in the flutter first then dart/sdk. But creating the rules is not trivial and will only be used once.

So an alternative solution is

- pause the dart/sdk -> flutter roll
- submit dart/sdk change (http://go/dart-reviews/356924)
- update this change to manually bring the dart/sdk change, namely the `dart_revision` in the DEPS file and signatures in the ci/licences.
- resume the dart/sdk -> flutter roll.

But it requires this change itself to be reviewed first, and I'd like to know your opinion before moving forward.

See corresponding dart/sdk change at http://go/dart-reviews/356924.

### //build/fuchsia/ from buildroot should be removed after this change.

Bug: [b/40935282](https://issues.chromium.org/issues/40935282?pli=1&authuser=0)

FYI: @hjfreyer 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-15 02:52:21 +00:00
Matan Lurey
9daf9265d9 Add some header-goodies for et. (flutter/engine#51434)
I.e. a "open issues" and "file an issue" link.

---------

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2024-03-14 16:38:46 -07:00
Zachary Anderson
da1a3b464c [et] build and run commands disable RBE with a flag or when not available (flutter/engine#51404) 2024-03-14 14:30:41 -07:00
K Lubick
14255b337b Remove always-true skia_enable_flutter_defines (flutter/engine#51423)
Now that Flutter owns the list of defines to add to Skia's build, we don't need to toggle it on or off. This allows Skia to delete the setting (https://skia-review.googlesource.com/c/skia/+/826398)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-14 18:57:20 +00:00
Matan Lurey
a954d2cfd4 Remove --enable-impeller-{backend} flags (always True). (flutter/engine#51402)
Closes https://github.com/flutter/flutter/issues/142725.
2024-03-13 22:13:29 -07:00
John McCutchan
aba108f662 Small improvements to et lint command (flutter/engine#51372)
- Default to dumping out lint logs (can be disabled with `--quiet`
flag).
- Add Logger.fatal which logs an error and throws a FatalError which is
caught in main.
- Simplify `findDartBinDirectory` implementation.
- Make JSON serialized process artifacts more human readable.
2024-03-13 13:39:08 -07:00