Unverified Commit d04fa1a6 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

only pass packages once (#24074)

parent a6e90113
...@@ -221,8 +221,10 @@ class KernelCompiler { ...@@ -221,8 +221,10 @@ class KernelCompiler {
if (incrementalCompilerByteStorePath != null) { if (incrementalCompilerByteStorePath != null) {
command.add('--incremental'); command.add('--incremental');
} }
Uri mainUri;
if (packagesPath != null) { if (packagesPath != null) {
command.addAll(<String>['--packages', packagesPath]); command.addAll(<String>['--packages', packagesPath]);
mainUri = _PackageUriMapper.findUri(mainPath, packagesPath);
} }
if (outputFilePath != null) { if (outputFilePath != null) {
command.addAll(<String>['--output-dill', outputFilePath]); command.addAll(<String>['--output-dill', outputFilePath]);
...@@ -242,11 +244,6 @@ class KernelCompiler { ...@@ -242,11 +244,6 @@ class KernelCompiler {
if (extraFrontEndOptions != null) if (extraFrontEndOptions != null)
command.addAll(extraFrontEndOptions); command.addAll(extraFrontEndOptions);
Uri mainUri;
if (packagesPath != null) {
command.addAll(<String>['--packages', packagesPath]);
mainUri = _PackageUriMapper.findUri(mainPath, packagesPath);
}
command.add(mainUri?.toString() ?? mainPath); command.add(mainUri?.toString() ?? mainPath);
printTrace(command.join(' ')); printTrace(command.join(' '));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment