This PR changes the format check on CI to use the command added in
https://github.com/flutter/engine/pull/50747.
Additionally, while making this change, I noticed that the CI check was
not checking the formatting of all files, and that as a result, files
were present in the repo with incorrect formatting. I have fixed the
formatting and fixed the check to always check all files.
pub get --offline may fetch packages that are in the local package cache but were previously downloaded from a hosted source. The script needs to check for packages that came from either the old or new locations of the Dart hosted package repository.
This is mostly just trying to get some structure in place. I suspect
that the implementation of the `query` command in this PR will get
entirely replaced through improvements.
This is an example of moving a dependency to `//flutter/third_party`
that requires forward/aliasing through the secondary build directory.
Without forwarding, and only making changes to the `DEPS` file and
rewriting paths in the engine repo, a `gn` invocation gets the following
error:
```
ERROR at //third_party/freetype2/BUILD.gn:85:5: Can't load input file.
"//third_party/libpng",
^---------------------
Unable to load:
/Users/zra/flutter/engine/src/third_party/libpng/BUILD.gn
I also checked in the secondary tree for:
/Users/zra/flutter/engine/src/flutter/build/secondary/third_party/libpng/BUILD.gn
```
Another dependency, with a `BUILD.gn` file outside of the engine repo,
is still referring to `libpng` by the old path. However, `gn` tells us
that it is also checking under the secondary tree. We can put whatever
we want in that `BUILD.gn` file to make `freetype2` happy. In this case
it's easy, we just add a build rule there that forwards to `libpng`'s
new location. There's only one wrinkle, which is that the dependency in
the `group` target has to be `public_deps` rather than a simple `deps`.
This is so that `public_deps` and `public_configs` of
`//flutter/third_party/libpng` are correctly inherited by dependents of
`//third_party/libpng`.
Unlike Goma, the local RBE server must be manually started and stopped
between each `ninja` build.
This PR adds the startup and shutdown before and after `ninja` is run in
the build config runner. It also removes the RBE startup logic from the
`gn` script, which was the wrong place for it since there was no
opportunity for it to shutdown the service. Removing this logic from the
`gn` script will not affect CI since the recipes already do the right
startup and shutdown, and logic in the `gn` script skipped the now
deleted section of code.
This PR adds an API to the `engine_build_configs` package that executes
an engine build config locally . This API is a building block for an
eventual command line tool to streamline workflows in the engine repo.
In particular, it will allow the command line tool to execute the same
config, build, and test commands that are run on CI.
Update Fuchsia's API level to 16.
b/322503140
## 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.
Reported by @loic-sharma.
The tl;dr is it should be OK to have `\r\n` (CRLF) endings if the header
guard is otherwise correct.
This minor refactor (and test) discounts the existence of `\r` when
determining the name of a header guard, i.e.:
```h
#ifndef FLUTTER_MATAN_WHY_H_
```
... is now (correctly) considered a value of `FLUTTER_MATAN_WHY_H_` not
`FLUTTER_MATAN_WHY_H_\r`.
- use core vm snapshot instead of core-jit, which does not seem to support sound null safety agnostic mode
- remove hardcoded `--no-sound-null-safety` flags from native code and ninja args
- add `sound_null_safety` attribute to `flutter_component` in ninja, which propagates to `dart_kernel`
- migrate one integration test to sound null safety, so that there are integration tests in both modes
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This change migrates off of the old fuchsia logging apis to use the
structured logging apis. The initial FIDL connection is made during
global initialization (before main()) and the initial minimum log level
is queried from the system. Later on, once the main loop is initialized,
we setup an async task to listen for additional log interest changes
from the system. The advantage of doing this on the main loop is that we
avoid spawning an additional background thread in the process (the
legacy logging apis use the background thread approach).
One added benefit of this change is it reduces the size of the
dart/flutter runner far packages by about 250kb in release mode, because
libsyslog.so and libbackend_fuchsia_globals.so are no longer needed.
flutter/flutter#141924
## 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
Closes https://github.com/flutter/flutter/issues/133415.
This includes a performance optimization for the runner itself, where
`--include=...`s are used as a base to check, versus checking _every_
file and seeing if it exists in a list. This works better with what is
expected in `ci/bin/format.dart` without any contract change.
Also added a few more functional tests of the system.
Closes https://github.com/flutter/flutter/issues/133415.
---
This is a prototype I threw together in about 1-2 hours. It enforces and
automatically fixes header guards that don't match the [the Google C++
style
guide](https://google.github.io/styleguide/cppguide.html#The__define_Guard).
For example, here is (trimmed) output at HEAD:
```txt
line 5, column 1 of impeller/aiks/picture.h: Unexpected #pragma once
╷
5 │ #pragma once
│ ^^^^^^^^^^^^
╵
line 5, column 1 of flow/stopwatch.h: Expected #ifndef FLUTTER_FLOW_STOPWATCH_H_
╷
5 │ #ifndef FLUTTER_FLOW_INSTRUMENTATION_H_
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
The following 731 files have invalid header guards:
```
This change is a redo of https://github.com/flutter/engine/pull/49847.
https://github.com/zijiehe-google-com/engine/compare/4530942..main
should show the diff between this and the original change; mainly fixes
the https://github.com/flutter/flutter/issues/141907.
Following paragraph is copied from the original change.
This change can be executed from buildroot by
```
python3 flutter/tools/fuchsia/with_envs.py flutter/testing/fuchsia/run_tests.py
```
Bug: https://github.com/flutter/flutter/issues/140179
- [V] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [V] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [V] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [V] I listed at least one issue that this PR fixes in the description
above.
- [V] 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.
- [V] I updated/added relevant documentation (doc comments with `///`).
- [V] I signed the [CLA].
- [V] All existing and new tests are passing.
This directory contains a file that is generated from other sources.
It is causing problems for the license script because it contains multiple copyright messages and one of the messages is partially included in the header region parsed by the script.
Reverts flutter/engine#49847
Initiated by: zanderso
This change reverts the following previous change:
Original Description:
This change is a redo of https://github.com/flutter/engine/pull/49650.
https://github.com/zijiehe-google-com/engine/compare/de5c713..main should show the diff between this and the original change.
Following paragraph is copied from the original change.
This change requires https://github.com/flutter/buildroot/pull/811, and can be executed from buildroot by
```
python3 flutter/tools/fuchsia/with_envs.py flutter/testing/fuchsia/run_tests.py
```
Bug: https://github.com/flutter/flutter/issues/140179
- [V] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [V] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [V] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
- [V] I listed at least one issue that this PR fixes in the description above.
- [V] 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.
- [V] I updated/added relevant documentation (doc comments with `///`).
- [V] I signed the [CLA].
- [V] All existing and new tests are passing.
This change is a redo of https://github.com/flutter/engine/pull/49650.
https://github.com/zijiehe-google-com/engine/compare/de5c713..main
should show the diff between this and the original change.
Following paragraph is copied from the original change.
This change requires https://github.com/flutter/buildroot/pull/811, and
can be executed from buildroot by
```
python3 flutter/tools/fuchsia/with_envs.py flutter/testing/fuchsia/run_tests.py
```
Bug: https://github.com/flutter/flutter/issues/140179
## Pre-launch Checklist
- [V] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [V] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [V] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [V] I listed at least one issue that this PR fixes in the description
above.
- [V] 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.
- [V] I updated/added relevant documentation (doc comments with `///`).
- [V] I signed the [CLA].
- [V] All existing and new tests are passing.
Reverts flutter/engine#49650
Initiated by: CaseyHillers
This change reverts the following previous change:
Original Description:
This change requires https://github.com/flutter/buildroot/pull/811, and can be executed from buildroot by
```
python3 flutter/tools/fuchsia/with_envs.py flutter/testing/fuchsia/run_tests.py
```
Bug: https://github.com/flutter/flutter/issues/140179
- [V] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [V] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [V] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
- [V] I listed at least one issue that this PR fixes in the description above.
- [V] 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.
- [V] I updated/added relevant documentation (doc comments with `///`).
- [V] I signed the [CLA].
- [V] All existing and new tests are passing.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This change requires https://github.com/flutter/buildroot/pull/811, and can be executed from buildroot by
```
python3 flutter/tools/fuchsia/with_envs.py flutter/testing/fuchsia/run_tests.py
```
Bug: https://github.com/flutter/flutter/issues/140179
- [V] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [V] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [V] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
- [V] I listed at least one issue that this PR fixes in the description above.
- [V] 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.
- [V] I updated/added relevant documentation (doc comments with `///`).
- [V] I signed the [CLA].
- [V] All existing and new tests are passing.
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Reverts flutter/engine#49416
Initiated by: zanderso
This change reverts the following previous change:
Original Description:
This PR refactors the RBE build and adds support for mac-hosted builds to use RBE. In particular, configurations files are downloaded from flutter-internal CIPD instead of being included in the repo. The download from CIPD is triggered by the presence of the `use_rbe` flag as a custom var in the `.gclient` file.
This PR also turns on RBE for Linux and macOS builds that do not produce artifacts.
https://github.com/flutter/buildroot/pull/807
This PR refactors the RBE build and adds support for mac-hosted builds
to use RBE. In particular, configurations files are downloaded from
flutter-internal CIPD instead of being included in the repo. The
download from CIPD is triggered by the presence of the `use_rbe` flag as
a custom var in the `.gclient` file.
This PR also turns on RBE for Linux and macOS builds that do not produce
artifacts.
https://github.com/flutter/buildroot/pull/807
The libbackend_fuchsia_globals.so is now required by libsyslog.so, so
include it in the list of Fuchsia common_libs.
*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*
b/315973146
## 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.
---------
Co-authored-by: skia-flutter-autoroll <skia-flutter-autoroll@skia.org>
Co-authored-by: Michael Brase <mbrase@google.com>
Changes since last roll
```
e8cdc554c59 (tag: 3.3.0-242.0.dev, origin/dev) Version 3.3.0-242.0.dev
a5109dc82ba [build] Handle RBE in -fdebug-prefix-map.
2ff976e9e3a [infra] Specify Linux in RBE platform.
12c548d331b [macros] Add first language tests for introspection.
3eeba4a4e2a [cfe] Refactor FunctionNode.futureValueType into emitted value type
8d8c4c61250 [cfe] Handle extension types in *Concatenation nodes
f49c7864436 [cfe/analyzer] Report error on invalid abstract final class modifier combinations
338fd6501b6 [dart2wasm] Make _RecordType use WasmArray<>s instead of List<>s
355d7e02fcf (origin/base) Stop testing nnbd-weak and nnbd-legacy on analyzer.
27892de3497 Adding DTD and DTD_impl owners.
6a9216a46fc Remove Requirements=nnbd-weak from superinterfaces_out_of_order_error_test.dart.
d646c92abe6 Macro. Tests for StaticType.isSubtype()
5881d669f0a Update DevTools rev to c7aa1df42178b054901c36bb1b8ea25b5542be8c
63594497660 Remove dead code in prefer_constructors_over_static_methods.dart
739baa4bc10 Macro. Implement DefinitionPhaseIntrospector.inferType()
794d3adf93d [VM] - Minor cleanups
3e73f10de09 Disable fixes for unawaited_futures in cascades.
8348807c860 stop collecting `strictCasts` settings from options
38e2d34424e [ddc] Erase extension types in as expressions
8d24f7ebd41 [ddc] Erase extension types in string concats
b2cd914227b [ddc] Erase extension types in assertions
66a955b09f1 Fixed typo
48ac398f112 Fix `Directory.current` setter compatibility with `IOOverrides`
c84edaefe9e Check in //third_party/root_certificates.
63f5b1272b1 Discover actual dart-sdk/ and bin/ when running tools/test.py
81dc3f6f6e7 [tests/ffi]: Fix failing pointer arithmetic test.
83ba9fe0a8d [ddc] Enable new runtime types by default
95e049c7e28 Add a test case for #52233
3e2ac6721d5 [linter] Report deprecated_consistency only on constructor name
89381ea4dbe [linter] Simplify 'prefer_mixin' implementation
```
This PR also includes changes to license script to accommodate new
location for `root_certificates` sources.
For consistency, I don't think we have any other tools with `-`'s.
I'll be honest - this seemed easier than teaching the header guard tool
how to handle `-`'s in directory names, but if you feel strongly about
it I can revert.