@@ -387,28 +387,33 @@ class DartdocJobProcessor extends JobProcessor {
387
387
);
388
388
final hasIndexHtml = await File (p.join (outputDir, 'index.html' )).exists ();
389
389
final hasIndexJson = await File (p.join (outputDir, 'index.json' )).exists ();
390
- return DartdocResult (pr, pr.exitCode == 15 , hasIndexHtml, hasIndexJson);
390
+ final stdoutStr = pr.stdout.toString ();
391
+ return DartdocResult (
392
+ pr,
393
+ pr.exitCode == 15 ||
394
+ pr.exitCode == - 9 ||
395
+ (pr.exitCode != 0 && stdoutStr.contains ('timeout' )),
396
+ hasIndexHtml,
397
+ hasIndexJson,
398
+ );
391
399
}
392
400
393
401
final sw = Stopwatch ()..start ();
394
402
DartdocResult r = await runDartdoc ();
395
403
sw.stop ();
396
404
logger.info ('Running dartdoc for ${job .packageName } ${job .packageVersion } '
397
405
'completed in ${sw .elapsed }.' );
398
- final shouldRetry = r.wasTimeout ||
399
- // TODO: remove this after https://github.com/dart-lang/dartdoc/issues/2101 gets fixed
400
- (! r.wasSuccessful &&
401
- r.processResult.stdout.toString ().contains (
402
- "type 'FunctionTypeImpl' is not a subtype of type 'InterfaceType'" ));
403
- if (shouldRetry) {
406
+ if (r.wasTimeout) {
404
407
r = await runDartdoc (isReduced: true );
405
408
}
406
409
407
410
_appendLog (logFileOutput, r.processResult);
408
411
final hasContent = r.hasIndexHtml && r.hasIndexJson;
409
412
410
413
if (r.processResult.exitCode != 0 ) {
411
- if (hasContent || _isKnownFailurePattern (_mergeOutput (r.processResult))) {
414
+ if (hasContent ||
415
+ r.wasTimeout ||
416
+ _isKnownFailurePattern (_mergeOutput (r.processResult))) {
412
417
logger.info ('Error while running dartdoc for $job (see log.txt).' );
413
418
} else {
414
419
final output = _mergeOutput (r.processResult, compressStdout: true );
0 commit comments