Update scripts with new location of Dart SDK checkout in Flutter engine

Bug: https://github.com/flutter/flutter/issues/143335
Change-Id: Iceb2e968be78fae82789d6b13a28b8d5e3cb3dc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/361820
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
William Hesse 2024-04-09 14:45:10 +00:00 committed by Commit Queue
parent 36be5e7318
commit 5c156f2fcd
5 changed files with 13 additions and 17 deletions

View file

@ -67,7 +67,7 @@ their correct version using
```
Then checkout the Dart version we want. If the commit is available in the Dart
checkout from `<src>/third_party/dart` then one may
checkout from `<src>/flutter/third_party/dart` then one may
```
<src> % vim flutter/DEPS
@ -80,13 +80,13 @@ checkout from `<src>/third_party/dart` then one may
but for local development one may just
```
<src> % cd third_party/dart
<src>/third_party/dart % git checkout ...
<src> % cd flutter/third_party/dart
<src>/flutter/third_party/dart % git checkout ...
```
Now we have to make some modification to ensure that the build of the platform
file doesn't use the downloaded prebuilt SDK but the one in
`<src>/third_party/dart`, we do that by applying the following patch:
`<src>/flutter/third_party/dart`, we do that by applying the following patch:
```
<src>/flutter % git diff
@ -133,7 +133,7 @@ Build the normal Dart SDK in the same version as used in Flutter engine via
`tools/build.py -mrelease create_sdk`
NOTE: You can (after syncing dependencies with `gclient sync -D`) make
`<src>/third_party/dart` a symlink to the normal Dart SDK you work on. That
`<src>/flutter/third_party/dart` a symlink to the normal Dart SDK you work on. That
avoids the need to keep the two in sync.
## Building a Flutter app (e.g. Wonderous)

View file

@ -8,7 +8,7 @@
# latest dart sdk, run this script to apply workarounds to the source code. It
# may patch up the source code so the three HEADs work together correctly.
#
# Usage: src/third_party/dart/tools/3xhead_flutter_hooks.sh
# Usage: src/flutter/third_party/dart/tools/3xhead_flutter_hooks.sh
# (run inside the root of a flutter engine checkout)
set -e
@ -20,4 +20,4 @@ ensure_in_checkout_root
# Copy changed dependencies from Dart DEPS to engine DEPS and update them in
# checkout.
src/third_party/dart/tools/patches/flutter-engine/apply.sh
src/flutter/third_party/dart/tools/patches/flutter-engine/apply.sh

View file

@ -58,12 +58,6 @@ git clone --single-branch -vv \
pushd flutter
bin/flutter config --no-analytics
pinned_dart_sdk=$(cat bin/cache/dart-sdk/revision)
patch=$checkout/tools/patches/flutter-engine/${pinned_dart_sdk}.flutter.patch
if [ -e "$patch" ]; then
git apply $patch
fi
bin/flutter update-packages
popd # flutter
@ -73,13 +67,15 @@ git clone --single-branch --depth=1 -vv \
pushd src
git clone --single-branch --branch main --depth=1 -vv \
https://dart.googlesource.com/external/github.com/flutter/engine flutter
pushd flutter
mkdir -p third_party
pushd third_party
ln -s $checkout dart
popd # third_party
popd # flutter
popd # src
./src/third_party/dart/tools/patches/flutter-engine/apply.sh || true
./src/flutter/third_party/dart/tools/patches/flutter-engine/apply.sh || true
mkdir flutter_patched_sdk

View file

@ -7,7 +7,7 @@
# This script updates the flutter engine DEPS file with the
# Dart SDK dependencies.
#
# Usage: src/third_party/dart/tools/patches/flutter-engine/apply.sh
# Usage: src/flutter/third_party/dart/tools/patches/flutter-engine/apply.sh
# (run inside the root of a flutter engine checkout)
set -e
@ -40,7 +40,7 @@ if [ $need_runhooks = true ]; then
# DEPS file might have been patched with new version of packages that
# Dart SDK depends on. Get information about dependencies from the
# DEPS file and forcefully update checkouts of those dependencies.
gclient revinfo --ignore-dep-type=cipd | grep 'src/third_party/dart/third_party' | while read -r line; do
gclient revinfo --ignore-dep-type=cipd | grep 'src/flutter/third_party/dart/third_party' | while read -r line; do
# revinfo would produce lines in the following format:
# path: git-url@tag-or-hash
# Where no spaces occur inside path, git-url or tag-or-hash.

View file

@ -13,7 +13,7 @@ die() {
ensure_in_checkout_root() {
set -e
if [ ! -e src/third_party/dart ]; then
if [ ! -e src/flutter/third_party/dart ]; then
die
fi