diff --git a/engine/src/flutter/BUILD.gn b/engine/src/flutter/BUILD.gn index 248524f8725..b57d63f91fd 100644 --- a/engine/src/flutter/BUILD.gn +++ b/engine/src/flutter/BUILD.gn @@ -4,6 +4,12 @@ import("$flutter_root/common/config.gni") +# Whether to build the dartdevc sdk, libraries, and source files +# required for the flutter web sdk. +declare_args() { + full_dart_sdk = false +} + group("flutter") { testonly = true @@ -23,8 +29,13 @@ group("flutter") { public_deps += [ "$flutter_root/frontend_server", "//third_party/dart:create_sdk", - "$flutter_root/web_sdk", ] + + if (full_dart_sdk) { + public_deps += [ + "$flutter_root/web_sdk", + ] + } } } diff --git a/engine/src/flutter/ci/licenses_golden/licenses_flutter b/engine/src/flutter/ci/licenses_golden/licenses_flutter index 7f1d66782ca..6196b918d31 100644 --- a/engine/src/flutter/ci/licenses_golden/licenses_flutter +++ b/engine/src/flutter/ci/licenses_golden/licenses_flutter @@ -704,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/flutter_kernel_sdk.dart FILE: ../../../flutter/web_sdk/libraries.json ---------------------------------------------------------------------------------------------------- Copyright 2013 The Flutter Authors. All rights reserved. diff --git a/engine/src/flutter/tools/gn b/engine/src/flutter/tools/gn index ff0f29978e2..c1f381b6464 100755 --- a/engine/src/flutter/tools/gn +++ b/engine/src/flutter/tools/gn @@ -234,8 +234,10 @@ def to_gn_args(args): if args.arm_float_abi: gn_args['arm_float_abi'] = args.arm_float_abi - # Whether to build trained Dart SDK snapshots of dart2js and dartdevc. + # Whether to build trained Dart SDK snapshots of dart2js and dartdevc, + # including the web sdk kernel and source files. gn_args['dart_platform_sdk'] = not args.full_dart_sdk + gn_args['full_dart_sdk'] = args.full_dart_sdk return gn_args diff --git a/engine/src/flutter/web_sdk/BUILD.gn b/engine/src/flutter/web_sdk/BUILD.gn index 47d8121cbec..925f6000499 100644 --- a/engine/src/flutter/web_sdk/BUILD.gn +++ b/engine/src/flutter/web_sdk/BUILD.gn @@ -2,63 +2,82 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//third_party/dart/build/dart/dart_action.gni") +import("//third_party/dart/utils/compile_platform.gni") + +sdk_dill = "$root_out_dir/flutter_web_sdk/kernel/flutter_ddc_sdk.dill" +sdk_libraries_json = "$flutter_root/web_sdk/libraries.json" + +web_ui_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", +] + group("web_sdk") { deps = [ ":web_ui_sources", - ":web_libraries_json", - #":dart_sdk_internal", + ":web_ui_library", + ":flutter_dartdevc_kernel_sdk", ] } copy("web_ui_sources") { - 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", - ] + sources = web_ui_sources outputs = [ "$root_out_dir/flutter_web_sdk/lib/ui/{{source_file_part}}" ] } -copy("web_libraries_json") { +copy("web_ui_library") { sources = [ - "libraries.json" + "$flutter_root/web_sdk/libraries.json", ] outputs = [ - "$root_out_dir/flutter_web_sdk/lib/libraries.json" + "$root_out_dir/flutter_web_sdk/{{source_file_part}}" ] } -# copy("dart_sdk_internal") { -# deps = [ -# "//third_party/dart:create_sdk" -# ] +prebuilt_dart_action("flutter_dartdevc_kernel_sdk") { + deps = [ + "//third_party/dart/pkg:pkg_files_stamp", + "//third_party/dart/utils/dartdevc:dartdevc_files_stamp", + "//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp", + ] -# 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", -# ] + inputs = [ + "//third_party/dart/pkg/dev_compiler/tool/kernel_sdk.dart", + ] -# outputs = [ -# "$root_out_dir/flutter_web_sdk/lib/_internal/{{source_file_part}}" -# ] -# } + outputs = [ + sdk_dill, + "$root_out_dir/flutter_web_sdk/lib/_internal/libraries.json", + "$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js", + "$root_out_dir/flutter_web_sdk/kernel/amd/dart_sdk.js.map", + ] + + script = "flutter_kernel_sdk.dart" + packages = "//third_party/dart/.packages" + + output_path = rebase_path(sdk_dill) + libraries_path = rebase_path(sdk_libraries_json) + + args = [ + "--output=$output_path", + "--libraries=$libraries_path", + ] +} diff --git a/engine/src/flutter/web_sdk/flutter_kernel_sdk.dart b/engine/src/flutter/web_sdk/flutter_kernel_sdk.dart new file mode 100644 index 00000000000..dea21c2de8a --- /dev/null +++ b/engine/src/flutter/web_sdk/flutter_kernel_sdk.dart @@ -0,0 +1,109 @@ +// 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. + +import 'dart:async'; +import 'dart:convert' show json; +import 'dart:io'; +import 'package:args/args.dart' show ArgParser; +import 'package:dev_compiler/src/compiler/module_builder.dart'; +import 'package:dev_compiler/src/compiler/shared_command.dart' show SharedCompilerOptions; +import 'package:dev_compiler/src/kernel/target.dart'; +import 'package:dev_compiler/src/kernel/command.dart'; +import 'package:dev_compiler/src/kernel/compiler.dart'; +import 'package:front_end/src/api_unstable/ddc.dart' show CompilerOptions, kernelForComponent; +import 'package:kernel/kernel.dart'; +import 'package:path/path.dart' as path; + +// This script is forked from https://github.com/dart-lang/sdk/blob/master/pkg/dev_compiler/tool/kernel_sdk.dart +// and produces the precompiled sdk for dartdevc. This has been modified to include a dart:ui target. +Future main(List args) async { + var ddcPath = path.dirname(path.dirname(path.fromUri(Platform.script))); + + // Parse flags. + var parser = ArgParser() + ..addOption('output') + ..addOption('libraries', + defaultsTo: path.join(ddcPath, '../../sdk/lib/libraries.json')); + var parserOptions = parser.parse(args); + + var outputPath = parserOptions['output'] as String; + if (outputPath == null) { + var sdkRoot = path.absolute(path.dirname(path.dirname(ddcPath))); + var buildDir = path.join(sdkRoot, Platform.isMacOS ? 'xcodebuild' : 'out'); + var genDir = path.join(buildDir, 'ReleaseX64', 'gen', 'utils', 'dartdevc'); + outputPath = path.join(genDir, 'kernel', 'ddc_sdk.dill'); + } + + var librarySpecPath = parserOptions['libraries'] as String; + + var target = FlutterDevCompilerTarget(); + var options = CompilerOptions() + ..compileSdk = true + // TODO(sigmund): remove this unnecessary option when possible. + ..sdkRoot = Uri.base + ..librariesSpecificationUri = Uri.base.resolveUri(Uri.file(librarySpecPath)) + ..target = target; + + var inputs = target.extraRequiredLibraries.map(Uri.parse).toList(); + var component = await kernelForComponent(inputs, options); + + var outputDir = path.dirname(outputPath); + await Directory(outputDir).create(recursive: true); + await writeComponentToBinary(component, outputPath); + + var jsModule = ProgramCompiler( + component, + target.hierarchy, + SharedCompilerOptions(moduleName: 'dart_sdk'), + {}).emitModule(component, [], [], {}); + var moduleFormats = { + 'amd': ModuleFormat.amd, + }; + + for (var name in moduleFormats.keys) { + var format = moduleFormats[name]; + var jsDir = path.join(outputDir, name); + var jsPath = path.join(jsDir, 'dart_sdk.js'); + await Directory(jsDir).create(); + var jsCode = jsProgramToCode(jsModule, format); + await File(jsPath).writeAsString(jsCode.code); + await File('$jsPath.map').writeAsString(json.encode(jsCode.sourceMap)); + } +} + +class FlutterDevCompilerTarget extends DevCompilerTarget { + @override + List get extraRequiredLibraries => const [ + 'dart:_runtime', + 'dart:_debugger', + 'dart:_foreign_helper', + 'dart:_interceptors', + 'dart:_internal', + 'dart:_isolate_helper', + 'dart:_js_helper', + 'dart:_js_mirrors', + 'dart:_js_primitives', + 'dart:_metadata', + 'dart:_native_typed_data', + 'dart:async', + 'dart:collection', + 'dart:convert', + 'dart:developer', + 'dart:io', + 'dart:isolate', + 'dart:js', + 'dart:js_util', + 'dart:math', + 'dart:mirrors', + 'dart:typed_data', + 'dart:indexed_db', + 'dart:html', + 'dart:html_common', + 'dart:svg', + 'dart:web_audio', + 'dart:web_gl', + 'dart:web_sql', + 'dart:ui', + ]; +} diff --git a/engine/src/flutter/web_sdk/libraries.json b/engine/src/flutter/web_sdk/libraries.json index a9203707e82..38eb0788b05 100644 --- a/engine/src/flutter/web_sdk/libraries.json +++ b/engine/src/flutter/web_sdk/libraries.json @@ -1,235 +1,235 @@ { "comment:0": "NOTE: THIS FILE IS GENERATED. DO NOT EDIT.", - "comment:1": "Instead modify 'flutter/flutter_web/libraries.yaml' and follow the instructions therein.", + "comment:1": "Instead modify 'flutter/web_sdk/libraries.yaml' and follow the instructions therein.", "dart2js": { "libraries": { "async": { - "patches": "lib/_internal/js_runtime/lib/async_patch.dart", - "uri": "lib/async/async.dart" + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart", + "uri": "../dart-sdk/lib/async/async.dart" }, "_interceptors": { - "uri": "lib/_internal/js_runtime/lib/interceptors.dart" + "uri": "../dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart" }, "mirrors": { - "patches": "lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart", + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart", "supported": false, - "uri": "lib/mirrors/mirrors.dart" + "uri": "../dart-sdk/lib/mirrors/mirrors.dart" }, "_js_embedded_names": { - "uri": "lib/_internal/js_runtime/lib/shared/embedded_names.dart" + "uri": "../dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart" }, "io": { - "patches": "lib/_internal/js_runtime/lib/io_patch.dart", + "patches": "io_patch.dart", "supported": false, - "uri": "lib/io/io.dart" + "uri": "../dart-sdk/lib/io/io.dart" }, "_internal": { - "patches": "lib/_internal/js_runtime/lib/internal_patch.dart", - "uri": "lib/internal/internal.dart" + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/internal_patch.dart", + "uri": "../dart-sdk/lib/internal/internal.dart" }, "_metadata": { - "uri": "lib/html/html_common/metadata.dart" + "uri": "../dart-sdk/lib/html/html_common/metadata.dart" }, "_async_await_error_codes": { - "uri": "lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart" + "uri": "../dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart" }, "_http": { - "uri": "lib/_http/http.dart" + "uri": "../dart-sdk/lib/_http/http.dart" }, "_js_primitives": { - "uri": "lib/_internal/js_runtime/lib/js_primitives.dart" + "uri": "../dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart" }, "_js_helper": { - "uri": "lib/_internal/js_runtime/lib/js_helper.dart" + "uri": "../dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart" }, "_chrome": { - "uri": "lib/_chrome/dart2js/chrome_dart2js.dart" + "uri": "../dart-sdk/lib/_chrome/dart2js/chrome_dart2js.dart" }, "html_common": { - "uri": "lib/html/html_common/html_common_dart2js.dart" + "uri": "../dart-sdk/lib/html/html_common/html_common_dart2js.dart" }, "ui": { - "uri": "../lib/ui/ui.dart" + "uri": "lib/ui/ui.dart" }, "js": { - "uri": "lib/js/dart2js/js_dart2js.dart" + "uri": "../dart-sdk/lib/js/dart2js/js_dart2js.dart" }, "_native_typed_data": { - "uri": "lib/_internal/js_runtime/lib/native_typed_data.dart" + "uri": "../dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart" }, "_js_names": { - "uri": "lib/_internal/js_runtime/lib/js_names.dart" + "uri": "../dart-sdk/lib/_internal/js_runtime/lib/js_names.dart" }, "core": { - "patches": "lib/_internal/js_runtime/lib/core_patch.dart", - "uri": "lib/core/core.dart" + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/core_patch.dart", + "uri": "../dart-sdk/lib/core/core.dart" }, "collection": { - "patches": "lib/_internal/js_runtime/lib/collection_patch.dart", - "uri": "lib/collection/collection.dart" + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/collection_patch.dart", + "uri": "../dart-sdk/lib/collection/collection.dart" }, "js_util": { - "uri": "lib/js_util/dart2js/js_util_dart2js.dart" + "uri": "../dart-sdk/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" + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/typed_data_patch.dart", + "uri": "../dart-sdk/lib/typed_data/typed_data.dart" }, "web_audio": { - "uri": "lib/web_audio/dart2js/web_audio_dart2js.dart" + "uri": "../dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart" }, "html": { - "uri": "lib/html/dart2js/html_dart2js.dart" + "uri": "../dart-sdk/lib/html/dart2js/html_dart2js.dart" }, "isolate": { - "patches": "lib/_internal/js_runtime/lib/isolate_patch.dart", + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/isolate_patch.dart", "supported": false, - "uri": "lib/isolate/isolate.dart" + "uri": "../dart-sdk/lib/isolate/isolate.dart" }, "developer": { - "patches": "lib/_internal/js_runtime/lib/developer_patch.dart", - "uri": "lib/developer/developer.dart" + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/developer_patch.dart", + "uri": "../dart-sdk/lib/developer/developer.dart" }, "web_gl": { - "uri": "lib/web_gl/dart2js/web_gl_dart2js.dart" + "uri": "../dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart" }, "indexed_db": { - "uri": "lib/indexed_db/dart2js/indexed_db_dart2js.dart" + "uri": "../dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart" }, "_js": { - "patches": "lib/js/_js_client.dart", - "uri": "lib/js/_js.dart" + "patches": "../dart-sdk/lib/js/_js_client.dart", + "uri": "../dart-sdk/lib/js/_js.dart" }, "convert": { - "patches": "lib/_internal/js_runtime/lib/convert_patch.dart", - "uri": "lib/convert/convert.dart" + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/convert_patch.dart", + "uri": "../dart-sdk/lib/convert/convert.dart" }, "math": { - "patches": "lib/_internal/js_runtime/lib/math_patch.dart", - "uri": "lib/math/math.dart" + "patches": "../dart-sdk/lib/_internal/js_runtime/lib/math_patch.dart", + "uri": "../dart-sdk/lib/math/math.dart" }, "_foreign_helper": { - "uri": "lib/_internal/js_runtime/lib/foreign_helper.dart" + "uri": "../dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart" }, "web_sql": { - "uri": "lib/web_sql/dart2js/web_sql_dart2js.dart" + "uri": "../dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart" }, "svg": { - "uri": "lib/svg/dart2js/svg_dart2js.dart" + "uri": "../dart-sdk/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" + "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" + "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" + "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", + "patches": "../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart", "supported": false, - "uri": "lib/mirrors/mirrors.dart" + "uri": "../../third_party/dart/sdk/lib/mirrors/mirrors.dart" }, "_debugger": { - "uri": "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/debugger.dart" + "uri": "../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/debugger.dart" }, "io": { - "patches": "io_patch.dart", + "patches": "../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/io_patch.dart", "supported": false, - "uri": "lib/io/io.dart" + "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": "lib/internal/internal.dart" + "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": "lib/html/html_common/metadata.dart" + "uri": "../../third_party/dart/sdk/lib/html/html_common/metadata.dart" }, "_http": { - "uri": "lib/_http/http.dart" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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" + "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": "lib/typed_data/typed_data.dart" + "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": "lib/web_audio/dart2js/web_audio_dart2js.dart" + "uri": "../../third_party/dart/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart" }, "html": { - "uri": "lib/html/dart2js/html_dart2js.dart" + "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": "lib/developer/developer.dart" + "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", + "patches": "../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart", "supported": false, - "uri": "lib/isolate/isolate.dart" + "uri": "../../third_party/dart/sdk/lib/isolate/isolate.dart" }, "web_gl": { - "uri": "lib/web_gl/dart2js/web_gl_dart2js.dart" + "uri": "../../third_party/dart/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart" }, "indexed_db": { - "uri": "lib/indexed_db/dart2js/indexed_db_dart2js.dart" + "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": "lib/convert/convert.dart" + "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" + "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" + "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" + "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" + "uri": "../../third_party/dart/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart" }, "svg": { - "uri": "lib/svg/dart2js/svg_dart2js.dart" + "uri": "../../third_party/dart/sdk/lib/svg/dart2js/svg_dart2js.dart" } } } diff --git a/engine/src/flutter/web_sdk/libraries.yaml b/engine/src/flutter/web_sdk/libraries.yaml index 2516e18d4fd..56e100b6c11 100644 --- a/engine/src/flutter/web_sdk/libraries.yaml +++ b/engine/src/flutter/web_sdk/libraries.yaml @@ -2,10 +2,12 @@ # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. +# This libraries file is only used for building the ddc kernel. +# # 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 +#. python third_party/dart/tools/yaml2json.py flutter/web_sdk/libraries.yaml flutter/web_sdk/libraries.json # # We currently have several different files that needs to be updated when # changing libraries, sources, and patch files. See @@ -14,111 +16,111 @@ dartdevc: libraries: _runtime: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart" + 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" + 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" + uri: "../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart" _http: - uri: "lib/_http/http.dart" + uri: "../../third_party/dart/sdk/lib/_http/http.dart" _interceptors: - uri: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/interceptors.dart" + 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" + 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" + 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" + 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" + 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" + uri: "../../third_party/dart/pkg/dev_compiler/tool/input_sdk/private/js_primitives.dart" _metadata: - uri: "lib/html/html_common/metadata.dart" + 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" + 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" + 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: "lib/collection/collection.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart" + 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: "lib/convert/convert.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart" + 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: "lib/core/core.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart" + 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: "lib/developer/developer.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart" + 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: "lib/io/io.dart" - patches: "io_patch.dart" + 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: "lib/isolate/isolate.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart" + 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: "lib/mirrors/mirrors.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/mirrors_patch.dart" + 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: "lib/math/math.dart" - patches: "../../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart" + 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: "lib/typed_data/typed_data.dart" - 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" + patches: "../../third_party/dart/pkg/dev_compiler/tool/input_sdk/patch/typed_data_patch.dart" html: - uri: "lib/html/dart2js/html_dart2js.dart" + uri: "../../third_party/dart/sdk/lib/html/dart2js/html_dart2js.dart" html_common: - uri: "lib/html/html_common/html_common_dart2js.dart" + uri: "../../third_party/dart/sdk/lib/html/html_common/html_common_dart2js.dart" indexed_db: - uri: "lib/indexed_db/dart2js/indexed_db_dart2js.dart" + 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" + 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" + 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" + uri: "../../third_party/dart/sdk/lib/svg/dart2js/svg_dart2js.dart" web_audio: - uri: "lib/web_audio/dart2js/web_audio_dart2js.dart" + uri: "../../third_party/dart/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart" web_gl: - uri: "lib/web_gl/dart2js/web_gl_dart2js.dart" + uri: "../../third_party/dart/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart" web_sql: - uri: "lib/web_sql/dart2js/web_sql_dart2js.dart" + uri: "../../third_party/dart/sdk/lib/web_sql/dart2js/web_sql_dart2js.dart" ui: uri: "../lib/ui/ui.dart" @@ -126,115 +128,115 @@ dartdevc: dart2js: libraries: ui: - uri: "../lib/ui/ui.dart" + uri: "lib/ui/ui.dart" async: - uri: "lib/async/async.dart" - patches: "lib/_internal/js_runtime/lib/async_patch.dart" + uri: "../dart-sdk/lib/async/async.dart" + patches: "../dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart" _chrome: - uri: "lib/_chrome/dart2js/chrome_dart2js.dart" + uri: "../dart-sdk/lib/_chrome/dart2js/chrome_dart2js.dart" collection: - uri: "lib/collection/collection.dart" - patches: "lib/_internal/js_runtime/lib/collection_patch.dart" + uri: "../dart-sdk/lib/collection/collection.dart" + patches: "../dart-sdk/lib/_internal/js_runtime/lib/collection_patch.dart" convert: - uri: "lib/convert/convert.dart" - patches: "lib/_internal/js_runtime/lib/convert_patch.dart" + uri: "../dart-sdk/lib/convert/convert.dart" + patches: "../dart-sdk/lib/_internal/js_runtime/lib/convert_patch.dart" core: - uri: "lib/core/core.dart" - patches: "lib/_internal/js_runtime/lib/core_patch.dart" + uri: "../dart-sdk/lib/core/core.dart" + patches: "../dart-sdk/lib/_internal/js_runtime/lib/core_patch.dart" developer: - uri: "lib/developer/developer.dart" - patches: "lib/_internal/js_runtime/lib/developer_patch.dart" + uri: "../dart-sdk/lib/developer/developer.dart" + patches: "../dart-sdk/lib/_internal/js_runtime/lib/developer_patch.dart" html: - uri: "lib/html/dart2js/html_dart2js.dart" + uri: "../dart-sdk/lib/html/dart2js/html_dart2js.dart" html_common: - uri: "lib/html/html_common/html_common_dart2js.dart" + uri: "../dart-sdk/lib/html/html_common/html_common_dart2js.dart" indexed_db: - uri: "lib/indexed_db/dart2js/indexed_db_dart2js.dart" + uri: "../dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart" _http: - uri: "lib/_http/http.dart" + uri: "../dart-sdk/lib/_http/http.dart" io: - uri: "lib/io/io.dart" + uri: "../dart-sdk/lib/io/io.dart" patches: "io_patch.dart" supported: false isolate: - uri: "lib/isolate/isolate.dart" - patches: "lib/_internal/js_runtime/lib/isolate_patch.dart" + uri: "../dart-sdk/lib/isolate/isolate.dart" + patches: "../dart-sdk/lib/_internal/js_runtime/lib/isolate_patch.dart" supported: false js: - uri: "lib/js/dart2js/js_dart2js.dart" + uri: "../dart-sdk/lib/js/dart2js/js_dart2js.dart" _js: - uri: "lib/js/_js.dart" - patches: "lib/js/_js_client.dart" + uri: "../dart-sdk/lib/js/_js.dart" + patches: "../dart-sdk/lib/js/_js_client.dart" js_util: - uri: "lib/js_util/dart2js/js_util_dart2js.dart" + uri: "../dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart" math: - uri: "lib/math/math.dart" - patches: "lib/_internal/js_runtime/lib/math_patch.dart" + uri: "../dart-sdk/lib/math/math.dart" + patches: "../dart-sdk/lib/_internal/js_runtime/lib/math_patch.dart" mirrors: - uri: "lib/mirrors/mirrors.dart" - patches: "lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart" + uri: "../dart-sdk/lib/mirrors/mirrors.dart" + patches: "../dart-sdk/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" + 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: "lib/_internal/js_runtime/lib/native_typed_data.dart" + uri: "../dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart" svg: - uri: "lib/svg/dart2js/svg_dart2js.dart" + uri: "../dart-sdk/lib/svg/dart2js/svg_dart2js.dart" web_audio: - uri: "lib/web_audio/dart2js/web_audio_dart2js.dart" + uri: "../dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart" web_gl: - uri: "lib/web_gl/dart2js/web_gl_dart2js.dart" + uri: "../dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart" web_sql: - uri: "lib/web_sql/dart2js/web_sql_dart2js.dart" + uri: "../dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart" _internal: - uri: "lib/internal/internal.dart" - patches: "lib/_internal/js_runtime/lib/internal_patch.dart" + uri: "../dart-sdk/lib/internal/internal.dart" + patches: "../dart-sdk/lib/_internal/js_runtime/lib/internal_patch.dart" _js_helper: - uri: "lib/_internal/js_runtime/lib/js_helper.dart" + uri: "../dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart" _interceptors: - uri: "lib/_internal/js_runtime/lib/interceptors.dart" + uri: "../dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart" _foreign_helper: - uri: "lib/_internal/js_runtime/lib/foreign_helper.dart" + uri: "../dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart" _js_names: - uri: "lib/_internal/js_runtime/lib/js_names.dart" + uri: "../dart-sdk/lib/_internal/js_runtime/lib/js_names.dart" _js_primitives: - uri: "lib/_internal/js_runtime/lib/js_primitives.dart" + uri: "../dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart" _js_embedded_names: - uri: "lib/_internal/js_runtime/lib/shared/embedded_names.dart" + uri: "../dart-sdk/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" + uri: "../dart-sdk/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 + uri: "../dart-sdk/lib/html/html_common/metadata.dart" \ No newline at end of file