Skip to content

Commit

Permalink
Log missing compilation output (#3992)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigurdm authored Aug 22, 2023
1 parent 57e5d58 commit ee3f0ff
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/src/dart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ Future<void> precompile({
);
final result = await client.compile();

// Sanity check. We've had reports of the compilation failing to provide a
// result, perhaps due to low-memory conditions.
// This should make this slightly easier to recognize in error reports.
if (!fileExists(temporaryIncrementalDill)) {
log.error(
'Compilation did not produce any result. Expected file at `$temporaryIncrementalDill`',
result.dillOutput,
);
}

final highlightedName = log.bold(name);
if (result.errorCount == 0) {
log.message('Built $highlightedName.');
Expand Down

0 comments on commit ee3f0ff

Please sign in to comment.