1341 Commits

Author SHA1 Message Date
zijiehe@
cbaf3f8fbc [Fuchsia] Remove deprecated and unnecessary parameters from fuchsia*archive (flutter/engine#55324)
This is a precondition to use more high-level templates in fuchsia-gn-sdk to replace build rules in flutter.
Meanwhile fuchsia-gn-sdk does not use pm anymore and this change is also helpful to get rid of the use of pm.

Briefly, it removes all cmx_file parameters and avoids specifying duplicated parameters (binary / target_name / default cml file).

Bug: http://b/353729557, http://b/40935282

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-24 15:44:56 +00:00
gaaclarke
164c50b500 Made YAML version of vscode workspace to avoid redundancy (flutter/engine#55322)
In https://github.com/flutter/engine/pull/55291 we added a vscode workspace to help with running tests and sharing settings.  However, VSCode does not support a config format that has the ability to reduce redundancy and it will get quite unwieldy as we add in all of the engines test runners.  To combat that I've added instead a YAML config that can converted to JSON for VSCode.

This also adds 2 more test runners: display_list_unittests and impeller_golden_tests

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-23 21:24:05 +00:00
gaaclarke
fa68c30a0f Adds vscode workspace with impeller test runner (flutter/engine#55291)
This PR removes our checked in .vscode files and instead starts a vscode
workspace for the engine. As a first step I've added build tasks for the
arm64 `impeller_unittests`. I also setup C++ TestMate so that we can
easily navigate to tests and execute them. The tests will be rebuilt
before each execution.

The goal would be that eventually all of our c++ tests can be listed
here. This is going to make external contribution much easier and make
it so I don't have to keep editing the "launch.json" file to run
specific tests.


![ezgif-2-bcd582b44e](https://github.com/user-attachments/assets/11cea32e-628f-4626-b87d-9d3ebfe11357)

## 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-09-20 12:57:32 -07:00
Brandon DeRosier
806cddf7d3 Remove tinygltf (flutter/engine#55264)
This is another thing we were only using for Impeller Scene.
2024-09-17 20:53:22 +00:00
Matan Lurey
425e6c707d Remove all references to litetest from the engine repo. (flutter/engine#55163)
Closes https://github.com/flutter/flutter/issues/133569.
2024-09-12 16:26:25 -07:00
Brandon DeRosier
16acb8258a Remove Impeller Scene 👋 (flutter/engine#55118)
Impeller Scene has been fully rewritten as a Dart library for Flutter: https://pub.dev/packages/flutter_scene
2024-09-12 14:56:08 -07:00
Gray Mackall
bc422dfe62 Add a note about re generating Gradle lockfiles (flutter/engine#55150)
Adds a note that Gradle lockfile generation is necessary when updating the android embedding dependencies bundle.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-12 21:10:49 +00:00
Matan Lurey
37f629a23f Migrate more tests from litetest to package:test (flutter/engine#55119)
Partial work towards https://github.com/flutter/flutter/issues/133569.

Commentary on removal of `assert`-conditionals here: https://github.com/flutter/flutter/issues/155054.
2024-09-12 19:01:05 +00:00
Matan Lurey
5aee88abfb Migrate const_finder_test to use package:test (flutter/engine#55132)
... instead of some home-grown framework.

This is the last test in the engine that uses custom command line arguments to start. As of this PR, `dart test` including full debugging in an IDE works across all Dart tooling code.

I tried to make this idiomatic as much as possible without changing the logic.
2024-09-12 15:30:33 +00:00
Gray Mackall
7a06558bd9 Replace System.loadLibrary with ReLinker.loadLibrary() in FlutterJNI.loadLibrary() (flutter/engine#55095)
Could fix? https://github.com/flutter/flutter/issues/83596

The communication on https://issuetracker.google.com/issues/346717090#comment2 recommends using [ReLinker](https://github.com/KeepSafe/ReLinker) to avoid a bug in how library loading interacts with the [Play delivery feature](https://developer.android.com/guide/playcore/feature-delivery) (used in turn by Flutter's deferred components).

The ReLinker docs also suggest that if you have `minSdk` less than `23`, then you should be using ReLinker regardless, as `System.loadLibrary` is unreliable for other reasons.

I don't have any strong evidence to suggest that either one of these two root causes is the definitive cause of https://github.com/flutter/flutter/issues/83596, but it probably wouldn't hurt 🤷 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-09-11 21:05:52 +00:00
Matan Lurey
64fbc93023 Move more of the tests in the engine to package:test (flutter/engine#55083)
Partial work towards https://github.com/flutter/flutter/issues/133569.
2024-09-10 21:14:12 +00:00
Matan Lurey
d068ccc47d Add more package:test (removing usages of package:litetest) (flutter/engine#54882)
... also removed a few TODOs, deleted a proof of concept directory.

Work towards https://github.com/flutter/flutter/issues/133569.
2024-09-04 22:42:55 +00:00
Matan Lurey
1e6dde4eb1 Migrate another big chunk of the engine repo to package:test (flutter/engine#54853)
There are almost no behavioral changes.

Because `dart test` runs with assertions, and the former command does not, I had to tweak some of the engine tool tests because they would assert that there were duplicate names - but I didn't change any actual code besides the test expectations themselves/the fixtures.

This is not all of the engine, but is approximately 1/3 of all imports of `package:litetest` migrated.
2024-08-29 15:35:52 +00:00
Matan Lurey
87727168e8 Remove --disable-dart-dev across flutter/engine. (flutter/engine#54845)
As per the Dart CLI team and @bkonyi, this is no longer providing value and we shouldn't cargo-cult it.

Work towards https://github.com/flutter/flutter/issues/154268.
2024-08-29 00:12:32 +00:00
Matan Lurey
712e7b9a05 Migrateheader_guard_check to package:test. (flutter/engine#54811)
Work towards https://github.com/flutter/flutter/issues/133569.

I also augmented the `run_tests.py` script to support an incremental migration to `package:test`, PTAL.
2024-08-28 21:12:12 +00:00
zijiehe@
74850ce8c5 [fuchsia] use the api-level from gn-sdk (flutter/engine#54740)
https://crrev.com/c/5805927 provides the default api-level in gn-sdk, so
as long as we have the latest gn-sdk / skia setup, the api-level would
be updated automatically.

Bug: [347373793](http://b/347373793)

## 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-08-28 09:39:22 -07:00
Chris Bracken
d49826f5d2 clangd_check: write .clangd as part of test (flutter/engine#54766)
This eliminates the checked-in `.clangd` file at the root of the engine repository, which gets picked up by editors that rely on `clangd`. In particular, the `Remove: [-m*, -f*]` is problematic for iOS/macOS embedder developers since it removes the `-fobjc-arc` flag, which causes `clangd` to emit errors when using ARC features. Example:

    Cannot create __weak reference in file using manual reference counting

This removes the checked-in file, and instead writes the file before running the test, then cleans it up afterwards. Unfortunately, `clangd` does not appear to have a mechanism to point to a config file elsewhere and run as though it were present in a specified directory.

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

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-08-26 17:16:20 +00:00
Jonny Wang
846176d6db [fuchsia] Use Fuchsia API 22 (flutter/engine#54554)
b/359664512

## 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-08-14 17:42:32 +01:00
Brandon DeRosier
b19fe31562 Revert "[Impeller] remove scene3d support." (flutter/engine#54502)
Reverts flutter/engine#54453

Not quite ready to remove Impeller Scene yet because I'm still porting
the animation functionality. Keeping it around allows me to switch back
and forth to compare without having to recompile the engine.

Over a month ago I said something like "we can revert this a couple of
weeks from now" in one of the Impeller meetings. But for better or worse
(better, I think), I ended up spending a ton of time trying to make the
PBR good first (which doesn't exist in this C++ version).
2024-08-12 10:28:51 -07:00
Jonah Williams
198d1f1077 [Impeller] remove scene3d support. (flutter/engine#54453)
Now that Flutter GPU is a preview, the technical debt from having an ifdef controlled additional rendering mode can be removed.
2024-08-09 16:38:56 +00:00
Zachary Anderson
ed398932e4 Remove swiftshader from the license script excludes list (flutter/engine#54412)
The swiftshader third_party directory is a huge mess, and will take more
wrangling of the license script than I have time for right now. This PR
correctly covers the direct dependency, but not the transitive ones.

Towards https://github.com/flutter/flutter/issues/145726
2024-08-09 08:11:31 -07:00
Camille Simon
d10544383b Update docs to use new Gradle version in the engine (flutter/engine#53964)
Updates/corrects steps to update Gradle version used in the engine based on what @gmackall and I did to update the engine's Gradle version in https://github.com/flutter/engine/pull/53574.
 
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-08-05 17:37:16 +00:00
Zachary Anderson
93323c6d97 Don't use intel clang on arm64 macs (flutter/engine#54291)
Since gen_snapshot is lipo'd everywhere now, it should be safe to both
build with either arm64 or intel macs, and to use the arm64 native clang
toolchain on arm64 macs instead of the intel toolchain under Rosetta.

Related to https://github.com/flutter/flutter/issues/103386
2024-08-03 16:08:24 -07:00
Jason Simmons
0465c1d35a Fix a race in file I/O done by a BuildRunner test (flutter/engine#54167)
This test failure had been seen in some recent auto-roller jobs on CI.
2024-07-28 00:57:26 +00:00
Matan Lurey
498a31a6da Migrates the bulk of flutter/engine to pub workspaces. (flutter/engine#54157)
Part of https://github.com/flutter/flutter/issues/147883.

Excluding Fuchsia and the Web SDK, the remaining scripts are:

```sh
$ ./tools/find_pubspecs_to_workspacify.sh

/Users/matanl/Developer/engine/src/flutter/impeller/tessellator/dart/pubspec.yaml
/Users/matanl/Developer/engine/src/flutter/sky/packages/sky_engine/pubspec.yaml
/Users/matanl/Developer/engine/src/flutter/shell/vmservice/pubspec.yaml
/Users/matanl/Developer/engine/src/flutter/lib/snapshot/pubspec.yaml
/Users/matanl/Developer/engine/src/flutter/lib/gpu/pubspec.yaml
/Users/matanl/Developer/engine/src/flutter/lib/web_ui/pubspec.yaml
/Users/matanl/Developer/engine/src/flutter/flutter_frontend_server/pubspec.yaml
```

These could be the trickiest, so I'm doing them separately.
2024-07-27 09:58:40 -07:00
Zachary Anderson
b8ff0f4901 Split up mac_host_engine builds (flutter/engine#53571)
This PR does a few things. Mainly it makes the builds in
mac_host_engine.json each build fewer targets to increase parallelism
for post-submit and release builds. To ensure that increasing
parallelism doesn't lead to capacity issues, this change also allows the
mac_host_engine.json builds to run on either intel or arm64 macOS hosts.
Finally, when building on an arm64 macOS host to target macOS, this PR
changes the `gn` script to ensure that the arm64 native clang toolchain
will be used.

To keep mac_host_engine.json focused on builds that produce artifacts,
this PR also moves tests from that file into the ill-named
mac_unopt.json. In a subsequent PR, I'll rename all the *_unopt.json
files to *_tests.json or something similar.

The artifacts produced by these builds are passing framework presubmit
checks in https://github.com/flutter/flutter/pull/152345.
2024-07-26 15:39:46 -07:00
Matan Lurey
e301288885 Pub workspace-ify most of testing/ and parts of tools/ (flutter/engine#54124)
Replaces and closes https://github.com/flutter/engine/pull/53997.

This PR migrates the following packages to the pub workspace:
  - testing/benchmark
  - testing/dart
  - testing/litetest
  - testing/pkg_test_demo
  - testing/scenario_app
  - testing/skia_gold_client
  - testing/symbols
  - tools/golden_tests_harvester
  - tools/pkg/process_fakes

It also makes minor changes to the Dart build rules in order to resolve the root package_config, instead of per-package.

I am _not_ totally confident of the `_embedder.yaml` change, but I also can't explain what is needed to continue analyzing `lib/ui` without analysis failures that all of the symbols in `dart:nativewrappers` are missing.
2024-07-26 17:35:50 +00:00
Zachary Anderson
1bddf3416d [et] Better RBE defaults (flutter/engine#54059)
This PR adopts some RBE configuration from the way that chromium uses RBE

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/refs/heads/main/reclient_helper.py

These changes should bias both local and CI builds more towards using the worker pool, which we recently expanded, and should help limit the bandwidth used, which is a bottleneck for build times on a slow connection.
2024-07-24 23:15:56 +00:00
Matan Lurey
c696d2cf7b Move testing/litetest to pub workspaces. (flutter/engine#54082)
More incremental version of https://github.com/flutter/engine/pull/53997.
2024-07-24 21:02:17 +00:00
Matan Lurey
cfe0de9c8f Suggest a few common vscode extensions. (flutter/engine#53974)
For example, without the markdown preview, files in `docs/**/*.md` don't all render.
2024-07-24 18:49:05 +00:00
Camille Simon
0619de0107 Upgrade Engine Android SDK to 35 (flutter/engine#53574)
**REVIEW BUT DO NOT MERGE:** Will merge after https://github.com/flutter/buildroot/pull/870 lands.

1: Updates engine to use Android 35. Part of https://github.com/flutter/flutter/issues/150215.
Engine step of https://github.com/flutter/flutter/blob/master/docs/platforms/android/Upgrading-Engine's-Android-API-version.md.

2: Updates test runner AGP version to 8.5, engine Gradle version to 8.9 to accommodate update.

3: Fixes lint and suppresses deprecation warnings caused by the update. None of the deprecations are unknown by the team (they are handled in the code), but the tests emitted warnings.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-24 16:54:38 +00:00
Chris Bracken
08c7b8d6e2 Prepend third_party/pyyaml to python sys.path (flutter/engine#54023)
Previously we were appending Flutter's fork of third_party/pyyaml to the Python sys.path. In the case where a bot image or local install already has pyyaml installed elsewhere on the path, ours will fail to be picked up. Instead prepend to the path.

Issue spotted by jsimmons@.

Related: https://github.com/flutter/engine/pull/54001

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-22 17:38:07 +00:00
Zachary Anderson
63d8e2bbe6 [et] Plumb -j to ninja (flutter/engine#54005)
Also computes a better `-j` when RBE is enabled.

Fixes https://github.com/flutter/flutter/issues/147667
2024-07-19 20:28:47 +00:00
Chris Bracken
08c30a87bd Upgrade third_party/pyyaml to 03c67afd452cdff45b41bfe65e19a2fb5b80a0e8 (flutter/engine#54001)
We were using a very old version of this library that broke with
Python3.12. This updates to a Python 3.12 compatible SHA.

The specific breakage at the former commit was that
`collections.Hashable` was deprecated and moved to
`collections.abc.Hashable` in Python 3.7. It was removed in Python 3.8.
For anyone on newer versions of Python3, such as Python 3.9.6 which
ships with macOS 15 Sequoia, this is broken.

The error on versions of Python newer than 3.8 is:
```
________ running 'python3 src/flutter/tools/pub_get_offline.py' in '/Users/chris/Developer/flutter/engine'
Traceback (most recent call last):
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/pub_get_offline.py", line 167, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/pub_get_offline.py", line 157, in main
    if not package_uses_workspace_resolution(package):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/pub_get_offline.py", line 76, in package_uses_workspace_resolution
    return yaml.safe_load(pubspec_file).get('resolution') == 'workspace'
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/__init__.py", line 75, in load
    return loader.get_single_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 37, in get_single_data
    return self.construct_document(node)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 46, in construct_document
    for dummy in generator:
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 398, in construct_yaml_map
    value = self.construct_mapping(node)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 204, in construct_mapping
    return super().construct_mapping(node, deep=deep)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Developer/flutter/engine/src/flutter/tools/../third_party/pyyaml/lib3/yaml/constructor.py", line 126, in construct_mapping
    if not isinstance(key, collections.Hashable):
                           ^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Hashable'
Error: Command 'python3 src/flutter/tools/pub_get_offline.py' returned non-zero exit status 1 in /Users/chris/Developer/flutter/engine
```


## 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.
- [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-07-18 20:17:31 -07:00
Matan Lurey
767eb5b265 Gracefully fail when gn desc returns no targets. (flutter/engine#53999)
Closes https://github.com/flutter/flutter/issues/151990.

This is just a nice QOL change, since the `//` format we're using is not "native" to GN or Ninja.
2024-07-18 21:44:06 +00:00
Matan Lurey
50e4e12c2e Add a "pub workspace" to the root of the engine repository (flutter/engine#53539)
... and use it in `engine_tool` to prove everything is working, i.e. on CI and elsewhere.

Partial work towards https://github.com/flutter/flutter/issues/147883.
Supersedes and closes https://github.com/flutter/engine/pull/51782 (which was a prototype).

See also:
- https://flutter.dev/go/pub-workspace, the design doc on the feature.
- https://github.com/dart-lang/pub-dev/pull/7762, an example PR.

I'll probably end up moving the inline docs in `pubspec.yaml` to a `docs/*.md` once that's a thing.
2024-07-18 16:18:09 +00:00
Gray Mackall
383d7e8338 Align tools/android_sdk/packages.txt with what is uploaded to CIPD (flutter/engine#53921)
This file should always be kept in sync with what we are actually using, but it seems to currently be out of sync.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-16 00:47:56 +00:00
Matan Lurey
15becdc41e Move //third_party/java to //flutter/third_party/java (flutter/engine#53590)
... as part of buildmoot.
2024-07-12 09:25:28 -07:00
Matan Lurey
ee6b0f1b2d Move //third_party/android_embedding_dependencies to //flutter/third_party. (flutter/engine#53587)
... as part of the buildmoot effort.

I'll rebase after @gmackall's definitely-will-work-this-time bump of the dependencies.
2024-07-03 18:40:23 +00:00
Filip Filmar
06414a6725 [icu] Ignores the dir flutter/third_party/icu/patches (flutter/engine#53667)
This directory consistes of patches that Chromium's maintainers of the Chromium ICU fork have already applied to the ICU source code.

Usually these are fix-forwards that have been applied to the ICU library after it has been released.

The patch files are kept to ensure that the patches are applied if we ever need to create a new branch, or update the major ICU version.

The patch files specifically do *not* get used during the build process.

Issues: https://github.com/flutter/flutter/issues/151116

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-07-01 18:38:55 +00:00
Gray Mackall
8e2c560e10 Re-re-re-land "Upgrade all[most] androidx dependencies to latest" (flutter/engine#53592)
Re-re-re-land https://github.com/flutter/engine/pull/53001.

I recreated the postsubmit failures of the [roll](https://github.com/flutter/flutter/pull/150733) of the [last land](https://github.com/flutter/engine/pull/53532), and then verified on a local branch that those same postsubmits pass with this upgrade after the land of https://github.com/flutter/flutter/pull/150873. 

So I have pretty high confidence this won't cause any problems in the framework repo. I also tested on a previous land attempt that the `all_packages` app builds on this branch, so that is also a good sign for the packages repo.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-06-27 19:56:47 +00:00
Matan Lurey
75a2393b53 Remove otherwise unused third_party/web_dependencies. (flutter/engine#53588)
There are no usages other than the reference in the LICENSE checker.
2024-06-26 20:40:04 +00:00
Matan Lurey
0c9f812104 Move impeller-cmake-example to flutter/third_party. (flutter/engine#53589)
... as part of buildmoot.

I _think_ this is all that is needed but am not confident.
2024-06-26 18:59:18 +00:00
auto-submit[bot]
c352f44015 Reverts "Re-re-land "Upgrade all[most] androidx dependencies to latest" (#53532)" (flutter/engine#53546)
Reverts: flutter/engine#53532
Initiated by: gmackall
Reason for reverting: This breaks apps that use plugins that use compileSdk 31, some of which we use in our postsubmit (so it blocks the tree).
Original PR Author: gmackall

Reviewed By: {reidbaker, matanlurey}

This change reverts the following previous change:
Re-re-land https://github.com/flutter/engine/pull/53001

(Reland attempt was at https://github.com/flutter/engine/pull/53462)

Unblocked by https://github.com/flutter/flutter/pull/150585, but will still need a manual roll because I will need to re-generate a bunch of lockfiles.

Also, https://github.com/flutter/flutter/blob/master/docs/engine/Testing-presubmit-Engine-PRs-with-the-Flutter-framework.md doesn't work (it's blocked on https://github.com/flutter/flutter/issues/149780) so I mostly just have to pray that no new issues occur in the roll. But I believe all issues that came up in the last attempt should be addressed by the above pr and by manual lockfile generation.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-06-25 01:20:29 +00:00
Gray Mackall
f9b2f290ba Re-re-land "Upgrade all[most] androidx dependencies to latest" (flutter/engine#53532)
Re-re-land https://github.com/flutter/engine/pull/53001

(Reland attempt was at https://github.com/flutter/engine/pull/53462)

Unblocked by https://github.com/flutter/flutter/pull/150585, but will still need a manual roll because I will need to re-generate a bunch of lockfiles.

Also, https://github.com/flutter/flutter/blob/master/docs/engine/Testing-presubmit-Engine-PRs-with-the-Flutter-framework.md doesn't work (it's blocked on https://github.com/flutter/flutter/issues/149780) so I mostly just have to pray that no new issues occur in the roll. But I believe all issues that came up in the last attempt should be addressed by the above pr and by manual lockfile generation.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-06-24 21:36:22 +00:00
Jonny Wang
c2f5afd59a [fuchsia] Update Fuchsia API level to 19 (flutter/engine#53494)
Update Fuchsia API level to 19

b/347290402

Tests: cl/645133515

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] 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-06-24 18:56:40 +01:00
Matan Lurey
233edc0b8f Add SurfaceProducer.Callback lifecycle hooks (flutter/engine#53280)
Work towards https://github.com/flutter/flutter/issues/148417.
2024-06-24 08:06:56 -07:00
auto-submit[bot]
feefb6ebd8 Reverts "Reland "Upgrade all[most] androidx dependencies to latest" (#53462)" (flutter/engine#53468)
Reverts: flutter/engine#53462
Initiated by: gmackall
Reason for reverting: blocking roll (see https://github.com/flutter/flutter/pull/150465#issuecomment-2177329885).
Original PR Author: gmackall

Reviewed By: {reidbaker}

This change reverts the following previous change:
Relands https://github.com/flutter/engine/pull/53001.

Also pulls in @matanlurey's dependency on `androidx.lifecycle:lifecycle-process`, and upgrades it to `2.7.0`.

It is unblocked by the changes in https://github.com/flutter/flutter/pull/149204.

Tested by building the engine, and then also by building the `flutter/packages` `all_packages` app on this branch, so that hopefully it will also roll smoothly into the packages repo.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-06-19 01:08:48 +00:00
Gray Mackall
4e98015b1e Reland "Upgrade all[most] androidx dependencies to latest" (flutter/engine#53462)
Relands https://github.com/flutter/engine/pull/53001.

Also pulls in @matanlurey's dependency on `androidx.lifecycle:lifecycle-process`, and upgrades it to `2.7.0`.

It is unblocked by the changes in https://github.com/flutter/flutter/pull/149204.

Tested by building the engine, and then also by building the `flutter/packages` `all_packages` app on this branch, so that hopefully it will also roll smoothly into the packages repo.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-06-18 21:14:07 +00:00
Filip Filmar
e2593bb7d9 [flatland] Handle fence overflow in flatland_connection.cc (flutter/engine#53366)
flatland_connection.cc used to allow an arbitrary number of acquire and release fences to be scheduled for each frame.

Sadly, Fuchsia has a limitation of (1) the number of total handles that can be sent per a FIDL call, but also (2) the Flatland protocol only supports sending up to 16 fences per each fence type.

Now, normally there should be very few scheduled fences per frame. But if frames get skipped, we could amass many fences which would then crash our attempts to send all of them to the Flatland `Present` endpoint.

This change introduces two fence multiplexer, which allow us to signal more than 16 fences per type, at a performance penalty. We expect to be able *not* to crash the FIDL subsystem using this approach, and may even be able to hobble along for a bit, until the fences issue is hopefully self-resolved.

That said, this issue seems to indicate there are frame scheduling problems elsewhere. But this is a fairly straightforward change to make without affecting the rest of the flatland code or integration, so we opt to do that first.

Issues: [#150136](https://github.com/flutter/engine/pull/53366)

- [] I updated/added relevant documentation (doc comments with `///`).
2024-06-17 18:10:20 +00:00