Unverified Commit 2890e18b authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

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

* Return copied kernel filename.

This fixes 'flutter test --preview-dart-2' crash.
parent 0038a2b2
...@@ -120,10 +120,11 @@ class _Compiler { ...@@ -120,10 +120,11 @@ class _Compiler {
outputPath: outputDill.path, outputPath: outputDill.path,
); );
// Copy output dill next to the source file. // 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.accept();
compiler.reset(); compiler.reset();
request.result.complete(outputPath); request.result.complete(kernelReadyToRun.path);
// Only remove now when we finished processing the element // Only remove now when we finished processing the element
compilationQueue.removeAt(0); compilationQueue.removeAt(0);
} }
......
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