From d04fa1a67084041f6ac9fe44eeb7c73529593921 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 7 Nov 2018 21:57:00 -0800 Subject: [PATCH] only pass packages once (#24074) --- packages/flutter_tools/lib/src/compile.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index fa8f42c55e..450b9a0081 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart @@ -221,8 +221,10 @@ class KernelCompiler { if (incrementalCompilerByteStorePath != null) { command.add('--incremental'); } + Uri mainUri; if (packagesPath != null) { command.addAll(['--packages', packagesPath]); + mainUri = _PackageUriMapper.findUri(mainPath, packagesPath); } if (outputFilePath != null) { command.addAll(['--output-dill', outputFilePath]); @@ -242,11 +244,6 @@ class KernelCompiler { if (extraFrontEndOptions != null) command.addAll(extraFrontEndOptions); - Uri mainUri; - if (packagesPath != null) { - command.addAll(['--packages', packagesPath]); - mainUri = _PackageUriMapper.findUri(mainPath, packagesPath); - } command.add(mainUri?.toString() ?? mainPath); printTrace(command.join(' '));