mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
[dartdevc] Retry ddc incremental compile on crash
Change-Id: I00c2eb1b3bc6d9153fd2e88a8074e5670a0e082e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99442 Reviewed-by: Jake Macdonald <jakemac@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Reviewed-by: Jenny Messerly <jmesserly@google.com> Commit-Queue: Vijay Menon <vsm@google.com>
This commit is contained in:
parent
6dc209e858
commit
ecdbdf00b8
|
@ -56,6 +56,18 @@ class _CompilerWorker extends AsyncWorkerLoop {
|
|||
ZoneSpecification(print: (self, parent, zone, message) {
|
||||
output.writeln(message.toString());
|
||||
}));
|
||||
|
||||
if (lastResult.crashed && context != null) {
|
||||
// TODO(vsm): See https://github.com/dart-lang/sdk/issues/36644.
|
||||
// If the CFE is crashing with previous state, then clear compilation
|
||||
// state and try again.
|
||||
output.clear();
|
||||
lastResult = await runZoned(() => compile(args, previousResult: null),
|
||||
zoneSpecification:
|
||||
ZoneSpecification(print: (self, parent, zone, message) {
|
||||
output.writeln(message.toString());
|
||||
}));
|
||||
}
|
||||
return WorkResponse()
|
||||
..exitCode = lastResult.success ? 0 : 1
|
||||
..output = output.toString();
|
||||
|
|
Loading…
Reference in a new issue