From ffbca11f1b007f6e1a436225b7c93898f4b5ef12 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 1 Dec 2020 09:54:43 -0800 Subject: [PATCH] [flutter_tools] delete BuildRunnerWebCompilationProxy and WebCompilationProxy (#70914) --- packages/flutter_tools/lib/executable.dart | 3 - packages/flutter_tools/lib/src/bundle.dart | 8 +- .../isolated/web_compilation_delegate.dart | 187 ------------------ .../flutter_tools/lib/src/test/runner.dart | 11 +- .../lib/src/test/web_test_compiler.dart | 151 ++++++++++++++ .../flutter_tools/lib/src/web/bootstrap.dart | 70 +++++++ .../flutter_tools/lib/src/web/compile.dart | 24 --- .../{tester => test}/event_printer_test.dart | 0 .../{ => test}/test_compiler_test.dart | 6 +- 9 files changed, 240 insertions(+), 220 deletions(-) delete mode 100644 packages/flutter_tools/lib/src/isolated/web_compilation_delegate.dart create mode 100644 packages/flutter_tools/lib/src/test/web_test_compiler.dart rename packages/flutter_tools/test/general.shard/{tester => test}/event_printer_test.dart (100%) rename packages/flutter_tools/test/general.shard/{ => test}/test_compiler_test.dart (97%) diff --git a/packages/flutter_tools/lib/executable.dart b/packages/flutter_tools/lib/executable.dart index 6051669078..2bae0fbdbd 100644 --- a/packages/flutter_tools/lib/executable.dart +++ b/packages/flutter_tools/lib/executable.dart @@ -50,10 +50,8 @@ import 'src/globals.dart' as globals; import 'src/isolated/devtools_launcher.dart'; import 'src/isolated/mustache_template.dart'; import 'src/isolated/resident_web_runner.dart'; -import 'src/isolated/web_compilation_delegate.dart'; import 'src/resident_runner.dart'; import 'src/runner/flutter_command.dart'; -import 'src/web/compile.dart'; import 'src/web/web_runner.dart'; /// Main entry point for commands. @@ -145,7 +143,6 @@ Future main(List args) async { muteCommandLogging: muteCommandLogging, verboseHelp: verboseHelp, overrides: { - WebCompilationProxy: () => BuildRunnerWebCompilationProxy(), // The web runner is not supported in google3 because it depends // on dwds. WebRunnerFactory: () => DwdsWebRunnerFactory(), diff --git a/packages/flutter_tools/lib/src/bundle.dart b/packages/flutter_tools/lib/src/bundle.dart index 45f6b758a5..1eb23f2333 100644 --- a/packages/flutter_tools/lib/src/bundle.dart +++ b/packages/flutter_tools/lib/src/bundle.dart @@ -9,6 +9,7 @@ import 'package:pool/pool.dart'; import 'asset.dart'; import 'base/common.dart'; +import 'base/config.dart'; import 'base/file_system.dart'; import 'base/logger.dart'; import 'build_info.dart'; @@ -40,6 +41,8 @@ String getDefaultCachedKernelPath({ @required bool trackWidgetCreation, @required List dartDefines, @required List extraFrontEndOptions, + FileSystem fileSystem, + Config config, }) { final StringBuffer buffer = StringBuffer(); buffer.writeAll(dartDefines); @@ -51,7 +54,10 @@ String getDefaultCachedKernelPath({ buildPrefix = '${hex.encode(digest.bytes)}.'; } return getKernelPathForTransformerOptions( - globals.fs.path.join(getBuildDirectory(), '${buildPrefix}cache.dill'), + (fileSystem ?? globals.fs).path.join(getBuildDirectory( + config ?? globals.config, + fileSystem ?? globals.fs + ), '${buildPrefix}cache.dill'), trackWidgetCreation: trackWidgetCreation, ); } diff --git a/packages/flutter_tools/lib/src/isolated/web_compilation_delegate.dart b/packages/flutter_tools/lib/src/isolated/web_compilation_delegate.dart deleted file mode 100644 index ca2d34cca1..0000000000 --- a/packages/flutter_tools/lib/src/isolated/web_compilation_delegate.dart +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2014 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 'package:meta/meta.dart'; -import 'package:package_config/package_config.dart'; - -import '../artifacts.dart'; -import '../base/common.dart'; -import '../base/file_system.dart'; -import '../build_info.dart'; -import '../bundle.dart'; -import '../compile.dart'; -import '../dart/language_version.dart'; -import '../globals.dart' as globals; -import '../web/compile.dart'; -import '../web/memory_fs.dart'; - -// TODO(jonahwilliams): this class was kept around to reduce the diff in the migration -// from build_runner to the frontend_server, but should be removed/refactored to be -// similar to the test_compiler pattern used for regular flutter tests -class BuildRunnerWebCompilationProxy extends WebCompilationProxy { - BuildRunnerWebCompilationProxy(); - - @override - Future initialize({ - @required Directory projectDirectory, - @required String testOutputDir, - @required List testFiles, - @required BuildInfo buildInfo, - }) async { - LanguageVersion languageVersion = LanguageVersion(2, 8); - Artifact platformDillArtifact; - // TODO(jonahwilliams): to support autodetect this would need to partition the source code into a - // a sound and unsound set and perform separate compilations. - final List extraFrontEndOptions = List.of(buildInfo.extraFrontEndOptions ?? []); - if (buildInfo.nullSafetyMode == NullSafetyMode.unsound || buildInfo.nullSafetyMode == NullSafetyMode.autodetect) { - platformDillArtifact = Artifact.webPlatformKernelDill; - if (!extraFrontEndOptions.contains('--no-sound-null-safety')) { - extraFrontEndOptions.add('--no-sound-null-safety'); - } - } else if (buildInfo.nullSafetyMode == NullSafetyMode.sound) { - platformDillArtifact = Artifact.webPlatformSoundKernelDill; - languageVersion = nullSafeVersion; - if (!extraFrontEndOptions.contains('--sound-null-safety')) { - extraFrontEndOptions.add('--sound-null-safety'); - } - } - - final Directory outputDirectory = globals.fs.directory(testOutputDir) - ..createSync(recursive: true); - final List generatedFiles = []; - for (final String testFilePath in testFiles) { - final List relativeTestSegments = globals.fs.path.split( - globals.fs.path.relative(testFilePath, from: projectDirectory.childDirectory('test').path)); - final File generatedFile = globals.fs.file( - globals.fs.path.join(outputDirectory.path, '${relativeTestSegments.join('_')}.test.dart')); - generatedFile - ..createSync(recursive: true) - ..writeAsStringSync(_generateEntrypoint(relativeTestSegments.join('/'), testFilePath, languageVersion)); - generatedFiles.add(generatedFile); - } - // Generate a fake main file that imports all tests to be executed. This will force - // each of them to be compiled. - final StringBuffer buffer = StringBuffer('// @dart=${languageVersion.major}.${languageVersion.minor}\n'); - for (final File generatedFile in generatedFiles) { - buffer.writeln('import "${globals.fs.path.basename(generatedFile.path)}";'); - } - buffer.writeln('void main() {}'); - globals.fs.file(globals.fs.path.join(outputDirectory.path, 'main.dart')) - ..createSync() - ..writeAsStringSync(buffer.toString()); - - final ResidentCompiler residentCompiler = ResidentCompiler( - globals.artifacts.getArtifactPath(Artifact.flutterWebSdk, mode: buildInfo.mode), - buildMode: buildInfo.mode, - trackWidgetCreation: buildInfo.trackWidgetCreation, - fileSystemRoots: [ - projectDirectory.childDirectory('test').path, - testOutputDir, - ], - // Override the filesystem scheme so that the frontend_server can find - // the generated entrypoint code. - fileSystemScheme: 'org-dartlang-app', - initializeFromDill: getDefaultCachedKernelPath( - trackWidgetCreation: buildInfo.trackWidgetCreation, - dartDefines: buildInfo.dartDefines, - extraFrontEndOptions: extraFrontEndOptions, - ), - targetModel: TargetModel.dartdevc, - extraFrontEndOptions: extraFrontEndOptions, - platformDill: globals.fs.file(globals.artifacts - .getArtifactPath(platformDillArtifact, mode: buildInfo.mode)) - .absolute.uri.toString(), - dartDefines: buildInfo.dartDefines, - librariesSpec: globals.fs.file(globals.artifacts - .getArtifactPath(Artifact.flutterWebLibrariesJson)).uri.toString(), - packagesPath: buildInfo.packagesPath, - artifacts: globals.artifacts, - processManager: globals.processManager, - logger: globals.logger, - platform: globals.platform, - ); - - final CompilerOutput output = await residentCompiler.recompile( - Uri.parse('org-dartlang-app:///main.dart'), - [], - outputPath: outputDirectory.childFile('out').path, - packageConfig: buildInfo.packageConfig, - ); - if (output.errorCount > 0) { - throwToolExit('Failed to compile'); - } - final File codeFile = outputDirectory.childFile('${output.outputFilename}.sources'); - final File manifestFile = outputDirectory.childFile('${output.outputFilename}.json'); - final File sourcemapFile = outputDirectory.childFile('${output.outputFilename}.map'); - final File metadataFile = outputDirectory.childFile('${output.outputFilename}.metadata'); - return WebMemoryFS() - ..write(codeFile, manifestFile, sourcemapFile, metadataFile); - } - - String _generateEntrypoint(String relativeTestPath, String absolutePath, LanguageVersion languageVersion) { - return ''' - // @dart = ${languageVersion.major}.${languageVersion.minor} - import 'org-dartlang-app:///$relativeTestPath' as test; - import 'dart:ui' as ui; - import 'dart:html'; - import 'dart:js'; - import 'package:stream_channel/stream_channel.dart'; - import 'package:flutter_test/flutter_test.dart'; - import 'package:test_api/src/backend/stack_trace_formatter.dart'; // ignore: implementation_imports - import 'package:test_api/src/remote_listener.dart'; // ignore: implementation_imports - import 'package:test_api/src/suite_channel_manager.dart'; // ignore: implementation_imports - - // Extra initialization for flutter_web. - // The following parameters are hard-coded in Flutter's test embedder. Since - // we don't have an embedder yet this is the lowest-most layer we can put - // this stuff in. - Future main() async { - ui.debugEmulateFlutterTesterEnvironment = true; - await ui.webOnlyInitializePlatform(); - webGoldenComparator = DefaultWebGoldenComparator(Uri.parse('$absolutePath')); - (ui.window as dynamic).debugOverrideDevicePixelRatio(3.0); - (ui.window as dynamic).webOnlyDebugPhysicalSizeOverride = const ui.Size(2400, 1800); - internalBootstrapBrowserTest(() => test.main); - } - - void internalBootstrapBrowserTest(Function getMain()) { - var channel = serializeSuite(getMain, hidePrints: false); - postMessageChannel().pipe(channel); - } - - StreamChannel serializeSuite(Function getMain(), {bool hidePrints = true}) => RemoteListener.start(getMain, hidePrints: hidePrints); - - StreamChannel suiteChannel(String name) { - var manager = SuiteChannelManager.current; - if (manager == null) { - throw StateError('suiteChannel() may only be called within a test worker.'); - } - return manager.connectOut(name); - } - - StreamChannel postMessageChannel() { - var controller = StreamChannelController(sync: true); - window.onMessage.firstWhere((message) { - return message.origin == window.location.origin && message.data == "port"; - }).then((message) { - var port = message.ports.first; - var portSubscription = port.onMessage.listen((message) { - controller.local.sink.add(message.data); - }); - controller.local.stream.listen((data) { - port.postMessage({"data": data}); - }, onDone: () { - port.postMessage({"event": "done"}); - portSubscription.cancel(); - }); - }); - context['parent'].callMethod('postMessage', [ - JsObject.jsify({"href": window.location.href, "ready": true}), - window.location.origin, - ]); - return controller.foreign; - } - '''; - } -} diff --git a/packages/flutter_tools/lib/src/test/runner.dart b/packages/flutter_tools/lib/src/test/runner.dart index d4e0b373bd..4566db2507 100644 --- a/packages/flutter_tools/lib/src/test/runner.dart +++ b/packages/flutter_tools/lib/src/test/runner.dart @@ -12,12 +12,12 @@ import '../build_info.dart'; import '../globals.dart' as globals; import '../project.dart'; import '../web/chrome.dart'; -import '../web/compile.dart'; import '../web/memory_fs.dart'; import 'flutter_platform.dart' as loader; import 'flutter_web_platform.dart'; import 'test_wrapper.dart'; import 'watcher.dart'; +import 'web_test_compiler.dart'; /// A class that abstracts launching the test process from the test runner. abstract class FlutterTestRunner { @@ -123,7 +123,14 @@ class _FlutterTestRunnerImpl implements FlutterTestRunner { .absolute .uri .toFilePath(); - final WebMemoryFS result = await webCompilationProxy.initialize( + final WebMemoryFS result = await WebTestCompiler( + logger: globals.logger, + fileSystem: globals.fs, + platform: globals.platform, + artifacts: globals.artifacts, + processManager: globals.processManager, + config: globals.config, + ).initialize( projectDirectory: flutterProject.directory, testOutputDir: tempBuildDir, testFiles: testFiles, diff --git a/packages/flutter_tools/lib/src/test/web_test_compiler.dart b/packages/flutter_tools/lib/src/test/web_test_compiler.dart new file mode 100644 index 0000000000..49cd57d808 --- /dev/null +++ b/packages/flutter_tools/lib/src/test/web_test_compiler.dart @@ -0,0 +1,151 @@ +// Copyright 2014 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 'package:meta/meta.dart'; +import 'package:package_config/package_config.dart'; +import 'package:process/process.dart'; + +import '../artifacts.dart'; +import '../base/common.dart'; +import '../base/config.dart'; +import '../base/file_system.dart'; +import '../base/logger.dart'; +import '../base/platform.dart'; +import '../build_info.dart'; +import '../bundle.dart'; +import '../compile.dart'; +import '../dart/language_version.dart'; +import '../web/bootstrap.dart'; +import '../web/memory_fs.dart'; + +/// A web compiler for the test runner. +class WebTestCompiler { + WebTestCompiler({ + @required FileSystem fileSystem, + @required Logger logger, + @required Artifacts artifacts, + @required Platform platform, + @required ProcessManager processManager, + @required Config config, + }) : _logger = logger, + _fileSystem = fileSystem, + _artifacts = artifacts, + _platform = platform, + _processManager = processManager, + _config = config; + + final Logger _logger; + final FileSystem _fileSystem; + final Artifacts _artifacts; + final Platform _platform; + final ProcessManager _processManager; + final Config _config; + + Future initialize({ + @required Directory projectDirectory, + @required String testOutputDir, + @required List testFiles, + @required BuildInfo buildInfo, + }) async { + LanguageVersion languageVersion = LanguageVersion(2, 8); + Artifact platformDillArtifact; + // TODO(jonahwilliams): to support autodetect this would need to partition the source code into a + // a sound and unsound set and perform separate compilations. + final List extraFrontEndOptions = List.of(buildInfo.extraFrontEndOptions ?? []); + if (buildInfo.nullSafetyMode == NullSafetyMode.unsound || buildInfo.nullSafetyMode == NullSafetyMode.autodetect) { + platformDillArtifact = Artifact.webPlatformKernelDill; + if (!extraFrontEndOptions.contains('--no-sound-null-safety')) { + extraFrontEndOptions.add('--no-sound-null-safety'); + } + } else if (buildInfo.nullSafetyMode == NullSafetyMode.sound) { + platformDillArtifact = Artifact.webPlatformSoundKernelDill; + languageVersion = nullSafeVersion; + if (!extraFrontEndOptions.contains('--sound-null-safety')) { + extraFrontEndOptions.add('--sound-null-safety'); + } + } + + final Directory outputDirectory = _fileSystem.directory(testOutputDir) + ..createSync(recursive: true); + final List generatedFiles = []; + for (final String testFilePath in testFiles) { + final List relativeTestSegments = _fileSystem.path.split( + _fileSystem.path.relative(testFilePath, from: projectDirectory.childDirectory('test').path)); + final File generatedFile = _fileSystem.file( + _fileSystem.path.join(outputDirectory.path, '${relativeTestSegments.join('_')}.test.dart')); + generatedFile + ..createSync(recursive: true) + ..writeAsStringSync(generateTestEntrypoint( + relativeTestPath: relativeTestSegments.join('/'), + absolutePath: testFilePath, + languageVersion: languageVersion, + )); + generatedFiles.add(generatedFile); + } + // Generate a fake main file that imports all tests to be executed. This will force + // each of them to be compiled. + final StringBuffer buffer = StringBuffer('// @dart=${languageVersion.major}.${languageVersion.minor}\n'); + for (final File generatedFile in generatedFiles) { + buffer.writeln('import "${_fileSystem.path.basename(generatedFile.path)}";'); + } + buffer.writeln('void main() {}'); + _fileSystem.file(_fileSystem.path.join(outputDirectory.path, 'main.dart')) + ..createSync() + ..writeAsStringSync(buffer.toString()); + + final String cachedKernelPath = getDefaultCachedKernelPath( + trackWidgetCreation: buildInfo.trackWidgetCreation, + dartDefines: buildInfo.dartDefines, + extraFrontEndOptions: extraFrontEndOptions, + fileSystem: _fileSystem, + config: _config, + ); + final ResidentCompiler residentCompiler = ResidentCompiler( + _artifacts.getArtifactPath(Artifact.flutterWebSdk, mode: buildInfo.mode), + buildMode: buildInfo.mode, + trackWidgetCreation: buildInfo.trackWidgetCreation, + fileSystemRoots: [ + projectDirectory.childDirectory('test').path, + testOutputDir, + ], + // Override the filesystem scheme so that the frontend_server can find + // the generated entrypoint code. + fileSystemScheme: 'org-dartlang-app', + initializeFromDill: cachedKernelPath, + targetModel: TargetModel.dartdevc, + extraFrontEndOptions: extraFrontEndOptions, + platformDill: _fileSystem.file(_artifacts + .getArtifactPath(platformDillArtifact, mode: buildInfo.mode)) + .absolute.uri.toString(), + dartDefines: buildInfo.dartDefines, + librariesSpec: _fileSystem.file(_artifacts + .getArtifactPath(Artifact.flutterWebLibrariesJson)).uri.toString(), + packagesPath: buildInfo.packagesPath, + artifacts: _artifacts, + processManager: _processManager, + logger: _logger, + platform: _platform, + ); + + final CompilerOutput output = await residentCompiler.recompile( + Uri.parse('org-dartlang-app:///main.dart'), + [], + outputPath: outputDirectory.childFile('out').path, + packageConfig: buildInfo.packageConfig, + ); + if (output.errorCount > 0) { + throwToolExit('Failed to compile'); + } + // Cache the output kernel file to speed up subsequent compiles. + _fileSystem.file(cachedKernelPath).parent.createSync(recursive: true); + _fileSystem.file(output.outputFilename).copySync(cachedKernelPath); + + final File codeFile = outputDirectory.childFile('${output.outputFilename}.sources'); + final File manifestFile = outputDirectory.childFile('${output.outputFilename}.json'); + final File sourcemapFile = outputDirectory.childFile('${output.outputFilename}.map'); + final File metadataFile = outputDirectory.childFile('${output.outputFilename}.metadata'); + return WebMemoryFS() + ..write(codeFile, manifestFile, sourcemapFile, metadataFile); + } +} diff --git a/packages/flutter_tools/lib/src/web/bootstrap.dart b/packages/flutter_tools/lib/src/web/bootstrap.dart index b79add80ca..18c85a30a2 100644 --- a/packages/flutter_tools/lib/src/web/bootstrap.dart +++ b/packages/flutter_tools/lib/src/web/bootstrap.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'package:meta/meta.dart'; +import 'package:package_config/package_config.dart'; /// The JavaScript bootstrap script to support in-browser hot restart. /// @@ -95,6 +96,75 @@ define("$bootstrapModule", ["$entrypoint", "dart_sdk"], function(app, dart_sdk) '''; } +/// Generates the bootstrap logic required for a flutter test running in a browser. +/// +/// This hard-codes the device pixel ratio to 3.0 and a 2400 x 1800 window size. +String generateTestEntrypoint({ + @required String relativeTestPath, + @required String absolutePath, + @required LanguageVersion languageVersion, +}) { + return ''' + // @dart = ${languageVersion.major}.${languageVersion.minor} + import 'org-dartlang-app:///$relativeTestPath' as test; + import 'dart:ui' as ui; + import 'dart:html'; + import 'dart:js'; + import 'package:stream_channel/stream_channel.dart'; + import 'package:flutter_test/flutter_test.dart'; + import 'package:test_api/src/backend/stack_trace_formatter.dart'; // ignore: implementation_imports + import 'package:test_api/src/remote_listener.dart'; // ignore: implementation_imports + import 'package:test_api/src/suite_channel_manager.dart'; // ignore: implementation_imports + + Future main() async { + ui.debugEmulateFlutterTesterEnvironment = true; + await ui.webOnlyInitializePlatform(); + webGoldenComparator = DefaultWebGoldenComparator(Uri.parse('$absolutePath')); + (ui.window as dynamic).debugOverrideDevicePixelRatio(3.0); + (ui.window as dynamic).webOnlyDebugPhysicalSizeOverride = const ui.Size(2400, 1800); + internalBootstrapBrowserTest(() => test.main); + } + + void internalBootstrapBrowserTest(Function getMain()) { + var channel = serializeSuite(getMain, hidePrints: false); + postMessageChannel().pipe(channel); + } + + StreamChannel serializeSuite(Function getMain(), {bool hidePrints = true}) => RemoteListener.start(getMain, hidePrints: hidePrints); + + StreamChannel suiteChannel(String name) { + var manager = SuiteChannelManager.current; + if (manager == null) { + throw StateError('suiteChannel() may only be called within a test worker.'); + } + return manager.connectOut(name); + } + + StreamChannel postMessageChannel() { + var controller = StreamChannelController(sync: true); + window.onMessage.firstWhere((message) { + return message.origin == window.location.origin && message.data == "port"; + }).then((message) { + var port = message.ports.first; + var portSubscription = port.onMessage.listen((message) { + controller.local.sink.add(message.data); + }); + controller.local.stream.listen((data) { + port.postMessage({"data": data}); + }, onDone: () { + port.postMessage({"event": "done"}); + portSubscription.cancel(); + }); + }); + context['parent'].callMethod('postMessage', [ + JsObject.jsify({"href": window.location.href, "ready": true}), + window.location.origin, + ]); + return controller.foreign; + } + '''; +} + /// Generate the unit test bootstrap file. String generateTestBootstrapFileContents(String mainUri, String requireUrl, String mapperUrl) { return ''' diff --git a/packages/flutter_tools/lib/src/web/compile.dart b/packages/flutter_tools/lib/src/web/compile.dart index 465a0948d3..7e08363782 100644 --- a/packages/flutter_tools/lib/src/web/compile.dart +++ b/packages/flutter_tools/lib/src/web/compile.dart @@ -2,11 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:meta/meta.dart'; - import '../artifacts.dart'; import '../base/common.dart'; -import '../base/context.dart'; import '../base/file_system.dart'; import '../base/logger.dart'; import '../build_info.dart'; @@ -19,10 +16,6 @@ import '../globals.dart' as globals; import '../platform_plugins.dart'; import '../plugins.dart'; import '../project.dart'; -import '../web/memory_fs.dart'; - -/// The [WebCompilationProxy] instance. -WebCompilationProxy get webCompilationProxy => context.get(); Future buildWeb( FlutterProject flutterProject, @@ -91,23 +84,6 @@ Future buildWeb( globals.flutterUsage.sendTiming('build', 'dart2js', Duration(milliseconds: sw.elapsedMilliseconds)); } -/// An indirection on web compilation. -/// -/// Avoids issues with syncing build_runner_core to other repos. -class WebCompilationProxy { - const WebCompilationProxy(); - - /// Initialize the web compiler from the `projectDirectory`. - Future initialize({ - @required Directory projectDirectory, - @required String testOutputDir, - @required List testFiles, - @required BuildInfo buildInfo, - }) async { - throw UnimplementedError(); - } -} - /// Web rendering backend mode. enum WebRendererMode { /// Auto detects which rendering backend to use. diff --git a/packages/flutter_tools/test/general.shard/tester/event_printer_test.dart b/packages/flutter_tools/test/general.shard/test/event_printer_test.dart similarity index 100% rename from packages/flutter_tools/test/general.shard/tester/event_printer_test.dart rename to packages/flutter_tools/test/general.shard/test/event_printer_test.dart diff --git a/packages/flutter_tools/test/general.shard/test_compiler_test.dart b/packages/flutter_tools/test/general.shard/test/test_compiler_test.dart similarity index 97% rename from packages/flutter_tools/test/general.shard/test_compiler_test.dart rename to packages/flutter_tools/test/general.shard/test/test_compiler_test.dart index 61884b1117..bdc763a74c 100644 --- a/packages/flutter_tools/test/general.shard/test_compiler_test.dart +++ b/packages/flutter_tools/test/general.shard/test/test_compiler_test.dart @@ -14,9 +14,9 @@ import 'package:flutter_tools/src/test/test_compiler.dart'; import 'package:mockito/mockito.dart'; import 'package:package_config/package_config_types.dart'; -import '../src/common.dart'; -import '../src/context.dart'; -import '../src/testbed.dart'; +import '../../src/common.dart'; +import '../../src/context.dart'; +import '../../src/testbed.dart'; final Platform linuxPlatform = FakePlatform( operatingSystem: 'linux',