mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 21:50:11 +00:00
Move widget transformer to kernel package
Change-Id: I7f9ece029e181d380f37028ed04f97d4fdfb12b1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101985 Reviewed-by: Kevin Millikin <kmillikin@google.com>
This commit is contained in:
parent
638ebcab97
commit
1179467a5e
|
@ -13,6 +13,7 @@ import 'package:front_end/src/api_unstable/ddc.dart' as fe;
|
||||||
import 'package:kernel/kernel.dart' hide MapEntry;
|
import 'package:kernel/kernel.dart' hide MapEntry;
|
||||||
import 'package:kernel/text/ast_to_text.dart' as kernel show Printer;
|
import 'package:kernel/text/ast_to_text.dart' as kernel show Printer;
|
||||||
import 'package:kernel/binary/ast_to_binary.dart' as kernel show BinaryPrinter;
|
import 'package:kernel/binary/ast_to_binary.dart' as kernel show BinaryPrinter;
|
||||||
|
import 'package:kernel/transformations/track_widget_constructor_locations.dart';
|
||||||
import 'package:path/path.dart' as path;
|
import 'package:path/path.dart' as path;
|
||||||
import 'package:source_maps/source_maps.dart' show SourceMapBuilder;
|
import 'package:source_maps/source_maps.dart' show SourceMapBuilder;
|
||||||
|
|
||||||
|
@ -20,7 +21,6 @@ import '../compiler/js_names.dart' as JS;
|
||||||
import '../compiler/module_builder.dart';
|
import '../compiler/module_builder.dart';
|
||||||
import '../compiler/shared_command.dart';
|
import '../compiler/shared_command.dart';
|
||||||
import '../compiler/shared_compiler.dart';
|
import '../compiler/shared_compiler.dart';
|
||||||
import '../flutter/track_widget_constructor_locations.dart';
|
|
||||||
import '../js_ast/js_ast.dart' as JS;
|
import '../js_ast/js_ast.dart' as JS;
|
||||||
import '../js_ast/js_ast.dart' show js;
|
import '../js_ast/js_ast.dart' show js;
|
||||||
import '../js_ast/source_map_printer.dart' show SourceMapPrintingContext;
|
import '../js_ast/source_map_printer.dart' show SourceMapPrintingContext;
|
||||||
|
|
|
@ -1,26 +1,13 @@
|
||||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
// for details. All rights reserved. Use of this source code is governed by a
|
||||||
// found in the LICENSE file.
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// TODO(jmesserly): this file was copied from:
|
library kernel.transformations.track_widget_constructor_locations;
|
||||||
// https://github.com/flutter/engine/blob/4b01d795feec3ba8231a397a4ec2759954d8216e/flutter_kernel_transformers/lib/track_widget_constructor_locations.dart
|
|
||||||
//
|
|
||||||
// Longer term, this transform should be injected by Flutter when they building
|
|
||||||
// the Flutter-specific `dartdevc` script.
|
|
||||||
//
|
|
||||||
// The following modifications were made:
|
|
||||||
// - remove "package:vm" dependency (only used for one interface)
|
|
||||||
// - removed the class hierarchy parameter.
|
|
||||||
library track_widget_constructor_locations;
|
|
||||||
|
|
||||||
// The kernel/src import below that requires lint `ignore_for_file`
|
|
||||||
// is a temporary state of things until kernel team builds better api that would
|
|
||||||
// replace api used below. This api was made private in an effort to discourage
|
|
||||||
// further use.
|
|
||||||
// ignore_for_file: implementation_imports
|
|
||||||
import 'package:kernel/ast.dart';
|
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
import '../ast.dart';
|
||||||
|
|
||||||
// Parameter name used to track were widget constructor calls were made from.
|
// Parameter name used to track were widget constructor calls were made from.
|
||||||
//
|
//
|
||||||
// The parameter name contains a randomly generate hex string to avoid collision
|
// The parameter name contains a randomly generate hex string to avoid collision
|
|
@ -16,10 +16,10 @@ import 'package:args/args.dart';
|
||||||
import 'package:bazel_worker/bazel_worker.dart';
|
import 'package:bazel_worker/bazel_worker.dart';
|
||||||
import 'package:build_integration/file_system/multi_root.dart';
|
import 'package:build_integration/file_system/multi_root.dart';
|
||||||
import 'package:dev_compiler/src/kernel/target.dart';
|
import 'package:dev_compiler/src/kernel/target.dart';
|
||||||
import 'package:dev_compiler/src/flutter/track_widget_constructor_locations.dart';
|
|
||||||
import 'package:front_end/src/api_unstable/bazel_worker.dart' as fe;
|
import 'package:front_end/src/api_unstable/bazel_worker.dart' as fe;
|
||||||
import 'package:kernel/ast.dart' show Component, Library;
|
import 'package:kernel/ast.dart' show Component, Library;
|
||||||
import 'package:kernel/target/targets.dart';
|
import 'package:kernel/target/targets.dart';
|
||||||
|
import 'package:kernel/transformations/track_widget_constructor_locations.dart';
|
||||||
import 'package:vm/target/vm.dart';
|
import 'package:vm/target/vm.dart';
|
||||||
import 'package:vm/target/flutter.dart';
|
import 'package:vm/target/flutter.dart';
|
||||||
import 'package:vm/target/flutter_runner.dart';
|
import 'package:vm/target/flutter_runner.dart';
|
||||||
|
|
Loading…
Reference in a new issue