From fe39068928a5da7af50e0cff0277fb675773f6e3 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Thu, 1 Feb 2024 12:02:08 +0000 Subject: [PATCH] [tool] Delete unsupported patches system The old patches system in tools/patches is not supported in the 3H infra. Currently, Golem still uses the DEPS updating logic. This should be deleted when Golem also moves over to the 3H infra. Change-Id: Id42d8499a0fa42d18061908e9d1a18b687582ba7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349640 Reviewed-by: William Hesse Commit-Queue: Daco Harkes --- tools/3xhead_flutter_hooks.sh | 6 ++--- tools/patches/flutter-engine/apply.sh | 24 +------------------ tools/patches/flutter-engine/create.sh | 30 ------------------------ tools/patches/flutter-flutter/apply.sh | 31 ------------------------- tools/patches/flutter-flutter/create.sh | 26 --------------------- 5 files changed, 3 insertions(+), 114 deletions(-) delete mode 100755 tools/patches/flutter-engine/create.sh delete mode 100755 tools/patches/flutter-flutter/apply.sh delete mode 100755 tools/patches/flutter-flutter/create.sh diff --git a/tools/3xhead_flutter_hooks.sh b/tools/3xhead_flutter_hooks.sh index cb4219a16fc..984a2dec41b 100755 --- a/tools/3xhead_flutter_hooks.sh +++ b/tools/3xhead_flutter_hooks.sh @@ -18,8 +18,6 @@ DIR=$(dirname -- "$(which -- "$0")") ensure_in_checkout_root -# Apply patches to the Flutter Framework if needed. -src/third_party/dart/tools/patches/flutter-flutter/apply.sh - -# Apply patches to the Flutter Engine if needed. +# Copy changed dependencies from Dart DEPS to engine DEPS and update them in +# checkout. src/third_party/dart/tools/patches/flutter-engine/apply.sh diff --git a/tools/patches/flutter-engine/apply.sh b/tools/patches/flutter-engine/apply.sh index 5b49564193d..2964ad86757 100755 --- a/tools/patches/flutter-engine/apply.sh +++ b/tools/patches/flutter-engine/apply.sh @@ -4,18 +4,7 @@ # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # -# When in a Flutter Engine checkout, this script checks what version of the Dart -# SDK the engine is pinned to, and patches the engine if there is a known patch -# that needs to be applied on the next Dart SDK roll in the engine. -# -# This script is meant to be used by 3xHEAD CI infrastructure, allowing -# incompatible changes to be made to the Dart SDK requiring a matching change -# to the Flutter Engine, without breaking the CI. The patch is associated with -# the Dart SDK version the engine is pinned so. When the engine rolls its SDK, -# then it stops applying patches atomically as there isn't a patch available yet -# for the new roll. -# -# Additionally, this script updates the flutter engine DEPS file with the +# This script updates the flutter engine DEPS file with the # Dart SDK dependencies. # # Usage: src/third_party/dart/tools/patches/flutter-engine/apply.sh @@ -30,17 +19,6 @@ ensure_in_checkout_root pinned_dart_sdk=$(get_pinned_dart_version) need_runhooks=false -patch=src/third_party/dart/tools/patches/flutter-engine/${pinned_dart_sdk}.flutter.patch -if [ -e "$patch" ]; then - (cd flutter && git apply ../$patch) - need_runhooks=true -fi - -patch=src/third_party/dart/tools/patches/flutter-engine/${pinned_dart_sdk}.patch -if [ -e "$patch" ]; then - (cd src/flutter && git apply ../../$patch) - need_runhooks=true -fi # Update the flutter DEPS with the revisions in the Dart SDK DEPS. src/tools/dart/create_updated_flutter_deps.py diff --git a/tools/patches/flutter-engine/create.sh b/tools/patches/flutter-engine/create.sh deleted file mode 100755 index 1197f632906..00000000000 --- a/tools/patches/flutter-engine/create.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. -# -# This script produces a patch to the Flutter Engine from the local uncommitted -# changes in the current engine checkout. It is named after the Dart SDK -# revision the engine is currently pinned to. It's meant to be consumed by the -# apply.sh script next to this script. Any existing patches are removed, as they -# are assumed to not be relevant anymore. If there are no uncommitted changes in -# the local engine checkout, then no patch is produced. -# -# Usage: src/third_party/dart/tools/patches/flutter-engine/create.sh -# (run inside the root of a flutter engine checkout) - -set -e - -DIR=$(dirname -- "$(which -- "$0")") -. $DIR/../utils.sh - -ensure_in_checkout_root - -pinned_dart_sdk=$(get_pinned_dart_version) -patch=src/third_party/dart/tools/patches/flutter-engine/$pinned_dart_sdk.patch -rm -f src/third_party/dart/tools/patches/flutter-engine/*.patch -(cd src/flutter && git diff) > $patch -if [ ! -s $patch ]; then - rm $patch -fi diff --git a/tools/patches/flutter-flutter/apply.sh b/tools/patches/flutter-flutter/apply.sh deleted file mode 100755 index 2b3a28002ae..00000000000 --- a/tools/patches/flutter-flutter/apply.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. -# -# This script applies a patch, if available, to the Flutter Framework. Only a -# patch is applied for the particular engine.version the flutter framework is -# using. -# -# Usage: src/third_party/dart/tools/patches/flutter-flutter/apply.sh -# (run inside the root of a flutter checkout) - -set -e - -DIR=$(dirname -- "$(which -- "$0")") -. $DIR/../utils.sh - -ensure_in_checkout_root - -pinned_engine_version=$(get_pinned_flutter_engine_version) -patch=src/third_party/dart/tools/patches/flutter-flutter/${pinned_engine_version}.patch -if [ -e "$patch" ]; then - (cd flutter && git apply ../$patch) -fi - -pinned_dart_sdk=$(get_pinned_dart_version) -patch=src/third_party/dart/tools/patches/flutter-flutter/${pinned_dart_sdk}.patch -if [ -e "$patch" ]; then - (cd flutter && git apply ../$patch) -fi diff --git a/tools/patches/flutter-flutter/create.sh b/tools/patches/flutter-flutter/create.sh deleted file mode 100755 index f0f8511186d..00000000000 --- a/tools/patches/flutter-flutter/create.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. -# -# This script produces a patch to the Flutter Framework from the local -# uncommitted changes in the current engine checkout. -# -# Usage: src/third_party/dart/tools/patches/flutter-flutter/create.sh -# (run inside the root of a flutter engine checkout) - -set -e - -DIR=$(dirname -- "$(which -- "$0")") -. $DIR/../utils.sh - -ensure_in_checkout_root - -pinned_engine_version=$(get_pinned_flutter_engine_version) -patch=src/third_party/dart/tools/patches/flutter-flutter/$pinned_engine_version.patch -rm -f src/third_party/dart/tools/patches/flutter-flutter/*.patch -(cd flutter && git diff) > $patch -if [ ! -s $patch ]; then - rm $patch -fi