| From 6fefdfc884fb7858bd8cd981e1fdb493da8088b4 Mon Sep 17 00:00:00 2001 |
| From: Alexander Aprelev <aam@google.com> |
| Date: Mon, 7 Oct 2019 23:13:33 -0700 |
| Subject: [PATCH] 2 |
| |
| --- |
| BUILD.gn | 2 +- |
| ci/analyze.sh | 6 +- |
| .../.gitignore | 0 |
| flutter_frontend_server/BUILD.gn | 63 +++++++++++++++++ |
| .../README.md | 0 |
| .../bin/starter.dart | 2 +- |
| .../lib/server.dart | 2 +- |
| .../package_incremental.py | 8 +-- |
| .../pubspec.yaml | 0 |
| frontend_server/BUILD.gn | 68 ++----------------- |
| tools/generate_package_files.py | 2 +- |
| 11 files changed, 80 insertions(+), 73 deletions(-) |
| rename {frontend_server => flutter_frontend_server}/.gitignore (100%) |
| create mode 100644 flutter_frontend_server/BUILD.gn |
| rename {frontend_server => flutter_frontend_server}/README.md (100%) |
| rename {frontend_server => flutter_frontend_server}/bin/starter.dart (76%) |
| rename {frontend_server => flutter_frontend_server}/lib/server.dart (98%) |
| rename {frontend_server => flutter_frontend_server}/package_incremental.py (94%) |
| rename {frontend_server => flutter_frontend_server}/pubspec.yaml (100%) |
| |
| diff --git a/BUILD.gn b/BUILD.gn |
| index b894fe26f..e4ce1dea1 100644 |
| --- a/BUILD.gn |
| +++ b/BUILD.gn |
| @@ -42,7 +42,7 @@ group("flutter") { |
| if (!is_fuchsia && !is_fuchsia_host) { |
| if (current_toolchain == host_toolchain) { |
| public_deps += [ |
| - "$flutter_root/frontend_server", |
| + "$flutter_root/flutter_frontend_server:frontend_server", |
| "//third_party/dart:create_sdk", |
| ] |
| |
| diff --git a/ci/analyze.sh b/ci/analyze.sh |
| index 9ee12a913..6b48c9447 100755 |
| --- a/ci/analyze.sh |
| +++ b/ci/analyze.sh |
| @@ -18,11 +18,11 @@ if [ -n "$RESULTS" ]; then |
| exit 1; |
| fi |
| |
| -echo "Analyzing frontend_server..." |
| +echo "Analyzing flutter_frontend_server..." |
| RESULTS=`dartanalyzer \ |
| - --packages=flutter/frontend_server/.packages \ |
| + --packages=flutter/flutter_frontend_server/.packages \ |
| --options flutter/analysis_options.yaml \ |
| - flutter/frontend_server \ |
| + flutter/flutter_frontend_server \ |
| 2>&1 \ |
| | grep -Ev "No issues found!" \ |
| | grep -Ev "Analyzing.+frontend_server"` |
| diff --git a/frontend_server/.gitignore b/flutter_frontend_server/.gitignore |
| similarity index 100% |
| rename from frontend_server/.gitignore |
| rename to flutter_frontend_server/.gitignore |
| diff --git a/flutter_frontend_server/BUILD.gn b/flutter_frontend_server/BUILD.gn |
| new file mode 100644 |
| index 000000000..37740acaa |
| --- /dev/null |
| +++ b/flutter_frontend_server/BUILD.gn |
| @@ -0,0 +1,63 @@ |
| +# 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. |
| + |
| +if (!is_fuchsia_host && !is_fuchsia) { |
| + import("//third_party/dart/utils/application_snapshot.gni") |
| + |
| + frontend_server_files = |
| + exec_script("//third_party/dart/tools/list_dart_files.py", |
| + [ |
| + "absolute", |
| + rebase_path("."), |
| + ], |
| + "list lines") |
| + |
| + frontend_server_files += |
| + exec_script("//third_party/dart/tools/list_dart_files.py", |
| + [ |
| + "absolute", |
| + rebase_path("../../third_party/dart/pkg"), |
| + ], |
| + "list lines") |
| + |
| + application_snapshot("frontend_server") { |
| + main_dart = "bin/starter.dart" |
| + deps = [ |
| + ":package_incremental_compiler", |
| + "$flutter_root/lib/snapshot:kernel_platform_files", |
| + ] |
| + dot_packages = rebase_path(".packages") |
| + flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") |
| + training_args = [ |
| + "--train", |
| + "--sdk-root=$flutter_patched_sdk", |
| + rebase_path(main_dart), |
| + ] |
| + |
| + inputs = frontend_server_files |
| + } |
| + |
| + # For flutter/flutter#36738 we make the source files available so that |
| + # we can generate a local frontend_server snapshot in the tools cache. |
| + action("package_incremental_compiler") { |
| + script = "$flutter_root/flutter_frontend_server/package_incremental.py" |
| + |
| + inputs = frontend_server_files |
| + |
| + outputs = [ |
| + "$root_gen_dir/dart-pkg/frontend_server/pubspec.yaml", |
| + "$root_gen_dir/dart-pkg/vm/pubspec.yaml", |
| + "$root_gen_dir/dart-pkg/build_integration/pubspec.yaml", |
| + "$root_gen_dir/dart-pkg/front_end/pubspec.yaml", |
| + "$root_gen_dir/dart-pkg/kernel/pubspec.yaml", |
| + "$root_gen_dir/dart-pkg/dev_compiler/pubspec.yaml", |
| + ] |
| + |
| + args = [ |
| + "--input-root=" + rebase_path("//third_party/dart/pkg"), |
| + "--output-root=" + rebase_path("$root_gen_dir/dart-pkg"), |
| + "--frontend-server=" + rebase_path("$flutter_root"), |
| + ] |
| + } |
| +} |
| diff --git a/frontend_server/README.md b/flutter_frontend_server/README.md |
| similarity index 100% |
| rename from frontend_server/README.md |
| rename to flutter_frontend_server/README.md |
| diff --git a/frontend_server/bin/starter.dart b/flutter_frontend_server/bin/starter.dart |
| similarity index 76% |
| rename from frontend_server/bin/starter.dart |
| rename to flutter_frontend_server/bin/starter.dart |
| index da85e5575..862a8a7ea 100644 |
| --- a/frontend_server/bin/starter.dart |
| +++ b/flutter_frontend_server/bin/starter.dart |
| @@ -2,7 +2,7 @@ library frontend_server; |
| |
| import 'dart:io'; |
| |
| -import 'package:frontend_server/server.dart'; |
| +import 'package:flutter_frontend_server/server.dart'; |
| |
| void main(List<String> args) async { |
| final int exitCode = await starter(args); |
| diff --git a/frontend_server/lib/server.dart b/flutter_frontend_server/lib/server.dart |
| similarity index 98% |
| rename from frontend_server/lib/server.dart |
| rename to flutter_frontend_server/lib/server.dart |
| index 8e34efa93..24894c878 100644 |
| --- a/frontend_server/lib/server.dart |
| +++ b/flutter_frontend_server/lib/server.dart |
| @@ -11,7 +11,7 @@ import 'package:args/args.dart'; |
| import 'package:path/path.dart' as path; |
| |
| import 'package:vm/incremental_compiler.dart'; |
| -import 'package:vm/frontend_server.dart' as frontend |
| +import 'package:frontend_server/frontend_server.dart' as frontend |
| show |
| FrontendCompiler, |
| CompilerInterface, |
| diff --git a/frontend_server/package_incremental.py b/flutter_frontend_server/package_incremental.py |
| similarity index 94% |
| rename from frontend_server/package_incremental.py |
| rename to flutter_frontend_server/package_incremental.py |
| index 63b019a33..a8b424260 100755 |
| --- a/frontend_server/package_incremental.py |
| +++ b/flutter_frontend_server/package_incremental.py |
| @@ -15,7 +15,7 @@ PACKAGES = [ |
| "kernel", |
| "front_end", |
| "dev_compiler", |
| - "frontend_server", |
| + "flutter_frontend_server", |
| ] |
| |
| VM_PUBSPEC = r'''name: vm |
| @@ -41,7 +41,7 @@ dependencies: |
| meta: any |
| ''' |
| |
| -FRONTEND_SERVER_PUBSPEC = r'''name: frontend_server |
| +FLUTTER_FRONTEND_SERVER_PUBSPEC = r'''name: flutter_frontend_server |
| version: 0.0.1 |
| environment: |
| sdk: ">=2.2.2 <3.0.0" |
| @@ -87,7 +87,7 @@ dependencies: |
| PUBSPECS = { |
| 'vm': VM_PUBSPEC, |
| 'build_integration': BUILD_INTEGRATION_PUBSPEC, |
| - 'frontend_server': FRONTEND_SERVER_PUBSPEC, |
| + 'flutter_frontend_server': FLUTTER_FRONTEND_SERVER_PUBSPEC, |
| 'kernel': KERNEL_PUBSPEC, |
| 'front_end': FRONT_END_PUBSPEC, |
| 'dev_compiler': DEV_COMPILER_PUBSPEC, |
| @@ -103,7 +103,7 @@ def main(): |
| for package in PACKAGES: |
| base = args.input |
| # Handle different path for frontend_server |
| - if package == 'frontend_server': |
| + if package == 'flutter_frontend_server': |
| base = args.frontend |
| package_root = os.path.join(base, package) |
| for root, directories, files in os.walk(package_root): |
| diff --git a/frontend_server/pubspec.yaml b/flutter_frontend_server/pubspec.yaml |
| similarity index 100% |
| rename from frontend_server/pubspec.yaml |
| rename to flutter_frontend_server/pubspec.yaml |
| diff --git a/frontend_server/BUILD.gn b/frontend_server/BUILD.gn |
| index 330f1e394..6cb8ce88f 100644 |
| --- a/frontend_server/BUILD.gn |
| +++ b/frontend_server/BUILD.gn |
| @@ -6,9 +6,9 @@ if (is_fuchsia_host || is_fuchsia) { |
| import("//build/dart/dart_library.gni") |
| import("//build/dart/dart_tool.gni") |
| |
| - dart_library("frontend_server") { |
| + dart_library("flutter_frontend_server") { |
| disable_analysis = true |
| - package_name = "frontend_server" |
| + package_name = "flutter_frontend_server" |
| |
| sources = [ |
| "server.dart", |
| @@ -19,6 +19,7 @@ if (is_fuchsia_host || is_fuchsia) { |
| "//third_party/dart-pkg/pub/path", |
| "//third_party/dart-pkg/pub/usage", |
| "//third_party/dart/pkg/build_integration", |
| + "//third_party/dart/pkg/frontend_server", |
| "//third_party/dart/pkg/front_end", |
| "//third_party/dart/pkg/kernel", |
| "//third_party/dart/pkg/vm", |
| @@ -27,72 +28,15 @@ if (is_fuchsia_host || is_fuchsia) { |
| |
| dart_tool("frontend_server_tool") { |
| main_dart = "bin/starter.dart" |
| - source_dir = "." |
| + source_dir = "../flutter_frontend_server" |
| disable_analysis = true |
| output_name = "frontend_server" |
| |
| sources = [] |
| |
| deps = [ |
| - ":frontend_server", |
| - ] |
| - } |
| -} else { |
| - import("//third_party/dart/utils/application_snapshot.gni") |
| - |
| - frontend_server_files = |
| - exec_script("//third_party/dart/tools/list_dart_files.py", |
| - [ |
| - "absolute", |
| - rebase_path("."), |
| - ], |
| - "list lines") |
| - |
| - frontend_server_files += |
| - exec_script("//third_party/dart/tools/list_dart_files.py", |
| - [ |
| - "absolute", |
| - rebase_path("../../third_party/dart/pkg"), |
| - ], |
| - "list lines") |
| - |
| - application_snapshot("frontend_server") { |
| - main_dart = "bin/starter.dart" |
| - deps = [ |
| - ":package_incremental_compiler", |
| - "$flutter_root/lib/snapshot:kernel_platform_files", |
| - ] |
| - dot_packages = rebase_path(".packages") |
| - flutter_patched_sdk = rebase_path("$root_out_dir/flutter_patched_sdk") |
| - training_args = [ |
| - "--train", |
| - "--sdk-root=$flutter_patched_sdk", |
| - rebase_path(main_dart), |
| - ] |
| - |
| - inputs = frontend_server_files |
| - } |
| - |
| - # For flutter/flutter#36738 we make the source files available so that |
| - # we can generate a local frontend_server snapshot in the tools cache. |
| - action("package_incremental_compiler") { |
| - script = "$flutter_root/frontend_server/package_incremental.py" |
| - |
| - inputs = frontend_server_files |
| - |
| - outputs = [ |
| - "$root_gen_dir/dart-pkg/frontend_server/pubspec.yaml", |
| - "$root_gen_dir/dart-pkg/vm/pubspec.yaml", |
| - "$root_gen_dir/dart-pkg/build_integration/pubspec.yaml", |
| - "$root_gen_dir/dart-pkg/front_end/pubspec.yaml", |
| - "$root_gen_dir/dart-pkg/kernel/pubspec.yaml", |
| - "$root_gen_dir/dart-pkg/dev_compiler/pubspec.yaml", |
| - ] |
| - |
| - args = [ |
| - "--input-root=" + rebase_path("//third_party/dart/pkg"), |
| - "--output-root=" + rebase_path("$root_gen_dir/dart-pkg"), |
| - "--frontend-server=" + rebase_path("$flutter_root"), |
| + ":flutter_frontend_server", |
| ] |
| } |
| } |
| + |
| diff --git a/tools/generate_package_files.py b/tools/generate_package_files.py |
| index 13399b126..1eb1e6f6c 100644 |
| --- a/tools/generate_package_files.py |
| +++ b/tools/generate_package_files.py |
| @@ -10,7 +10,7 @@ import os |
| import shutil |
| |
| ALL_PACKAGES = { |
| - 'frontend_server': [], |
| + 'flutter_frontend_server': [], |
| } |
| |
| SRC_DIR = os.getcwd() |
| -- |
| 2.23.0.581.g78d2f28ef7-goog |
| |