Return copied kernel filename for flutter test execution. (#15298)

* Return copied kernel filename.

This fixes 'flutter test --preview-dart-2' crash.
This commit is contained in:
Alexander Aprelev
2018-03-08 16:02:21 -08:00
committed by GitHub
parent 0038a2b21c
commit 2890e18bcb

View File

@@ -120,10 +120,11 @@ class _Compiler {
outputPath: outputDill.path,
);
// Copy output dill next to the source file.
await outputDill.copy(request.path + '.dill');
final File kernelReadyToRun = await fs.file(outputPath).copy(
request.path + '.dill');
compiler.accept();
compiler.reset();
request.result.complete(outputPath);
request.result.complete(kernelReadyToRun.path);
// Only remove now when we finished processing the element
compilationQueue.removeAt(0);
}