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.  ## 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
Update License Files
Apply patch generated by CI
If you're not working on a Linux box then you can't auto-generate license files. A workaround is provided via CI.
Your build will fail one or more CI checks if your license files are not correct. Open the failing CI check. In the CI output you will find a patch diff that represents the changes that need to be made to your license files.
Warning
Do this only if the diff does not change which licenses are being included, but affects just the
FILE:metadata and so forth in the golden files. If the actual content of the licenses has changed, you will need to rerun the script from a Linux box to update the actual LICENSE file, as described below.
cd flutter/ci/licenses_golden
If the file is to my/patch/file locally. The -p2 strips two path
components from the file paths in the diff. Adjust as necessary.
patch -p2 < my/patch/file
If the patch file is copied in your clipboard. On Mac, you may apply the patch from there.
pbpaste | patch -p2
Check for license changes
Warning
Only works on Linux.
This script has two sets of output files: "goldens", which describe the current license state of the repository, and the actual real LICENSE file, which is what matters.
We look at changes to the goldens to determine if there are any actual changes to the licenses.
To update the goldens, make sure you've rebased your branch to the latest upstream main and then run the following in this directory:
dart pub get
gclient sync -D
rm -rf ../../../out/licenses
dart --enable-asserts lib/main.dart --src ../../.. --out ../../../out/licenses --golden ../../ci/licenses_golden
In order for the license script to work correctly, you need to remove
any untracked files inside engine/src (the buildroot), not just
engine/src/flutter.
Once the script has finished, copy any affected files from
../../../out/licenses to ../../ci/licenses_golden and add them to
your change, and examine the diffs to see what changed.
cp ../../../out/licenses/* ../../ci/licenses_golden
git diff
Important
If the only changes are to what files are included, then you're good to go. However, if any of the licenses changed, whether new licenses are added, old ones removed, or any have their content changed in any way (including, e.g., whitespace changes), or if the affected libraries change, you must update the actual license file.
The sky/packages/sky_engine/LICENSE file is the one actually
included in product releases and the one that should be updated any
time the golden file changes in a way that involves changes to
anything other than the FILE lines. To update this file, run:
dart pub get
gclient sync -D
dart --enable-asserts lib/main.dart --release --src ../../.. > ../../sky/packages/sky_engine/LICENSE
The bots do not verify that you did this step, it's important that you do it! When reviewing patches, if you see a change to the golden files, check to see if there's a corresponding change to the LICENSE file!
Testing
To run the tests:
dart pub get
find -name "*_test.dart" | xargs -n 1 dart --enable-asserts