From 6192857eb80008b251c19ba9fe65f730bf6168a7 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Mon, 11 Dec 2023 15:18:19 -0800 Subject: [PATCH] Move `third_party/yapf` to `flutter/third_party/yapf`. (flutter/engine#48847) As part of eliminating the Flutter buildroot (https://github.com/flutter/flutter/issues/67373), we are moving all third-party dependencies from `//third_party` to `//flutter/third_party`. --- DEPS | 2 +- engine/src/flutter/ci/licenses_golden/excluded_files | 2 +- engine/src/flutter/ci/licenses_golden/tool_signature | 2 +- engine/src/flutter/tools/licenses/lib/paths.dart | 2 +- engine/src/flutter/tools/yapf.bat | 2 +- engine/src/flutter/tools/yapf.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index 55d6085a24d..e6272ccc102 100644 --- a/DEPS +++ b/DEPS @@ -314,7 +314,7 @@ deps = { 'src/third_party/boringssl': Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'), - 'src/third_party/yapf': + 'src/flutter/third_party/yapf': Var('github_git') + '/google/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35', 'src/third_party/boringssl/src': diff --git a/engine/src/flutter/ci/licenses_golden/excluded_files b/engine/src/flutter/ci/licenses_golden/excluded_files index d1aae5bd105..d525a6154aa 100644 --- a/engine/src/flutter/ci/licenses_golden/excluded_files +++ b/engine/src/flutter/ci/licenses_golden/excluded_files @@ -1073,6 +1073,7 @@ ../../../flutter/third_party/wuffs/release/c/README.md ../../../flutter/third_party/wuffs/script ../../../flutter/third_party/wuffs/sync.txt +../../../flutter/third_party/yapf ../../../flutter/tools ../../../flutter/tools/licenses/.dart_tool ../../../flutter/tools/licenses/.gitignore @@ -3194,7 +3195,6 @@ ../../../third_party/vulkan_memory_allocator/src ../../../third_party/vulkan_memory_allocator/tools ../../../third_party/web_dependencies/canvaskit -../../../third_party/yapf ../../../third_party/zlib/.git ../../../third_party/zlib/CMakeLists.txt ../../../third_party/zlib/DIR_METADATA diff --git a/engine/src/flutter/ci/licenses_golden/tool_signature b/engine/src/flutter/ci/licenses_golden/tool_signature index 7b670c796ff..5970ad24731 100644 --- a/engine/src/flutter/ci/licenses_golden/tool_signature +++ b/engine/src/flutter/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 8063c36f273a2ca0d4db5f05f9d5991a +Signature: 9c9e9d44a47e4d85f1debd69bc795b40 diff --git a/engine/src/flutter/tools/licenses/lib/paths.dart b/engine/src/flutter/tools/licenses/lib/paths.dart index 9ed1105d306..a336afbcd02 100644 --- a/engine/src/flutter/tools/licenses/lib/paths.dart +++ b/engine/src/flutter/tools/licenses/lib/paths.dart @@ -96,6 +96,7 @@ final Set skippedPaths = { r'flutter/third_party/txt/third_party/fonts', r'flutter/third_party/wuffs/docs', r'flutter/third_party/wuffs/script', + r'flutter/third_party/yapf', // only used for code formatting r'flutter/tools', r'flutter/web_sdk', // this code is not linked into Flutter apps; it's only used by engine tests and tools r'fuchsia/sdk/linux/docs', @@ -212,7 +213,6 @@ final Set skippedPaths = { r'third_party/vulkan_memory_allocator/src', r'third_party/vulkan_memory_allocator/tools', r'third_party/web_dependencies/canvaskit', // redundant; covered by Skia dependencies - r'third_party/yapf', // only used for code formatting r'third_party/zlib/contrib/minizip/miniunz.c', // sample file r'third_party/zlib/contrib/minizip/minizip.c', // sample file r'tools', // not distributed in binary diff --git a/engine/src/flutter/tools/yapf.bat b/engine/src/flutter/tools/yapf.bat index 587989cedb9..e75ae51364a 100644 --- a/engine/src/flutter/tools/yapf.bat +++ b/engine/src/flutter/tools/yapf.bat @@ -11,6 +11,6 @@ REM work across all platforms! REM REM -------------------------------------------------------------------------- -SET yapf_path=%~dp0\..\..\third_party\yapf +SET yapf_path=%~dp0\..\..\flutter\third_party\yapf cmd /V /C "SET PYTHONPATH=%yapf_path%&& vpython3 %yapf_path%\yapf %*" diff --git a/engine/src/flutter/tools/yapf.sh b/engine/src/flutter/tools/yapf.sh index c3cbd5587e4..48d0974a010 100755 --- a/engine/src/flutter/tools/yapf.sh +++ b/engine/src/flutter/tools/yapf.sh @@ -35,6 +35,6 @@ function follow_links() ( SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")") SRC_DIR="$(cd "$SCRIPT_DIR/../.."; pwd -P)" -YAPF_DIR="$(cd "$SRC_DIR/third_party/yapf"; pwd -P)" +YAPF_DIR="$(cd "$SRC_DIR/flutter/third_party/yapf"; pwd -P)" PYTHONPATH="$YAPF_DIR" python3 "$YAPF_DIR/yapf" "$@"