From 813fd7a5eef9906f82585548dccac46271cb845d Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Tue, 26 Feb 2019 20:54:58 -0800 Subject: [PATCH 01/13] refactor web tooling into patched sdk --- BUILD.gn | 83 +------- flutter_web/BUILD.gn | 134 +++++++++++++ flutter_web/libraries.dart | 325 +++++++++++++++++++++++++++++++ flutter_web/libraries.json | 236 ++++++++++++++++++++++ flutter_web/libraries.yaml | 240 +++++++++++++++++++++++ flutter_web/make_combined_sdk.sh | 16 ++ lib/snapshot/libraries.json | 117 ----------- lib/snapshot/libraries.yaml | 115 ----------- lib/stub_ui/BUILD.gn | 41 ---- lib/stub_ui/libraries.json | 122 ------------ lib/stub_ui/libraries.yaml | 128 ------------ 11 files changed, 952 insertions(+), 605 deletions(-) create mode 100644 flutter_web/BUILD.gn create mode 100644 flutter_web/libraries.dart create mode 100644 flutter_web/libraries.json create mode 100644 flutter_web/libraries.yaml create mode 100755 flutter_web/make_combined_sdk.sh delete mode 100644 lib/stub_ui/BUILD.gn delete mode 100644 lib/stub_ui/libraries.json delete mode 100644 lib/stub_ui/libraries.yaml diff --git a/BUILD.gn b/BUILD.gn index bbd82204f17b6..b9084f31cc170 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -3,19 +3,6 @@ # found in the LICENSE file. import("$flutter_root/common/config.gni") -import("//third_party/dart/build/dart/dart_action.gni") - -# Temporary snapshot copy rules until we can use the full SDK. -_flutter_sdk_snapshots = [ - [ - "dart2js", - "//third_party/dart/utils/compiler:dart2js", - ], - [ - "kernel_worker", - "//third_party/dart/utils/bazel:kernel_worker", - ], -] group("flutter") { testonly = true @@ -36,13 +23,8 @@ group("flutter") { public_deps += [ "$flutter_root/frontend_server", "//third_party/dart:create_sdk", - "$flutter_root/lib/stub_ui:stub_ui", - ":dart2js_platform_files", - ":flutter_dartdevc_kernel_sdk", + "$flutter_root/flutter_web:web_engine", ] - foreach(snapshot, _flutter_sdk_snapshots) { - public_deps += [ ":copy_flutter_${snapshot[0]}_snapshot" ] - } } } @@ -81,66 +63,3 @@ group("dist") { "$flutter_root/sky/dist", ] } - -foreach(snapshot, _flutter_sdk_snapshots) { - copy("copy_flutter_${snapshot[0]}_snapshot") { - deps = [ - snapshot[1], - ] - sources = [ - "$root_gen_dir/${snapshot[0]}.dart.snapshot", - ] - outputs = [ - "$root_out_dir/dart-sdk/bin/snapshots/flutter_{{source_file_part}}", - ] - } -} - -copy("dart2js_platform_files") { - deps = [ - "//third_party/dart/utils/compiler:compile_dart2js_platform" - ] - - sources = [ - "$root_out_dir/dart2js_outline.dill", - "$root_out_dir/dart2js_platform.dill", - ] - - outputs = [ - "$root_out_dir/flutter_patched_sdk/{{source_file_part}}", - ] -} - - -prebuilt_dart_action("flutter_dartdevc_kernel_sdk") { - deps = [ - "//third_party/dart:create_sdk", - ] - - packages = "//third_party/dart/.packages" - - script = "//third_party/dart/pkg/dev_compiler/tool/kernel_sdk.dart" - - inputs = [ - "//third_party/dart/pkg/dev_compiler/tool/kernel_sdk.dart", - ] - - outputs = [ - "$target_gen_dir/kernel/amd/dart_sdk.js", - "$target_gen_dir/kernel/amd/dart_sdk.js.map", - "$target_gen_dir/kernel/common/dart_sdk.js", - "$target_gen_dir/kernel/common/dart_sdk.js.map", - "$target_gen_dir/kernel/es6/dart_sdk.js", - "$target_gen_dir/kernel/es6/dart_sdk.js.map", - "$target_gen_dir/kernel/legacy/dart_sdk.js", - "$target_gen_dir/kernel/legacy/dart_sdk.js.map", - ] - - libraries_path = rebase_path("$flutter_root/lib/snapshot/libraries.json") - output_path = rebase_path("$target_gen_dir/kernel/flutter_ddc_sdk.dill") - - args = [ - "--output=$output_path", - "--libraries=$libraries_path", - ] -} diff --git a/flutter_web/BUILD.gn b/flutter_web/BUILD.gn new file mode 100644 index 0000000000000..c518032e34ffc --- /dev/null +++ b/flutter_web/BUILD.gn @@ -0,0 +1,134 @@ +# Copyright 2019 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. + +_dart_sdk_libraries = [ + "_chrome", + "async", + "core", + "html", + "isolate", + "math", + "typed_data", + "_http", + "cli", + #"dev_compiler", + "indexed_db", + "js", + "mirrors", + "web_audio", + #"_internal", Manually copy certain files from internal to avoid collisions. + "collection", + "developer", + "internal", + "js_util", + "profiler", + "web_gl", + "convert", + "ffi", + "io", + "svg", + "web_sql", +] + +_dart_sdk_internal_libraries = [ + # "js_runtime", + # "sdk_library_metadata", +] + +foreach(library, _dart_sdk_libraries) { + copy("copy_flutter_${library}") { + deps = [ + "//third_party/dart:create_sdk" + ] + sources = exec_script("//third_party/dart/tools/list_dart_files.py", + [ + "absolute", + rebase_path("//third_party/dart/sdk/lib/${library}/"), + ], + "list lines") + + outputs = [ + "$root_out_dir/flutter_patched_sdk/lib/${library}/{{source_file_part}}", + ] + } +} + + +copy("web_engine") { + sources = [ + "$flutter_root/lib/stub_ui/compositing.dart", + "$flutter_root/lib/stub_ui/geometry.dart", + "$flutter_root/lib/stub_ui/hash_codes.dart", + "$flutter_root/lib/stub_ui/hooks.dart", + "$flutter_root/lib/stub_ui/isolate_name_server.dart", + "$flutter_root/lib/stub_ui/lerp.dart", + "$flutter_root/lib/stub_ui/natives.dart", + "$flutter_root/lib/stub_ui/painting.dart", + "$flutter_root/lib/stub_ui/plugins.dart", + "$flutter_root/lib/stub_ui/pointer.dart", + "$flutter_root/lib/stub_ui/semantics.dart", + "$flutter_root/lib/stub_ui/text.dart", + "$flutter_root/lib/stub_ui/ui.dart", + "$flutter_root/lib/stub_ui/versions.dart", + "$flutter_root/lib/stub_ui/window.dart", + ] + + + sdk_copy_deps = [] + foreach(library, _dart_sdk_libraries) { + sdk_copy_deps += [ ":copy_flutter_${library}" ] + } + foreach(library, _dart_sdk_internal_libraries) { + sdk_copy_deps += [ ":copy_flutter_${library}" ] + } + + deps = [ + ":web_libraries_json", + ":web_libraries_dart", + ":dart_sdk_internal", + ] + sdk_copy_deps + + outputs = [ + "$root_out_dir/flutter_patched_sdk/lib/ui/{{source_file_part}}" + ] +} + +copy("web_libraries_json") { + sources = [ + "libraries.json" + ] + + outputs = [ + "$root_out_dir/flutter_patched_sdk/lib/libraries.json" + ] +} + +copy("web_libraries_dart") { + sources = [ + "libraries.dart" + ] + + outputs = [ + "$root_out_dir/flutter_patched_sdk/lib/_internal/libraries.dart" + ] +} + +copy("dart_sdk_internal") { + deps = [ + "//third_party/dart:create_sdk" + ] + + sources = [ + "$root_out_dir/dart-sdk/lib/_internal/ddc_sdk.dill", + "$root_out_dir/dart-sdk/lib/_internal/dart2js_platform.dill", + "$root_out_dir/dart-sdk/lib/_internal/dart2js_server_platform.dill", + "$root_out_dir/dart-sdk/lib/_internal/ddc_sdk.sum", + "$root_out_dir/dart-sdk/lib/_internal/strong.sum", + "$root_out_dir/dart-sdk/lib/_internal/vm_platform_strong.dill", + ] + + outputs = [ + "$root_out_dir/flutter_patched_sdk/lib/_internal/{{source_file_part}}" + ] +} \ No newline at end of file diff --git a/flutter_web/libraries.dart b/flutter_web/libraries.dart new file mode 100644 index 0000000000000..600e3db24be60 --- /dev/null +++ b/flutter_web/libraries.dart @@ -0,0 +1,325 @@ +// Copyright (c) 2012, 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. + +library libraries; + +/** + * A bit flag used by [LibraryInfo] indicating that a library is used by dart2js + */ +const int DART2JS_PLATFORM = 1; + +/** + * A bit flag used by [LibraryInfo] indicating that a library is used by the VM + */ +const int VM_PLATFORM = 2; + +/// The contexts that a library can be used from. +enum Category { + /// Indicates that a library can be used in a browser context. + client, + + /// Indicates that a library can be used in a command line context. + server, + + /// Indicates that a library can be used from embedded devices. + embedded, + + /// Google3-specific: Indicates that a library can be used in a Flutter context. + flutter +} + +Category parseCategory(String name) { + switch (name) { + case "Client": + return Category.client; + case "Server": + return Category.server; + case "Embedded": + return Category.embedded; + case "Flutter": + return Category.flutter; // Google3-specific. + } + return null; +} + +/// Mapping of "dart:" library name (e.g. "core") to information about that +/// library. +const Map libraries = const { + "async": const LibraryInfo("async/async.dart", + categories: "Client,Server", + maturity: Maturity.STABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/async_patch.dart"), + "_chrome": const LibraryInfo("_chrome/dart2js/chrome_dart2js.dart", + categories: "Client", documented: false), + "collection": const LibraryInfo("collection/collection.dart", + categories: "Client,Server,Embedded", + maturity: Maturity.STABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/collection_patch.dart"), + "convert": const LibraryInfo("convert/convert.dart", + categories: "Client,Server", + maturity: Maturity.STABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/convert_patch.dart"), + "core": const LibraryInfo("core/core.dart", + categories: "Client,Server,Embedded", + maturity: Maturity.STABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/core_patch.dart"), + "developer": const LibraryInfo("developer/developer.dart", + categories: "Client,Server,Embedded", + maturity: Maturity.UNSTABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/developer_patch.dart"), + "html": const LibraryInfo("html/dart2js/html_dart2js.dart", + categories: "Client", + maturity: Maturity.WEB_STABLE, + platforms: DART2JS_PLATFORM), + "html_common": const LibraryInfo("html/html_common/html_common.dart", + categories: "Client", + maturity: Maturity.WEB_STABLE, + dart2jsPath: "html/html_common/html_common_dart2js.dart", + documented: false, + implementation: true), + "indexed_db": const LibraryInfo("indexed_db/dart2js/indexed_db_dart2js.dart", + categories: "Client", + maturity: Maturity.WEB_STABLE, + platforms: DART2JS_PLATFORM), + "_http": + const LibraryInfo("_http/http.dart", categories: "", documented: false), + "io": const LibraryInfo("io/io.dart", + categories: "Server", + dart2jsPatchPath: "_internal/js_runtime/lib/io_patch.dart"), + "isolate": const LibraryInfo("isolate/isolate.dart", + categories: "Client,Server", + maturity: Maturity.STABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/isolate_patch.dart"), + "js": const LibraryInfo("js/dart2js/js_dart2js.dart", + categories: "Client", + maturity: Maturity.STABLE, + platforms: DART2JS_PLATFORM), + "_js": const LibraryInfo("js/_js.dart", + categories: "Client", + dart2jsPatchPath: "js/_js_client.dart", + documented: false, + platforms: DART2JS_PLATFORM), + "js_util": const LibraryInfo("js_util/dart2js/js_util_dart2js.dart", + categories: "Client", + maturity: Maturity.STABLE, + platforms: DART2JS_PLATFORM), + "math": const LibraryInfo("math/math.dart", + categories: "Client,Server,Embedded", + maturity: Maturity.STABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/math_patch.dart"), + "mirrors": const LibraryInfo("mirrors/mirrors.dart", + categories: "Client,Server", + maturity: Maturity.UNSTABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/mirrors_patch.dart"), + "nativewrappers": const LibraryInfo("html/dartium/nativewrappers.dart", + categories: "Client", + implementation: true, + documented: false, + platforms: VM_PLATFORM), + "typed_data": const LibraryInfo("typed_data/typed_data.dart", + categories: "Client,Server,Embedded", + maturity: Maturity.STABLE, + dart2jsPatchPath: "_internal/js_runtime/lib/typed_data_patch.dart"), + "_native_typed_data": const LibraryInfo( + "_internal/js_runtime/lib/native_typed_data.dart", + categories: "", + implementation: true, + documented: false, + platforms: DART2JS_PLATFORM), + "cli": const LibraryInfo("cli/cli.dart", + categories: "Server", + dart2jsPatchPath: "_internal/js_runtime/lib/cli_patch.dart"), + "svg": const LibraryInfo("svg/dart2js/svg_dart2js.dart", + categories: "Client", + maturity: Maturity.WEB_STABLE, + platforms: DART2JS_PLATFORM), + "web_audio": const LibraryInfo("web_audio/dart2js/web_audio_dart2js.dart", + categories: "Client", + maturity: Maturity.WEB_STABLE, + platforms: DART2JS_PLATFORM), + "web_gl": const LibraryInfo("web_gl/dart2js/web_gl_dart2js.dart", + categories: "Client", + maturity: Maturity.WEB_STABLE, + platforms: DART2JS_PLATFORM), + "web_sql": const LibraryInfo("web_sql/dart2js/web_sql_dart2js.dart", + categories: "Client", + maturity: Maturity.WEB_STABLE, + platforms: DART2JS_PLATFORM), + "_internal": const LibraryInfo("internal/internal.dart", + categories: "", + documented: false, + dart2jsPatchPath: "_internal/js_runtime/lib/internal_patch.dart"), + "_js_helper": const LibraryInfo("_internal/js_runtime/lib/js_helper.dart", + categories: "", documented: false, platforms: DART2JS_PLATFORM), + "_interceptors": const LibraryInfo( + "_internal/js_runtime/lib/interceptors.dart", + categories: "", + documented: false, + platforms: DART2JS_PLATFORM), + "_foreign_helper": const LibraryInfo( + "_internal/js_runtime/lib/foreign_helper.dart", + categories: "", + documented: false, + platforms: DART2JS_PLATFORM), + "_js_names": const LibraryInfo("_internal/js_runtime/lib/js_names.dart", + categories: "", documented: false, platforms: DART2JS_PLATFORM), + "_js_primitives": const LibraryInfo( + "_internal/js_runtime/lib/js_primitives.dart", + categories: "", + documented: false, + platforms: DART2JS_PLATFORM), + "_js_embedded_names": const LibraryInfo( + "_internal/js_runtime/lib/shared/embedded_names.dart", + categories: "", + documented: false, + platforms: DART2JS_PLATFORM), + "_async_await_error_codes": const LibraryInfo( + "_internal/js_runtime/lib/shared/async_await_error_codes.dart", + categories: "", + documented: false, + platforms: DART2JS_PLATFORM), + "_metadata": const LibraryInfo("html/html_common/metadata.dart", + categories: "", documented: false, platforms: DART2JS_PLATFORM), + + // Google3-specific: Flutter dart:ui library. + "ui": const LibraryInfo("dart_ui/ui.dart", + categories: "Flutter"), + // End Google3-specific +}; + +/** + * Information about a "dart:" library. + */ +class LibraryInfo { + /** + * Path to the library's *.dart file relative to this file. + */ + final String path; + + /** + * The categories in which the library can be used encoded as a + * comma-separated String. + */ + final String _categories; + + /** + * Path to the dart2js library's *.dart file relative to this file + * or null if dart2js uses the common library path defined above. + * Access using the [#getDart2JsPath()] method. + */ + final String dart2jsPath; + + /** + * Path to the dart2js library's patch file relative to this file + * or null if no dart2js patch file associated with this library. + * Access using the [#getDart2JsPatchPath()] method. + */ + final String dart2jsPatchPath; + + /** + * True if this library is documented and should be shown to the user. + */ + final bool documented; + + /** + * Bit flags indicating which platforms consume this library. + * See [DART2JS_LIBRARY] and [VM_LIBRARY]. + */ + final int platforms; + + /** + * True if the library contains implementation details for another library. + * The implication is that these libraries are less commonly used + * and that tools like Dart Editor should not show these libraries + * in a list of all libraries unless the user specifically asks the tool to + * do so. + */ + final bool implementation; + + /** + * States the current maturity of this library. + */ + final Maturity maturity; + + const LibraryInfo(this.path, + {String categories: "", + this.dart2jsPath, + this.dart2jsPatchPath, + this.implementation: false, + this.documented: true, + this.maturity: Maturity.UNSPECIFIED, + this.platforms: DART2JS_PLATFORM | VM_PLATFORM}) + : _categories = categories; + + bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0; + bool get isVmLibrary => (platforms & VM_PLATFORM) != 0; + + /** + * The categories in which the library can be used. + * + * If no categories are specified, the library is internal and can not be + * loaded by user code. + */ + List get categories { + // `"".split(,)` returns [""] not [], so we handle that case separately. + if (_categories == "") return const []; + return _categories.split(",").map(parseCategory).toList(); + } + + bool get isInternal => categories.isEmpty; + + /// The original "categories" String that was passed to the constructor. + /// + /// Can be used to construct a slightly modified copy of this LibraryInfo. + String get categoriesString { + return _categories; + } +} + +/** + * Abstraction to capture the maturity of a library. + */ +class Maturity { + final int level; + final String name; + final String description; + + const Maturity(this.level, this.name, this.description); + + String toString() => "$name: $level\n$description\n"; + + static const Maturity DEPRECATED = const Maturity(0, "Deprecated", + "This library will be remove before next major release."); + + static const Maturity EXPERIMENTAL = const Maturity( + 1, + "Experimental", + "This library is experimental and will likely change or be removed\n" + "in future versions."); + + static const Maturity UNSTABLE = const Maturity( + 2, + "Unstable", + "This library is in still changing and have not yet endured\n" + "sufficient real-world testing.\n" + "Backwards-compatibility is NOT guaranteed."); + + static const Maturity WEB_STABLE = const Maturity( + 3, + "Web Stable", + "This library is tracking the DOM evolution as defined by WC3.\n" + "Backwards-compatibility is NOT guaranteed."); + + static const Maturity STABLE = const Maturity( + 4, + "Stable", + "The library is stable. API backwards-compatibility is guaranteed.\n" + "However implementation details might change."); + + static const Maturity LOCKED = const Maturity(5, "Locked", + "This library will not change except when serious bugs are encountered."); + + static const Maturity UNSPECIFIED = const Maturity(-1, "Unspecified", + "The maturity for this library has not been specified."); +} \ No newline at end of file diff --git a/flutter_web/libraries.json b/flutter_web/libraries.json new file mode 100644 index 0000000000000..0ecd2bc53ab21 --- /dev/null +++ b/flutter_web/libraries.json @@ -0,0 +1,236 @@ +{ + "comment:0": "NOTE: THIS FILE IS GENERATED. DO NOT EDIT.", + "comment:1": "Instead modify 'flutter/flutter_web/libraries.yaml' and follow the instructions therein.", + "dart2js": { + "libraries": { + "async": { + "patches": "lib/_internal/js_runtime/lib/async_patch.dart", + "uri": "lib/async/async.dart" + }, + "_interceptors": { + "uri": "lib/_internal/js_runtime/lib/interceptors.dart" + }, + "mirrors": { + "patches": "lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart", + "supported": false, + "uri": "lib/mirrors/mirrors.dart" + }, + "_js_embedded_names": { + "uri": "lib/_internal/js_runtime/lib/shared/embedded_names.dart" + }, + "io": { + "patches": "lib/_internal/js_runtime/lib/io_patch.dart", + "supported": false, + "uri": "lib/io/io.dart" + }, + "_internal": { + "patches": "lib/_internal/js_runtime/lib/internal_patch.dart", + "uri": "lib/internal/internal.dart" + }, + "_metadata": { + "uri": "lib/html/html_common/metadata.dart" + }, + "_async_await_error_codes": { + "uri": "lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart" + }, + "_http": { + "uri": "lib/_http/http.dart" + }, + "_js_primitives": { + "uri": "lib/_internal/js_runtime/lib/js_primitives.dart" + }, + "_js_helper": { + "uri": "lib/_internal/js_runtime/lib/js_helper.dart" + }, + "_chrome": { + "uri": "lib/_chrome/dart2js/chrome_dart2js.dart" + }, + "html_common": { + "uri": "lib/html/html_common/html_common_dart2js.dart" + }, + "ui": { + "uri": "../lib/ui/ui.dart" + }, + "js": { + "uri": "lib/js/dart2js/js_dart2js.dart" + }, + "_native_typed_data": { + "uri": "lib/_internal/js_runtime/lib/native_typed_data.dart" + }, + "_js_names": { + "uri": "lib/_internal/js_runtime/lib/js_names.dart" + }, + "core": { + "patches": "lib/_internal/js_runtime/lib/core_patch.dart", + "uri": "lib/core/core.dart" + }, + "collection": { + "patches": "lib/_internal/js_runtime/lib/collection_patch.dart", + "uri": "lib/collection/collection.dart" + }, + "js_util": { + "uri": "lib/js_util/dart2js/js_util_dart2js.dart" + }, + "typed_data": { + "patches": "lib/_internal/js_runtime/lib/typed_data_patch.dart", + "uri": "lib/typed_data/typed_data.dart" + }, + "web_audio": { + "uri": "lib/web_audio/dart2js/web_audio_dart2js.dart" + }, + "html": { + "uri": "lib/html/dart2js/html_dart2js.dart" + }, + "isolate": { + "patches": "lib/_internal/js_runtime/lib/isolate_patch.dart", + "supported": false, + "uri": "lib/isolate/isolate.dart" + }, + "developer": { + "patches": "lib/_internal/js_runtime/lib/developer_patch.dart", + "uri": "lib/developer/developer.dart" + }, + "web_gl": { + "uri": "lib/web_gl/dart2js/web_gl_dart2js.dart" + }, + "indexed_db": { + "uri": "lib/indexed_db/dart2js/indexed_db_dart2js.dart" + }, + "_js": { + "patches": "lib/js/_js_client.dart", + "uri": "lib/js/_js.dart" + }, + "convert": { + "patches": "lib/_internal/js_runtime/lib/convert_patch.dart", + "uri": "lib/convert/convert.dart" + }, + "math": { + "patches": "lib/_internal/js_runtime/lib/math_patch.dart", + "uri": "lib/math/math.dart" + }, + "_foreign_helper": { + "uri": "lib/_internal/js_runtime/lib/foreign_helper.dart" + }, + "web_sql": { + "uri": "lib/web_sql/dart2js/web_sql_dart2js.dart" + }, + "svg": { + "uri": "lib/svg/dart2js/svg_dart2js.dart" + } + } + }, + "dartdevc": { + "libraries": { + "async": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart", + "uri": "lib/async/async.dart" + }, + "_runtime": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart" + }, + "_interceptors": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart" + }, + "mirrors": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart", + "supported": false, + "uri": "lib/mirrors/mirrors.dart" + }, + "_debugger": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/debugger.dart" + }, + "io": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart", + "supported": false, + "uri": "lib/io/io.dart" + }, + "_internal": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart", + "uri": "lib/internal/internal.dart" + }, + "_metadata": { + "uri": "lib/html/html_common/metadata.dart" + }, + "_http": { + "uri": "lib/_http/http.dart" + }, + "_js_primitives": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart" + }, + "_js_helper": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart" + }, + "ui": { + "uri": "../lib/ui/ui.dart" + }, + "js": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart" + }, + "_js_mirrors": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart" + }, + "html_common": { + "uri": "lib/html/html_common/html_common_dart2js.dart" + }, + "_native_typed_data": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart" + }, + "core": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart", + "uri": "lib/core/core.dart" + }, + "js_util": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/lib/js_util/dart2js/js_util_dart2js.dart" + }, + "collection": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart", + "uri": "lib/collection/collection.dart" + }, + "typed_data": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart", + "uri": "lib/typed_data/typed_data.dart" + }, + "web_audio": { + "uri": "lib/web_audio/dart2js/web_audio_dart2js.dart" + }, + "html": { + "uri": "lib/html/dart2js/html_dart2js.dart" + }, + "developer": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart", + "uri": "lib/developer/developer.dart" + }, + "isolate": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart", + "supported": false, + "uri": "lib/isolate/isolate.dart" + }, + "web_gl": { + "uri": "lib/web_gl/dart2js/web_gl_dart2js.dart" + }, + "indexed_db": { + "uri": "lib/indexed_db/dart2js/indexed_db_dart2js.dart" + }, + "convert": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart", + "uri": "lib/convert/convert.dart" + }, + "_isolate_helper": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart" + }, + "math": { + "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart", + "uri": "lib/math/math.dart" + }, + "_foreign_helper": { + "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart" + }, + "web_sql": { + "uri": "lib/web_sql/dart2js/web_sql_dart2js.dart" + }, + "svg": { + "uri": "lib/svg/dart2js/svg_dart2js.dart" + } + } + } +} \ No newline at end of file diff --git a/flutter_web/libraries.yaml b/flutter_web/libraries.yaml new file mode 100644 index 0000000000000..450073758baff --- /dev/null +++ b/flutter_web/libraries.yaml @@ -0,0 +1,240 @@ +# Copyright (c) 2017, 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. + +# Note: if you edit this file, you must also edit libraries.json in this +# directory: +# +#. python third_party/dart/tools/yaml2json.py flutter/lib/snapshot/libraries.yaml flutter/lib/snapshot/libraries.json +# +# We currently have several different files that needs to be updated when +# changing libraries, sources, and patch files. See +# https://github.com/dart-lang/sdk/issues/28836. + +dartdevc: + libraries: + _runtime: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart" + + _debugger: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/debugger.dart" + + _foreign_helper: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart" + + _http: + uri: "lib/_http/http.dart" + + _interceptors: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart" + + _internal: + uri: "lib/internal/internal.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart" + + _isolate_helper: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart" + + _js_helper: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart" + + _js_mirrors: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart" + + _js_primitives: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart" + + _metadata: + uri: "lib/html/html_common/metadata.dart" + + _native_typed_data: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart" + + async: + uri: "lib/async/async.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart" + + collection: + uri: "lib/collection/collection.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart" + + convert: + uri: "lib/convert/convert.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart" + + core: + uri: "lib/core/core.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart" + + developer: + uri: "lib/developer/developer.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart" + + io: + uri: "lib/io/io.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart" + supported: false + + isolate: + uri: "lib/isolate/isolate.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart" + supported: false + + mirrors: + uri: "lib/mirrors/mirrors.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart" + supported: false + + math: + uri: "lib/math/math.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart" + + typed_data: + uri: "lib/typed_data/typed_data.dart" + patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart" + + html: + uri: "lib/html/dart2js/html_dart2js.dart" + + html_common: + uri: "lib/html/html_common/html_common_dart2js.dart" + + indexed_db: + uri: "lib/indexed_db/dart2js/indexed_db_dart2js.dart" + + js: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart" + + js_util: + uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/lib/js_util/dart2js/js_util_dart2js.dart" + + svg: + uri: "lib/svg/dart2js/svg_dart2js.dart" + + web_audio: + uri: "lib/web_audio/dart2js/web_audio_dart2js.dart" + + web_gl: + uri: "lib/web_gl/dart2js/web_gl_dart2js.dart" + + web_sql: + uri: "lib/web_sql/dart2js/web_sql_dart2js.dart" + + ui: + uri: "../lib/ui/ui.dart" + +dart2js: + libraries: + ui: + uri: "../lib/ui/ui.dart" + + async: + uri: "lib/async/async.dart" + patches: "lib/_internal/js_runtime/lib/async_patch.dart" + + _chrome: + uri: "lib/_chrome/dart2js/chrome_dart2js.dart" + + collection: + uri: "lib/collection/collection.dart" + patches: "lib/_internal/js_runtime/lib/collection_patch.dart" + + convert: + uri: "lib/convert/convert.dart" + patches: "lib/_internal/js_runtime/lib/convert_patch.dart" + + core: + uri: "lib/core/core.dart" + patches: "lib/_internal/js_runtime/lib/core_patch.dart" + + developer: + uri: "lib/developer/developer.dart" + patches: "lib/_internal/js_runtime/lib/developer_patch.dart" + + html: + uri: "lib/html/dart2js/html_dart2js.dart" + + html_common: + uri: "lib/html/html_common/html_common_dart2js.dart" + + indexed_db: + uri: "lib/indexed_db/dart2js/indexed_db_dart2js.dart" + + _http: + uri: "lib/_http/http.dart" + + io: + uri: "lib/io/io.dart" + patches: "lib/_internal/js_runtime/lib/io_patch.dart" + supported: false + + isolate: + uri: "lib/isolate/isolate.dart" + patches: "lib/_internal/js_runtime/lib/isolate_patch.dart" + supported: false + + js: + uri: "lib/js/dart2js/js_dart2js.dart" + + _js: + uri: "lib/js/_js.dart" + patches: "lib/js/_js_client.dart" + + js_util: + uri: "lib/js_util/dart2js/js_util_dart2js.dart" + + math: + uri: "lib/math/math.dart" + patches: "lib/_internal/js_runtime/lib/math_patch.dart" + + mirrors: + uri: "lib/mirrors/mirrors.dart" + patches: "lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart" + supported: false + + typed_data: + uri: "lib/typed_data/typed_data.dart" + patches: "lib/_internal/js_runtime/lib/typed_data_patch.dart" + + _native_typed_data: + uri: "lib/_internal/js_runtime/lib/native_typed_data.dart" + + svg: + uri: "lib/svg/dart2js/svg_dart2js.dart" + + web_audio: + uri: "lib/web_audio/dart2js/web_audio_dart2js.dart" + + web_gl: + uri: "lib/web_gl/dart2js/web_gl_dart2js.dart" + + web_sql: + uri: "lib/web_sql/dart2js/web_sql_dart2js.dart" + + _internal: + uri: "lib/internal/internal.dart" + patches: "lib/_internal/js_runtime/lib/internal_patch.dart" + + _js_helper: + uri: "lib/_internal/js_runtime/lib/js_helper.dart" + + _interceptors: + uri: "lib/_internal/js_runtime/lib/interceptors.dart" + + _foreign_helper: + uri: "lib/_internal/js_runtime/lib/foreign_helper.dart" + + _js_names: + uri: "lib/_internal/js_runtime/lib/js_names.dart" + + _js_primitives: + uri: "lib/_internal/js_runtime/lib/js_primitives.dart" + + _js_embedded_names: + uri: "lib/_internal/js_runtime/lib/shared/embedded_names.dart" + + _async_await_error_codes: + uri: "lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart" + + _metadata: + uri: "lib/html/html_common/metadata.dart" \ No newline at end of file diff --git a/flutter_web/make_combined_sdk.sh b/flutter_web/make_combined_sdk.sh new file mode 100755 index 0000000000000..06b673baba8a2 --- /dev/null +++ b/flutter_web/make_combined_sdk.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Reference script for creating patched sdk locally. +# Copy normal dart sources into flutter_patched sdk +mkdir -p out/host_debug_unopt/flutter_patched_sdk/lib +cp -RL out/host_debug_unopt/dart-sdk/lib/ out/host_debug_unopt/flutter_patched_sdk/lib + +# Copy stub ui dart sources into flutter_patched sdk +mkdir -p out/host_debug_unopt/flutter_patched_sdk/lib/ui +cp -RL flutter/lib/stub_ui/ out/host_debug_unopt/flutter_patched_sdk/lib/ui + +# Copy libraries.json into flutter patched sdk. +cp -RL flutter/flutter_web/libraries.json out/host_debug_unopt/flutter_patched_sdk/lib/libraries.json + +# Copy libraries.dart into flutter patched sdk +cp -RL flutter/flutter_web/libraries.dart out/host_debug_unopt/flutter_patched_sdk/lib/_internal/libraries.dart diff --git a/lib/snapshot/libraries.json b/lib/snapshot/libraries.json index bc3d0d832c952..99ef4cd778f8c 100644 --- a/lib/snapshot/libraries.json +++ b/lib/snapshot/libraries.json @@ -1,123 +1,6 @@ { "comment:0": "NOTE: THIS FILE IS GENERATED. DO NOT EDIT.", "comment:1": "Instead modify 'flutter/lib/snapshot/libraries.yaml' and follow the instructions therein.", - "none": { - "libraries": {} - }, - "dartdevc": { - "libraries": { - "async": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart", - "uri": "../../../third_party/dart/sdk/lib/async/async.dart" - }, - "_runtime": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart" - }, - "_interceptors": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart" - }, - "mirrors": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart", - "supported": false, - "uri": "../../../third_party/dart/sdk/lib/mirrors/mirrors.dart" - }, - "_debugger": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/debugger.dart" - }, - "io": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart", - "supported": false, - "uri": "../../../third_party/dart/sdk/lib/io/io.dart" - }, - "_internal": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart", - "uri": "../../../third_party/dart/sdk/lib/internal/internal.dart" - }, - "_metadata": { - "uri": "../../../third_party/dart/sdk/lib/html/html_common/metadata.dart" - }, - "_http": { - "uri": "../../../third_party/dart/sdk/lib/_http/http.dart" - }, - "_js_primitives": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart" - }, - "_js_helper": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart" - }, - "ui": { - "uri": "flutter/lib/stub_ui/ui.dart" - }, - "js": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart" - }, - "_js_mirrors": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart" - }, - "html_common": { - "uri": "../../../third_party/dart/sdk/lib/html/html_common/html_common_dart2js.dart" - }, - "_native_typed_data": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart" - }, - "core": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart", - "uri": "../../../third_party/dart/sdk/lib/core/core.dart" - }, - "js_util": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/lib/js_util/dart2js/js_util_dart2js.dart" - }, - "collection": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart", - "uri": "../../../third_party/dart/sdk/lib/collection/collection.dart" - }, - "typed_data": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart", - "uri": "../../../third_party/dart/sdk/lib/typed_data/typed_data.dart" - }, - "web_audio": { - "uri": "../../../third_party/dart/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart" - }, - "html": { - "uri": "../../../third_party/dart/sdk/lib/html/dart2js/html_dart2js.dart" - }, - "developer": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart", - "uri": "../../../third_party/dart/sdk/lib/developer/developer.dart" - }, - "isolate": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart", - "supported": false, - "uri": "../../../third_party/dart/sdk/lib/isolate/isolate.dart" - }, - "web_gl": { - "uri": "../../../third_party/dart/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart" - }, - "indexed_db": { - "uri": "../../../third_party/dart/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart" - }, - "convert": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart", - "uri": "../../../third_party/dart/sdk/lib/convert/convert.dart" - }, - "_isolate_helper": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart" - }, - "math": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart", - "uri": "../../../third_party/dart/sdk/lib/math/math.dart" - }, - "_foreign_helper": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart" - }, - "web_sql": { - "uri": "../../../third_party/dart/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart" - }, - "svg": { - "uri": "../../../third_party/dart/sdk/lib/svg/dart2js/svg_dart2js.dart" - } - } - }, "flutter": { "libraries": { "_builtin": { diff --git a/lib/snapshot/libraries.yaml b/lib/snapshot/libraries.yaml index cb65d57bd7b8b..c4244eaff8719 100644 --- a/lib/snapshot/libraries.yaml +++ b/lib/snapshot/libraries.yaml @@ -11,9 +11,6 @@ # changing libraries, sources, and patch files. See # https://github.com/dart-lang/sdk/issues/28836. -none: - libraries: {} - flutter: libraries: _builtin: @@ -150,115 +147,3 @@ flutter: vmservice_io: uri: "../../../third_party/dart/runtime/bin/vmservice/vmservice_io.dart" - -dartdevc: - libraries: - _runtime: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart" - - _debugger: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/debugger.dart" - - _foreign_helper: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart" - - _http: - uri: "../../../third_party/dart/sdk/lib/_http/http.dart" - - _interceptors: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart" - - _internal: - uri: "../../../third_party/dart/sdk/lib/internal/internal.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/internal_patch.dart" - - _isolate_helper: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart" - - _js_helper: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart" - - _js_mirrors: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart" - - _js_primitives: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart" - - _metadata: - uri: "../../../third_party/dart/sdk/lib/html/html_common/metadata.dart" - - _native_typed_data: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/native_typed_data.dart" - - async: - uri: "../../../third_party/dart/sdk/lib/async/async.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart" - - collection: - uri: "../../../third_party/dart/sdk/lib/collection/collection.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart" - - convert: - uri: "../../../third_party/dart/sdk/lib/convert/convert.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart" - - core: - uri: "../../../third_party/dart/sdk/lib/core/core.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart" - - developer: - uri: "../../../third_party/dart/sdk/lib/developer/developer.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart" - - io: - uri: "../../../third_party/dart/sdk/lib/io/io.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart" - supported: false - - isolate: - uri: "../../../third_party/dart/sdk/lib/isolate/isolate.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart" - supported: false - - mirrors: - uri: "../../../third_party/dart/sdk/lib/mirrors/mirrors.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart" - supported: false - - math: - uri: "../../../third_party/dart/sdk/lib/math/math.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart" - - typed_data: - uri: "../../../third_party/dart/sdk/lib/typed_data/typed_data.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart" - - html: - uri: "../../../third_party/dart/sdk/lib/html/dart2js/html_dart2js.dart" - - html_common: - uri: "../../../third_party/dart/sdk/lib/html/html_common/html_common_dart2js.dart" - - indexed_db: - uri: "../../../third_party/dart/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart" - - js: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart" - - js_util: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/lib/js_util/dart2js/js_util_dart2js.dart" - - svg: - uri: "../../../third_party/dart/sdk/lib/svg/dart2js/svg_dart2js.dart" - - web_audio: - uri: "../../../third_party/dart/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart" - - web_gl: - uri: "../../../third_party/dart/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart" - - web_sql: - uri: "../../../third_party/dart/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart" - - ui: - uri: "flutter/lib/stub_ui/ui.dart" diff --git a/lib/stub_ui/BUILD.gn b/lib/stub_ui/BUILD.gn deleted file mode 100644 index 218f0344083df..0000000000000 --- a/lib/stub_ui/BUILD.gn +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2019 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. - -copy("stub_ui") { - sources = [ - "compositing.dart", - "geometry.dart", - "hash_codes.dart", - "hooks.dart", - "isolate_name_server.dart", - "lerp.dart", - "natives.dart", - "painting.dart", - "plugins.dart", - "pointer.dart", - "semantics.dart", - "text.dart", - "ui.dart", - "versions.dart", - "window.dart", - ] - - deps = [ - ":stub_libraries", - ] - - outputs = [ - "$root_out_dir/flutter_patched_sdk/stub_ui/{{source_file_part}}" - ] -} - -copy("stub_libraries") { - sources = [ - "$flutter_root/lib/stub_ui/libraries.json" - ] - - outputs = [ - "$root_out_dir/flutter_patched_sdk/libraries.json" - ] -} diff --git a/lib/stub_ui/libraries.json b/lib/stub_ui/libraries.json deleted file mode 100644 index 60313c4ce6cbc..0000000000000 --- a/lib/stub_ui/libraries.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "comment:0": "NOTE: THIS FILE IS GENERATED. DO NOT EDIT.", - "comment:1": "Instead modify 'flutter/lib/stub_ui/libraries.yaml' and follow the instructions therein.", - "dart2js": { - "libraries": { - "async": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart", - "uri": "../../../../dart-sdk/lib/async/async.dart" - }, - "_interceptors": { - "uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart" - }, - "mirrors": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart", - "supported": false, - "uri": "../../../../dart-sdk/lib/mirrors/mirrors.dart" - }, - "_js_embedded_names": { - "uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart" - }, - "io": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/io_patch.dart", - "supported": false, - "uri": "../../../../dart-sdk/lib/io/io.dart" - }, - "_internal": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/internal_patch.dart", - "uri": "../../../../dart-sdk/lib/internal/internal.dart" - }, - "_metadata": { - "uri": "../../../../dart-sdk/lib/html/html_common/metadata.dart" - }, - "_async_await_error_codes": { - "uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart" - }, - "_http": { - "uri": "../../../../dart-sdk/lib/_http/http.dart" - }, - "_js_primitives": { - "uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart" - }, - "_js_helper": { - "uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart" - }, - "_chrome": { - "uri": "../../../../dart-sdk/lib/_chrome/dart2js/chrome_dart2js.dart" - }, - "html_common": { - "uri": "../../../../dart-sdk/lib/html/html_common/html_common_dart2js.dart" - }, - "ui": { - "uri": "stub_ui/ui.dart" - }, - "js": { - "uri": "../../../../dart-sdk/lib/js/dart2js/js_dart2js.dart" - }, - "_native_typed_data": { - "uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart" - }, - "_js_names": { - "uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_names.dart" - }, - "core": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/core_patch.dart", - "uri": "../../../../dart-sdk/lib/core/core.dart" - }, - "collection": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/collection_patch.dart", - "uri": "../../../../dart-sdk/lib/collection/collection.dart" - }, - "js_util": { - "uri": "../../../../dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart" - }, - "typed_data": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/typed_data_patch.dart", - "uri": "../../../../dart-sdk/lib/typed_data/typed_data.dart" - }, - "web_audio": { - "uri": "../../../../dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart" - }, - "html": { - "uri": "../../../../dart-sdk/lib/html/dart2js/html_dart2js.dart" - }, - "isolate": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/isolate_patch.dart", - "supported": false, - "uri": "../../../../dart-sdk/lib/isolate/isolate.dart" - }, - "developer": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/developer_patch.dart", - "uri": "../../../../dart-sdk/lib/developer/developer.dart" - }, - "web_gl": { - "uri": "../../../../dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart" - }, - "indexed_db": { - "uri": "../../../../dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart" - }, - "_js": { - "patches": "../../../../dart-sdk/lib/js/_js_client.dart", - "uri": "../../../../dart-sdk/lib/js/_js.dart" - }, - "convert": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/convert_patch.dart", - "uri": "../../../../dart-sdk/lib/convert/convert.dart" - }, - "math": { - "patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/math_patch.dart", - "uri": "../../../../dart-sdk/lib/math/math.dart" - }, - "_foreign_helper": { - "uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart" - }, - "web_sql": { - "uri": "../../../../dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart" - }, - "svg": { - "uri": "../../../../dart-sdk/lib/svg/dart2js/svg_dart2js.dart" - } - } - } -} \ No newline at end of file diff --git a/lib/stub_ui/libraries.yaml b/lib/stub_ui/libraries.yaml deleted file mode 100644 index aded84171f6e5..0000000000000 --- a/lib/stub_ui/libraries.yaml +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright (c) 2017, 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. - -# Note: if you edit this file, you must also edit libraries.json in this -# directory: -# -#. python third_party/dart/tools/yaml2json.py flutter/lib/snapshot/libraries.yaml flutter/lib/snapshot/libraries.json -# -# We currently have several different files that needs to be updated when -# changing libraries, sources, and patch files. See -# https://github.com/dart-lang/sdk/issues/28836. - -dart2js: - libraries: - ui: - uri: "stub_ui/ui.dart" - - async: - uri: "../../../../dart-sdk/lib/async/async.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart" - - _chrome: - uri: "../../../../dart-sdk/lib/_chrome/dart2js/chrome_dart2js.dart" - - collection: - uri: "../../../../dart-sdk/lib/collection/collection.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/collection_patch.dart" - - convert: - uri: "../../../../dart-sdk/lib/convert/convert.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/convert_patch.dart" - - core: - uri: "../../../../dart-sdk/lib/core/core.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/core_patch.dart" - - developer: - uri: "../../../../dart-sdk/lib/developer/developer.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/developer_patch.dart" - - html: - uri: "../../../../dart-sdk/lib/html/dart2js/html_dart2js.dart" - - html_common: - uri: "../../../../dart-sdk/lib/html/html_common/html_common_dart2js.dart" - - indexed_db: - uri: "../../../../dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart" - - _http: - uri: "../../../../dart-sdk/lib/_http/http.dart" - - io: - uri: "../../../../dart-sdk/lib/io/io.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/io_patch.dart" - supported: false - - isolate: - uri: "../../../../dart-sdk/lib/isolate/isolate.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/isolate_patch.dart" - supported: false - - js: - uri: "../../../../dart-sdk/lib/js/dart2js/js_dart2js.dart" - - _js: - uri: "../../../../dart-sdk/lib/js/_js.dart" - patches: "../../../../dart-sdk/lib/js/_js_client.dart" - - js_util: - uri: "../../../../dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart" - - math: - uri: "../../../../dart-sdk/lib/math/math.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/math_patch.dart" - - mirrors: - uri: "../../../../dart-sdk/lib/mirrors/mirrors.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart" - supported: false - - typed_data: - uri: "../../../../dart-sdk/lib/typed_data/typed_data.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/typed_data_patch.dart" - - _native_typed_data: - uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart" - - svg: - uri: "../../../../dart-sdk/lib/svg/dart2js/svg_dart2js.dart" - - web_audio: - uri: "../../../../dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart" - - web_gl: - uri: "../../../../dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart" - - web_sql: - uri: "../../../../dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart" - - _internal: - uri: "../../../../dart-sdk/lib/internal/internal.dart" - patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/internal_patch.dart" - - _js_helper: - uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart" - - _interceptors: - uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart" - - _foreign_helper: - uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart" - - _js_names: - uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_names.dart" - - _js_primitives: - uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart" - - _js_embedded_names: - uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart" - - _async_await_error_codes: - uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart" - - _metadata: - uri: "../../../../dart-sdk/lib/html/html_common/metadata.dart" \ No newline at end of file From 5581f9618f86ebdbe57a6f56be7ff847db8a6af5 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Thu, 28 Feb 2019 21:05:30 -0800 Subject: [PATCH 02/13] fix license file --- ci/licenses_golden/licenses_flutter | 38 +++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index f03f4dff62755..9730d3b4a0383 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -117,6 +117,7 @@ FILE: ../../../flutter/flow/skia_gpu_object.h FILE: ../../../flutter/flow/texture.cc FILE: ../../../flutter/flow/texture.h FILE: ../../../flutter/flutter_kernel_transformers/lib/track_widget_constructor_locations.dart +FILE: ../../../flutter/flutter_web/libraries.json FILE: ../../../flutter/fml/arraysize.h FILE: ../../../flutter/fml/base32.cc FILE: ../../../flutter/fml/base32.h @@ -253,7 +254,6 @@ FILE: ../../../flutter/lib/stub_ui/hash_codes.dart FILE: ../../../flutter/lib/stub_ui/hooks.dart FILE: ../../../flutter/lib/stub_ui/isolate_name_server.dart FILE: ../../../flutter/lib/stub_ui/lerp.dart -FILE: ../../../flutter/lib/stub_ui/libraries.json FILE: ../../../flutter/lib/stub_ui/natives.dart FILE: ../../../flutter/lib/stub_ui/painting.dart FILE: ../../../flutter/lib/stub_ui/plugins.dart @@ -733,6 +733,40 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== +==================================================================================================== +LIBRARY: engine +ORIGIN: ../../../flutter/flutter_web/libraries.dart + ../../../third_party/dart/LICENSE +TYPE: LicenseType.bsd +FILE: ../../../flutter/flutter_web/libraries.dart +---------------------------------------------------------------------------------------------------- +Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +for details. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +==================================================================================================== + ==================================================================================================== LIBRARY: txt ORIGIN: ../../../flutter/third_party/txt/LICENSE @@ -1019,4 +1053,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================================================== -Total license count: 3 +Total license count: 4 From 46ebad83579bd143a2d9c73ed8d50106093b13e9 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Thu, 28 Feb 2019 21:08:39 -0800 Subject: [PATCH 03/13] rename to web sdk --- BUILD.gn | 2 +- {flutter_web => web_sdk}/BUILD.gn | 9 ++------- {flutter_web => web_sdk}/libraries.dart | 2 +- {flutter_web => web_sdk}/libraries.json | 0 {flutter_web => web_sdk}/libraries.yaml | 0 {flutter_web => web_sdk}/make_combined_sdk.sh | 0 6 files changed, 4 insertions(+), 9 deletions(-) rename {flutter_web => web_sdk}/BUILD.gn (96%) rename {flutter_web => web_sdk}/libraries.dart (99%) rename {flutter_web => web_sdk}/libraries.json (100%) rename {flutter_web => web_sdk}/libraries.yaml (100%) rename {flutter_web => web_sdk}/make_combined_sdk.sh (100%) diff --git a/BUILD.gn b/BUILD.gn index b9084f31cc170..248524f872551 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -23,7 +23,7 @@ group("flutter") { public_deps += [ "$flutter_root/frontend_server", "//third_party/dart:create_sdk", - "$flutter_root/flutter_web:web_engine", + "$flutter_root/web_sdk", ] } } diff --git a/flutter_web/BUILD.gn b/web_sdk/BUILD.gn similarity index 96% rename from flutter_web/BUILD.gn rename to web_sdk/BUILD.gn index c518032e34ffc..1f241c3265642 100644 --- a/flutter_web/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -31,11 +31,6 @@ _dart_sdk_libraries = [ "web_sql", ] -_dart_sdk_internal_libraries = [ - # "js_runtime", - # "sdk_library_metadata", -] - foreach(library, _dart_sdk_libraries) { copy("copy_flutter_${library}") { deps = [ @@ -55,7 +50,7 @@ foreach(library, _dart_sdk_libraries) { } -copy("web_engine") { +copy("web_sdk") { sources = [ "$flutter_root/lib/stub_ui/compositing.dart", "$flutter_root/lib/stub_ui/geometry.dart", @@ -131,4 +126,4 @@ copy("dart_sdk_internal") { outputs = [ "$root_out_dir/flutter_patched_sdk/lib/_internal/{{source_file_part}}" ] -} \ No newline at end of file +} diff --git a/flutter_web/libraries.dart b/web_sdk/libraries.dart similarity index 99% rename from flutter_web/libraries.dart rename to web_sdk/libraries.dart index 600e3db24be60..a5db9639ff4c4 100644 --- a/flutter_web/libraries.dart +++ b/web_sdk/libraries.dart @@ -182,7 +182,7 @@ const Map libraries = const { "_metadata": const LibraryInfo("html/html_common/metadata.dart", categories: "", documented: false, platforms: DART2JS_PLATFORM), - // Google3-specific: Flutter dart:ui library. + // Flutter dart:ui library. "ui": const LibraryInfo("dart_ui/ui.dart", categories: "Flutter"), // End Google3-specific diff --git a/flutter_web/libraries.json b/web_sdk/libraries.json similarity index 100% rename from flutter_web/libraries.json rename to web_sdk/libraries.json diff --git a/flutter_web/libraries.yaml b/web_sdk/libraries.yaml similarity index 100% rename from flutter_web/libraries.yaml rename to web_sdk/libraries.yaml diff --git a/flutter_web/make_combined_sdk.sh b/web_sdk/make_combined_sdk.sh similarity index 100% rename from flutter_web/make_combined_sdk.sh rename to web_sdk/make_combined_sdk.sh From e2744c20c568002ba582433160f13c2f2d17945b Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 28 Feb 2019 21:11:03 -0800 Subject: [PATCH 04/13] Update libraries.dart --- web_sdk/libraries.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web_sdk/libraries.dart b/web_sdk/libraries.dart index a5db9639ff4c4..2efe787f5f425 100644 --- a/web_sdk/libraries.dart +++ b/web_sdk/libraries.dart @@ -1,6 +1,6 @@ -// Copyright (c) 2012, 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. +// Copyright 2019 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. library libraries; @@ -322,4 +322,4 @@ class Maturity { static const Maturity UNSPECIFIED = const Maturity(-1, "Unspecified", "The maturity for this library has not been specified."); -} \ No newline at end of file +} From 6c72a7738e06bd90b84cd3c6db4cc3f1616a28ee Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Sat, 2 Mar 2019 12:01:29 -0800 Subject: [PATCH 05/13] only copy existing dill files for now --- web_sdk/BUILD.gn | 31 +++++++++++++++---------------- web_sdk/libraries.dart | 8 ++++---- web_sdk/libraries.json | 2 +- web_sdk/libraries.yaml | 4 ++-- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index 1f241c3265642..88f2b704128bb 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -31,6 +31,20 @@ _dart_sdk_libraries = [ "web_sql", ] +group("web_sdk") { + sdk_copy_deps = [] + foreach(library, _dart_sdk_libraries) { + sdk_copy_deps += [ ":copy_flutter_${library}" ] + } + + deps = [ + ":web_ui_sources", + ":web_libraries_json", + ":web_libraries_dart", + ":dart_sdk_internal", + ] + sdk_copy_deps +} + foreach(library, _dart_sdk_libraries) { copy("copy_flutter_${library}") { deps = [ @@ -50,7 +64,7 @@ foreach(library, _dart_sdk_libraries) { } -copy("web_sdk") { +copy("web_ui_sources") { sources = [ "$flutter_root/lib/stub_ui/compositing.dart", "$flutter_root/lib/stub_ui/geometry.dart", @@ -69,21 +83,6 @@ copy("web_sdk") { "$flutter_root/lib/stub_ui/window.dart", ] - - sdk_copy_deps = [] - foreach(library, _dart_sdk_libraries) { - sdk_copy_deps += [ ":copy_flutter_${library}" ] - } - foreach(library, _dart_sdk_internal_libraries) { - sdk_copy_deps += [ ":copy_flutter_${library}" ] - } - - deps = [ - ":web_libraries_json", - ":web_libraries_dart", - ":dart_sdk_internal", - ] + sdk_copy_deps - outputs = [ "$root_out_dir/flutter_patched_sdk/lib/ui/{{source_file_part}}" ] diff --git a/web_sdk/libraries.dart b/web_sdk/libraries.dart index a5db9639ff4c4..40533095a6489 100644 --- a/web_sdk/libraries.dart +++ b/web_sdk/libraries.dart @@ -1,6 +1,6 @@ -// Copyright (c) 2012, 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. +// Copyright 2019 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. library libraries; @@ -86,7 +86,7 @@ const Map libraries = const { const LibraryInfo("_http/http.dart", categories: "", documented: false), "io": const LibraryInfo("io/io.dart", categories: "Server", - dart2jsPatchPath: "_internal/js_runtime/lib/io_patch.dart"), + dart2jsPatchPath: "../../../flutter/web_sdk/io_patch.dart"), "isolate": const LibraryInfo("isolate/isolate.dart", categories: "Client,Server", maturity: Maturity.STABLE, diff --git a/web_sdk/libraries.json b/web_sdk/libraries.json index 0ecd2bc53ab21..a9203707e82f4 100644 --- a/web_sdk/libraries.json +++ b/web_sdk/libraries.json @@ -140,7 +140,7 @@ "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/debugger.dart" }, "io": { - "patches": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart", + "patches": "io_patch.dart", "supported": false, "uri": "lib/io/io.dart" }, diff --git a/web_sdk/libraries.yaml b/web_sdk/libraries.yaml index 450073758baff..2516e18d4fdbf 100644 --- a/web_sdk/libraries.yaml +++ b/web_sdk/libraries.yaml @@ -72,7 +72,7 @@ dartdevc: io: uri: "lib/io/io.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart" + patches: "io_patch.dart" supported: false isolate: @@ -165,7 +165,7 @@ dart2js: io: uri: "lib/io/io.dart" - patches: "lib/_internal/js_runtime/lib/io_patch.dart" + patches: "io_patch.dart" supported: false isolate: From d9293d235097137d1cad9f5a79e1f8ccc9475eb0 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Sat, 2 Mar 2019 13:00:49 -0800 Subject: [PATCH 06/13] fix licenses --- ci/licenses_golden/licenses_flutter | 37 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 9730d3b4a0383..9e8102ecd5503 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -117,7 +117,6 @@ FILE: ../../../flutter/flow/skia_gpu_object.h FILE: ../../../flutter/flow/texture.cc FILE: ../../../flutter/flow/texture.h FILE: ../../../flutter/flutter_kernel_transformers/lib/track_widget_constructor_locations.dart -FILE: ../../../flutter/flutter_web/libraries.json FILE: ../../../flutter/fml/arraysize.h FILE: ../../../flutter/fml/base32.cc FILE: ../../../flutter/fml/base32.h @@ -705,6 +704,7 @@ FILE: ../../../flutter/vulkan/vulkan_utilities.cc FILE: ../../../flutter/vulkan/vulkan_utilities.h FILE: ../../../flutter/vulkan/vulkan_window.cc FILE: ../../../flutter/vulkan/vulkan_window.h +FILE: ../../../flutter/web_sdk/libraries.json ---------------------------------------------------------------------------------------------------- Copyright 2013 The Flutter Authors. All rights reserved. @@ -735,16 +735,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== LIBRARY: engine -ORIGIN: ../../../flutter/flutter_web/libraries.dart + ../../../third_party/dart/LICENSE +ORIGIN: ../../../flutter/web_sdk/libraries.dart + ../../../flutter/LICENSE TYPE: LicenseType.bsd -FILE: ../../../flutter/flutter_web/libraries.dart +FILE: ../../../flutter/web_sdk/libraries.dart ---------------------------------------------------------------------------------------------------- -Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -for details. All rights reserved. +Copyright 2019 The Flutter Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above @@ -754,17 +753,17 @@ met: * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== ==================================================================================================== From f6016f50008c2a4a110a4e4bd305b8ab0fa597cf Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Sat, 2 Mar 2019 15:32:42 -0800 Subject: [PATCH 07/13] Update libraries.dart --- web_sdk/libraries.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_sdk/libraries.dart b/web_sdk/libraries.dart index 8c469406d70e5..57b64083c124f 100644 --- a/web_sdk/libraries.dart +++ b/web_sdk/libraries.dart @@ -1,4 +1,4 @@ -// Copyright 2019 The Flutter Authors. All rights reserved. +// 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. From 0abbfc2c1523a8810312886cc946e262d52ccb59 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Sat, 2 Mar 2019 19:47:53 -0800 Subject: [PATCH 08/13] update patch --- ci/licenses_golden/licenses_flutter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 9e8102ecd5503..30f0c5931a9e9 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -739,7 +739,7 @@ ORIGIN: ../../../flutter/web_sdk/libraries.dart + ../../../flutter/LICENSE TYPE: LicenseType.bsd FILE: ../../../flutter/web_sdk/libraries.dart ---------------------------------------------------------------------------------------------------- -Copyright 2019 The Flutter Authors. All rights reserved. +Copyright 2013 The Flutter Authors. All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: From 1d3a4cdee6831002fac996451a72d6e081b9d491 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 4 Mar 2019 13:45:10 -0800 Subject: [PATCH 09/13] Delete libraries.dart --- web_sdk/libraries.dart | 325 ----------------------------------------- 1 file changed, 325 deletions(-) delete mode 100644 web_sdk/libraries.dart diff --git a/web_sdk/libraries.dart b/web_sdk/libraries.dart deleted file mode 100644 index 57b64083c124f..0000000000000 --- a/web_sdk/libraries.dart +++ /dev/null @@ -1,325 +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. - -library libraries; - -/** - * A bit flag used by [LibraryInfo] indicating that a library is used by dart2js - */ -const int DART2JS_PLATFORM = 1; - -/** - * A bit flag used by [LibraryInfo] indicating that a library is used by the VM - */ -const int VM_PLATFORM = 2; - -/// The contexts that a library can be used from. -enum Category { - /// Indicates that a library can be used in a browser context. - client, - - /// Indicates that a library can be used in a command line context. - server, - - /// Indicates that a library can be used from embedded devices. - embedded, - - /// Google3-specific: Indicates that a library can be used in a Flutter context. - flutter -} - -Category parseCategory(String name) { - switch (name) { - case "Client": - return Category.client; - case "Server": - return Category.server; - case "Embedded": - return Category.embedded; - case "Flutter": - return Category.flutter; // Google3-specific. - } - return null; -} - -/// Mapping of "dart:" library name (e.g. "core") to information about that -/// library. -const Map libraries = const { - "async": const LibraryInfo("async/async.dart", - categories: "Client,Server", - maturity: Maturity.STABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/async_patch.dart"), - "_chrome": const LibraryInfo("_chrome/dart2js/chrome_dart2js.dart", - categories: "Client", documented: false), - "collection": const LibraryInfo("collection/collection.dart", - categories: "Client,Server,Embedded", - maturity: Maturity.STABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/collection_patch.dart"), - "convert": const LibraryInfo("convert/convert.dart", - categories: "Client,Server", - maturity: Maturity.STABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/convert_patch.dart"), - "core": const LibraryInfo("core/core.dart", - categories: "Client,Server,Embedded", - maturity: Maturity.STABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/core_patch.dart"), - "developer": const LibraryInfo("developer/developer.dart", - categories: "Client,Server,Embedded", - maturity: Maturity.UNSTABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/developer_patch.dart"), - "html": const LibraryInfo("html/dart2js/html_dart2js.dart", - categories: "Client", - maturity: Maturity.WEB_STABLE, - platforms: DART2JS_PLATFORM), - "html_common": const LibraryInfo("html/html_common/html_common.dart", - categories: "Client", - maturity: Maturity.WEB_STABLE, - dart2jsPath: "html/html_common/html_common_dart2js.dart", - documented: false, - implementation: true), - "indexed_db": const LibraryInfo("indexed_db/dart2js/indexed_db_dart2js.dart", - categories: "Client", - maturity: Maturity.WEB_STABLE, - platforms: DART2JS_PLATFORM), - "_http": - const LibraryInfo("_http/http.dart", categories: "", documented: false), - "io": const LibraryInfo("io/io.dart", - categories: "Server", - dart2jsPatchPath: "../../../flutter/web_sdk/io_patch.dart"), - "isolate": const LibraryInfo("isolate/isolate.dart", - categories: "Client,Server", - maturity: Maturity.STABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/isolate_patch.dart"), - "js": const LibraryInfo("js/dart2js/js_dart2js.dart", - categories: "Client", - maturity: Maturity.STABLE, - platforms: DART2JS_PLATFORM), - "_js": const LibraryInfo("js/_js.dart", - categories: "Client", - dart2jsPatchPath: "js/_js_client.dart", - documented: false, - platforms: DART2JS_PLATFORM), - "js_util": const LibraryInfo("js_util/dart2js/js_util_dart2js.dart", - categories: "Client", - maturity: Maturity.STABLE, - platforms: DART2JS_PLATFORM), - "math": const LibraryInfo("math/math.dart", - categories: "Client,Server,Embedded", - maturity: Maturity.STABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/math_patch.dart"), - "mirrors": const LibraryInfo("mirrors/mirrors.dart", - categories: "Client,Server", - maturity: Maturity.UNSTABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/mirrors_patch.dart"), - "nativewrappers": const LibraryInfo("html/dartium/nativewrappers.dart", - categories: "Client", - implementation: true, - documented: false, - platforms: VM_PLATFORM), - "typed_data": const LibraryInfo("typed_data/typed_data.dart", - categories: "Client,Server,Embedded", - maturity: Maturity.STABLE, - dart2jsPatchPath: "_internal/js_runtime/lib/typed_data_patch.dart"), - "_native_typed_data": const LibraryInfo( - "_internal/js_runtime/lib/native_typed_data.dart", - categories: "", - implementation: true, - documented: false, - platforms: DART2JS_PLATFORM), - "cli": const LibraryInfo("cli/cli.dart", - categories: "Server", - dart2jsPatchPath: "_internal/js_runtime/lib/cli_patch.dart"), - "svg": const LibraryInfo("svg/dart2js/svg_dart2js.dart", - categories: "Client", - maturity: Maturity.WEB_STABLE, - platforms: DART2JS_PLATFORM), - "web_audio": const LibraryInfo("web_audio/dart2js/web_audio_dart2js.dart", - categories: "Client", - maturity: Maturity.WEB_STABLE, - platforms: DART2JS_PLATFORM), - "web_gl": const LibraryInfo("web_gl/dart2js/web_gl_dart2js.dart", - categories: "Client", - maturity: Maturity.WEB_STABLE, - platforms: DART2JS_PLATFORM), - "web_sql": const LibraryInfo("web_sql/dart2js/web_sql_dart2js.dart", - categories: "Client", - maturity: Maturity.WEB_STABLE, - platforms: DART2JS_PLATFORM), - "_internal": const LibraryInfo("internal/internal.dart", - categories: "", - documented: false, - dart2jsPatchPath: "_internal/js_runtime/lib/internal_patch.dart"), - "_js_helper": const LibraryInfo("_internal/js_runtime/lib/js_helper.dart", - categories: "", documented: false, platforms: DART2JS_PLATFORM), - "_interceptors": const LibraryInfo( - "_internal/js_runtime/lib/interceptors.dart", - categories: "", - documented: false, - platforms: DART2JS_PLATFORM), - "_foreign_helper": const LibraryInfo( - "_internal/js_runtime/lib/foreign_helper.dart", - categories: "", - documented: false, - platforms: DART2JS_PLATFORM), - "_js_names": const LibraryInfo("_internal/js_runtime/lib/js_names.dart", - categories: "", documented: false, platforms: DART2JS_PLATFORM), - "_js_primitives": const LibraryInfo( - "_internal/js_runtime/lib/js_primitives.dart", - categories: "", - documented: false, - platforms: DART2JS_PLATFORM), - "_js_embedded_names": const LibraryInfo( - "_internal/js_runtime/lib/shared/embedded_names.dart", - categories: "", - documented: false, - platforms: DART2JS_PLATFORM), - "_async_await_error_codes": const LibraryInfo( - "_internal/js_runtime/lib/shared/async_await_error_codes.dart", - categories: "", - documented: false, - platforms: DART2JS_PLATFORM), - "_metadata": const LibraryInfo("html/html_common/metadata.dart", - categories: "", documented: false, platforms: DART2JS_PLATFORM), - - // Flutter dart:ui library. - "ui": const LibraryInfo("dart_ui/ui.dart", - categories: "Flutter"), - // End Google3-specific -}; - -/** - * Information about a "dart:" library. - */ -class LibraryInfo { - /** - * Path to the library's *.dart file relative to this file. - */ - final String path; - - /** - * The categories in which the library can be used encoded as a - * comma-separated String. - */ - final String _categories; - - /** - * Path to the dart2js library's *.dart file relative to this file - * or null if dart2js uses the common library path defined above. - * Access using the [#getDart2JsPath()] method. - */ - final String dart2jsPath; - - /** - * Path to the dart2js library's patch file relative to this file - * or null if no dart2js patch file associated with this library. - * Access using the [#getDart2JsPatchPath()] method. - */ - final String dart2jsPatchPath; - - /** - * True if this library is documented and should be shown to the user. - */ - final bool documented; - - /** - * Bit flags indicating which platforms consume this library. - * See [DART2JS_LIBRARY] and [VM_LIBRARY]. - */ - final int platforms; - - /** - * True if the library contains implementation details for another library. - * The implication is that these libraries are less commonly used - * and that tools like Dart Editor should not show these libraries - * in a list of all libraries unless the user specifically asks the tool to - * do so. - */ - final bool implementation; - - /** - * States the current maturity of this library. - */ - final Maturity maturity; - - const LibraryInfo(this.path, - {String categories: "", - this.dart2jsPath, - this.dart2jsPatchPath, - this.implementation: false, - this.documented: true, - this.maturity: Maturity.UNSPECIFIED, - this.platforms: DART2JS_PLATFORM | VM_PLATFORM}) - : _categories = categories; - - bool get isDart2jsLibrary => (platforms & DART2JS_PLATFORM) != 0; - bool get isVmLibrary => (platforms & VM_PLATFORM) != 0; - - /** - * The categories in which the library can be used. - * - * If no categories are specified, the library is internal and can not be - * loaded by user code. - */ - List get categories { - // `"".split(,)` returns [""] not [], so we handle that case separately. - if (_categories == "") return const []; - return _categories.split(",").map(parseCategory).toList(); - } - - bool get isInternal => categories.isEmpty; - - /// The original "categories" String that was passed to the constructor. - /// - /// Can be used to construct a slightly modified copy of this LibraryInfo. - String get categoriesString { - return _categories; - } -} - -/** - * Abstraction to capture the maturity of a library. - */ -class Maturity { - final int level; - final String name; - final String description; - - const Maturity(this.level, this.name, this.description); - - String toString() => "$name: $level\n$description\n"; - - static const Maturity DEPRECATED = const Maturity(0, "Deprecated", - "This library will be remove before next major release."); - - static const Maturity EXPERIMENTAL = const Maturity( - 1, - "Experimental", - "This library is experimental and will likely change or be removed\n" - "in future versions."); - - static const Maturity UNSTABLE = const Maturity( - 2, - "Unstable", - "This library is in still changing and have not yet endured\n" - "sufficient real-world testing.\n" - "Backwards-compatibility is NOT guaranteed."); - - static const Maturity WEB_STABLE = const Maturity( - 3, - "Web Stable", - "This library is tracking the DOM evolution as defined by WC3.\n" - "Backwards-compatibility is NOT guaranteed."); - - static const Maturity STABLE = const Maturity( - 4, - "Stable", - "The library is stable. API backwards-compatibility is guaranteed.\n" - "However implementation details might change."); - - static const Maturity LOCKED = const Maturity(5, "Locked", - "This library will not change except when serious bugs are encountered."); - - static const Maturity UNSPECIFIED = const Maturity(-1, "Unspecified", - "The maturity for this library has not been specified."); -} From 72b4bf7c8ba9b25d68bee2f974527f023acbea1d Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 4 Mar 2019 13:45:48 -0800 Subject: [PATCH 10/13] Update BUILD.gn --- web_sdk/BUILD.gn | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index 88f2b704128bb..2ea87bb7316b2 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -40,7 +40,6 @@ group("web_sdk") { deps = [ ":web_ui_sources", ":web_libraries_json", - ":web_libraries_dart", ":dart_sdk_internal", ] + sdk_copy_deps } @@ -98,15 +97,6 @@ copy("web_libraries_json") { ] } -copy("web_libraries_dart") { - sources = [ - "libraries.dart" - ] - - outputs = [ - "$root_out_dir/flutter_patched_sdk/lib/_internal/libraries.dart" - ] -} copy("dart_sdk_internal") { deps = [ From 2870ba2caa7cd71e690a2b1710aafc859f33dddb Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Mon, 4 Mar 2019 13:56:29 -0800 Subject: [PATCH 11/13] fix licenses again --- ci/licenses_golden/licenses_flutter | 35 +---------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 30f0c5931a9e9..7f23d2b8a7074 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -733,39 +733,6 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== -==================================================================================================== -LIBRARY: engine -ORIGIN: ../../../flutter/web_sdk/libraries.dart + ../../../flutter/LICENSE -TYPE: LicenseType.bsd -FILE: ../../../flutter/web_sdk/libraries.dart ----------------------------------------------------------------------------------------------------- -Copyright 2013 The Flutter Authors. All rights reserved - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -==================================================================================================== - ==================================================================================================== LIBRARY: txt ORIGIN: ../../../flutter/third_party/txt/LICENSE @@ -1052,4 +1019,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================================================== -Total license count: 4 +Total license count: 3 From 2d9050bd9b4af16438a7918d171ce0d02d53fc61 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Mon, 4 Mar 2019 19:00:55 -0800 Subject: [PATCH 12/13] isolate web code --- web_sdk/BUILD.gn | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index 2ea87bb7316b2..9d652ff87fef7 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -41,6 +41,7 @@ group("web_sdk") { ":web_ui_sources", ":web_libraries_json", ":dart_sdk_internal", + ":web_compiler_snapshots", ] + sdk_copy_deps } @@ -57,11 +58,26 @@ foreach(library, _dart_sdk_libraries) { "list lines") outputs = [ - "$root_out_dir/flutter_patched_sdk/lib/${library}/{{source_file_part}}", + "$root_out_dir/flutter_web_sdk/lib/${library}/{{source_file_part}}", ] } } +copy("web_compiler_snapshots") { + sources= [ + "$root_out_dir/dart-sdk/bin/snapshots/dart2js.dart.snapshot", + "$root_out_dir/dart-sdk/bin/snapshots/dartdevc.dart.snapshot", + ] + + outputs = [ + "$root_out_dir/flutter_web_sdk/bin/snapshots/{{source_file_part}}" + ] + + deps = [ + "//third_party/dart:create_sdk" + ] +} + copy("web_ui_sources") { sources = [ @@ -83,7 +99,7 @@ copy("web_ui_sources") { ] outputs = [ - "$root_out_dir/flutter_patched_sdk/lib/ui/{{source_file_part}}" + "$root_out_dir/flutter_web_sdk/lib/ui/{{source_file_part}}" ] } @@ -93,7 +109,7 @@ copy("web_libraries_json") { ] outputs = [ - "$root_out_dir/flutter_patched_sdk/lib/libraries.json" + "$root_out_dir/flutter_web_sdk/lib/libraries.json" ] } @@ -113,6 +129,6 @@ copy("dart_sdk_internal") { ] outputs = [ - "$root_out_dir/flutter_patched_sdk/lib/_internal/{{source_file_part}}" + "$root_out_dir/flutter_web_sdk/lib/_internal/{{source_file_part}}" ] } From c8a0af9a10a3cd0a192c630a9b3bd766d130273c Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Wed, 6 Mar 2019 23:24:14 -0800 Subject: [PATCH 13/13] remove extra libraries --- web_sdk/BUILD.gn | 68 ------------------------------------------------ 1 file changed, 68 deletions(-) diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index 9d652ff87fef7..507afb3d6816f 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -2,83 +2,16 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -_dart_sdk_libraries = [ - "_chrome", - "async", - "core", - "html", - "isolate", - "math", - "typed_data", - "_http", - "cli", - #"dev_compiler", - "indexed_db", - "js", - "mirrors", - "web_audio", - #"_internal", Manually copy certain files from internal to avoid collisions. - "collection", - "developer", - "internal", - "js_util", - "profiler", - "web_gl", - "convert", - "ffi", - "io", - "svg", - "web_sql", -] - group("web_sdk") { sdk_copy_deps = [] - foreach(library, _dart_sdk_libraries) { - sdk_copy_deps += [ ":copy_flutter_${library}" ] - } deps = [ ":web_ui_sources", ":web_libraries_json", ":dart_sdk_internal", - ":web_compiler_snapshots", ] + sdk_copy_deps } -foreach(library, _dart_sdk_libraries) { - copy("copy_flutter_${library}") { - deps = [ - "//third_party/dart:create_sdk" - ] - sources = exec_script("//third_party/dart/tools/list_dart_files.py", - [ - "absolute", - rebase_path("//third_party/dart/sdk/lib/${library}/"), - ], - "list lines") - - outputs = [ - "$root_out_dir/flutter_web_sdk/lib/${library}/{{source_file_part}}", - ] - } -} - -copy("web_compiler_snapshots") { - sources= [ - "$root_out_dir/dart-sdk/bin/snapshots/dart2js.dart.snapshot", - "$root_out_dir/dart-sdk/bin/snapshots/dartdevc.dart.snapshot", - ] - - outputs = [ - "$root_out_dir/flutter_web_sdk/bin/snapshots/{{source_file_part}}" - ] - - deps = [ - "//third_party/dart:create_sdk" - ] -} - - copy("web_ui_sources") { sources = [ "$flutter_root/lib/stub_ui/compositing.dart", @@ -113,7 +46,6 @@ copy("web_libraries_json") { ] } - copy("dart_sdk_internal") { deps = [ "//third_party/dart:create_sdk"