From 8f87951759c08f9ef2d0aabdddb090c5b8a88229 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 26 Aug 2021 11:21:49 -0700 Subject: [PATCH] Revert "Build dart:zircon and dart:zircon_ffi (#28071)" (flutter/engine#28313) This reverts commit 1e9b7aed566105eec982ca0eb545139b218bc916. Reverting in order to land revert of the gn script_executable from python3 to vpython3, which is causing flakes on Windows. Issue: https://github.com/flutter/flutter/issues/88719 --- .../src/flutter/shell/platform/fuchsia/BUILD.gn | 1 - .../shell/platform/fuchsia/dart-pkg/BUILD.gn | 7 ------- .../platform/fuchsia/dart-pkg/zircon/BUILD.gn | 16 ---------------- .../fuchsia/dart-pkg/zircon_ffi/BUILD.gn | 7 ------- engine/src/flutter/tools/.vpython | 4 ---- engine/src/flutter/tools/.vpython3 | 5 ----- .../tools/fuchsia/dart/dart_package_config.gni | 4 +++- .../fuchsia/dart/gen_dart_package_config.py | 2 +- .../tools/fuchsia/sdk/find_dart_libraries.py | 2 +- engine/src/flutter/tools/gn | 2 +- .../flutter/tools/python/run_python3_action.py | 6 +++--- 11 files changed, 9 insertions(+), 47 deletions(-) delete mode 100644 engine/src/flutter/shell/platform/fuchsia/dart-pkg/BUILD.gn delete mode 100644 engine/src/flutter/tools/.vpython delete mode 100644 engine/src/flutter/tools/.vpython3 diff --git a/engine/src/flutter/shell/platform/fuchsia/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/BUILD.gn index 6469b19938e..cf4493e5179 100644 --- a/engine/src/flutter/shell/platform/fuchsia/BUILD.gn +++ b/engine/src/flutter/shell/platform/fuchsia/BUILD.gn @@ -77,7 +77,6 @@ group("fuchsia") { deps = [ ":dart_binaries", ":flutter_binaries", - "dart-pkg", "dart_runner:dart_aot_${product_suffix}runner", "dart_runner:dart_jit_${product_suffix}runner", "flutter:flutter_aot_${product_suffix}runner", diff --git a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/BUILD.gn deleted file mode 100644 index e26997f2abf..00000000000 --- a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/BUILD.gn +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -group("dart-pkg") { - deps = [ "zircon:dart_zircon" ] -} diff --git a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon/BUILD.gn index 74355e8e0f5..eedfe3495e8 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon/BUILD.gn +++ b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon/BUILD.gn @@ -3,7 +3,6 @@ # found in the LICENSE file. import("//build/fuchsia/sdk.gni") -import("//flutter/tools/fuchsia/dart/dart_library.gni") config("zircon_config") { include_dirs = [ "." ] @@ -36,18 +35,3 @@ source_set("zircon") { "//flutter/third_party/tonic", ] } - -dart_library("dart_zircon") { - package_name = "zircon" - - sources = [ - "src/handle.dart", - "src/handle_disposition.dart", - "src/handle_waiter.dart", - "src/init.dart", - "src/system.dart", - "zircon.dart", - ] - - deps = [ "../zircon_ffi:dart_zircon_ffi" ] -} diff --git a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon_ffi/BUILD.gn b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon_ffi/BUILD.gn index 3016d4ed0ee..bbce4e82de8 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon_ffi/BUILD.gn +++ b/engine/src/flutter/shell/platform/fuchsia/dart-pkg/zircon_ffi/BUILD.gn @@ -3,7 +3,6 @@ # found in the LICENSE file. import("//build/fuchsia/sdk.gni") -import("//flutter/tools/fuchsia/dart/dart_library.gni") config("zircon_ffi_config") { include_dirs = [ "." ] @@ -32,9 +31,3 @@ shared_library("zircon_ffi") { "//third_party/dart/runtime:dart_api", ] } - -dart_library("dart_zircon_ffi") { - package_name = "zircon_ffi" - - sources = [ "zircon_ffi.dart" ] -} diff --git a/engine/src/flutter/tools/.vpython b/engine/src/flutter/tools/.vpython deleted file mode 100644 index 988c133bfe2..00000000000 --- a/engine/src/flutter/tools/.vpython +++ /dev/null @@ -1,4 +0,0 @@ -wheel: < - name: "infra/python/wheels/pyyaml/${vpython_platform}" - version: "version:3.12" -> diff --git a/engine/src/flutter/tools/.vpython3 b/engine/src/flutter/tools/.vpython3 deleted file mode 100644 index 6de7914a166..00000000000 --- a/engine/src/flutter/tools/.vpython3 +++ /dev/null @@ -1,5 +0,0 @@ -python_version: "3.8" -wheel: < - name: "infra/python/wheels/pyyaml-py3" - version: "version:5.3.1" -> diff --git a/engine/src/flutter/tools/fuchsia/dart/dart_package_config.gni b/engine/src/flutter/tools/fuchsia/dart/dart_package_config.gni index 45dc74d41f5..ba717c69349 100644 --- a/engine/src/flutter/tools/fuchsia/dart/dart_package_config.gni +++ b/engine/src/flutter/tools/fuchsia/dart/dart_package_config.gni @@ -77,7 +77,9 @@ template("dart_package_config") { "visibility", ]) - script = "//flutter/tools/fuchsia/dart/gen_dart_package_config.py" + script = + get_label_info("//flutter/tools/fuchsia/dart:gen_dart_package_config", + "target_out_dir") + "/gen_dart_package_config.pyz" inputs = [ intermediate_file ] outputs = [ package_config_file ] diff --git a/engine/src/flutter/tools/fuchsia/dart/gen_dart_package_config.py b/engine/src/flutter/tools/fuchsia/dart/gen_dart_package_config.py index 68e6851bb15..4eaa22dc6ee 100755 --- a/engine/src/flutter/tools/fuchsia/dart/gen_dart_package_config.py +++ b/engine/src/flutter/tools/fuchsia/dart/gen_dart_package_config.py @@ -1,4 +1,4 @@ -#!/usr/bin/env vpython3 +#!/usr/bin/env python3.8 # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/engine/src/flutter/tools/fuchsia/sdk/find_dart_libraries.py b/engine/src/flutter/tools/fuchsia/sdk/find_dart_libraries.py index a25376f1f85..1d3c0b29188 100755 --- a/engine/src/flutter/tools/fuchsia/sdk/find_dart_libraries.py +++ b/engine/src/flutter/tools/fuchsia/sdk/find_dart_libraries.py @@ -1,4 +1,4 @@ -#!/usr/bin/env vpython3 +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/engine/src/flutter/tools/gn b/engine/src/flutter/tools/gn index 78fd7401304..69569093f0b 100755 --- a/engine/src/flutter/tools/gn +++ b/engine/src/flutter/tools/gn @@ -1,4 +1,4 @@ -#!/usr/bin/env vpython3 +#!/usr/bin/env python3 # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/engine/src/flutter/tools/python/run_python3_action.py b/engine/src/flutter/tools/python/run_python3_action.py index e0b2d7bc4ad..11ba1d83816 100644 --- a/engine/src/flutter/tools/python/run_python3_action.py +++ b/engine/src/flutter/tools/python/run_python3_action.py @@ -1,10 +1,10 @@ -#!/usr/bin/env vpython3 +#!/usr/bin/env python # # Copyright 2021 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import os import sys -import subprocess -subprocess.run(['vpython3'] + sys.argv[1:]) +os.execv('/usr/bin/python3', ['python3'] + sys.argv[1:])