Skip to content

Log dartdoc output. #1353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.22.3

- Do not emit package names in `allDependencies` with trivial syntax issues.
- Log `dartdoc` output.

## 0.22.2

Expand Down
4 changes: 4 additions & 0 deletions lib/src/package_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,12 @@ class PackageContext {
usesFlutter: usesFlutter,
);
if (pr.wasTimeout) {
log.warning('`dartdoc` timed out:\n${pr.asJoinedOutput}');
return DartdocResult.error(
'`dartdoc` could not complete in $timeout.');
}
if (pr.wasError) {
log.warning('`dartdoc` failed:\n${pr.asJoinedOutput}');
return DartdocResult.error(pr.asTrimmedOutput);
}

Expand All @@ -276,9 +278,11 @@ class PackageContext {
final hasIndexJson =
await File(p.join(dartdocOutputDir, 'index.json')).exists();
if (!hasIndexHtml || !hasIndexJson) {
log.warning('`dartdoc` failed:\n${pr.asJoinedOutput}');
return DartdocResult.error(
'`dartdoc` did not create expected output files.');
}
log.info('`dartdoc` completed:\n${pr.asJoinedOutput}');
return DartdocResult.success();
} catch (e, st) {
log.severe('Could not run dartdoc.', e, st);
Expand Down
Loading