提交 974e68a1 编写于 作者: A Alexander Aprelev 提交者: GitHub

Make sure we await for the file writing to complete before reporting that...

Make sure we await for the file writing to complete before reporting that compilation is done. (#4210)
上级 b84e114b
......@@ -176,8 +176,8 @@ class _FrontendCompiler implements CompilerInterface {
final IOSink sink = new File(_kernelBinaryFilename).openWrite();
final BinaryPrinter printer = printerFactory.newBinaryPrinter(sink);
printer.writeProgramFile(program);
_outputStream.writeln("$boundaryKey $_kernelBinaryFilename");
await sink.close();
_outputStream.writeln("$boundaryKey $_kernelBinaryFilename");
} else
_outputStream.writeln(boundaryKey);
return null;
......@@ -191,8 +191,8 @@ class _FrontendCompiler implements CompilerInterface {
final IOSink sink = new File(_kernelBinaryFilename).openWrite();
final BinaryPrinter printer = printerFactory.newBinaryPrinter(sink);
printer.writeProgramFile(deltaProgram.newProgram);
_outputStream.writeln("$boundaryKey $_kernelBinaryFilename");
await sink.close();
_outputStream.writeln("$boundaryKey $_kernelBinaryFilename");
return null;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册