Skip to content

Commit ad10e49

Browse files
authored
More graceful handling of no documentable libraries (#1839)
* More graceful handling of no documentable libraries * flutter_plugin_tools has no libraries and will always fail * Error message tweak and travis update * Update test package docs for 2.1 release
1 parent 2a81b64 commit ad10e49

File tree

13 files changed

+151
-19
lines changed

13 files changed

+151
-19
lines changed

lib/dartdoc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class Dartdoc extends PackageBuilder {
178178
DartdocResults dartdocResults = await generateDocsBase();
179179
if (dartdocResults.packageGraph.publicLibraries.isEmpty) {
180180
throw new DartdocFailure(
181-
"dartdoc could not find any libraries to document. Run `pub get` and try again.");
181+
"dartdoc could not find any libraries to document");
182182
}
183183

184184
final int errorCount =

lib/src/model.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6037,7 +6037,7 @@ class Package extends LibraryContainer
60376037

60386038
/// Is this the package at the top of the list? We display the first
60396039
/// package specially (with "Libraries" rather than the package name).
6040-
bool get isFirstPackage => identical(packageGraph.localPackages.first, this);
6040+
bool get isFirstPackage => packageGraph.localPackages.isNotEmpty && identical(packageGraph.localPackages.first, this);
60416041

60426042
@override
60436043
bool get isSdk => packageMeta.isSdk;

testing/test_package_docs/ex/Deprecated-class.html

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testing/test_package_docs/ex/Deprecated/Deprecated.html

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testing/test_package_docs/ex/Deprecated/expires.html

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testing/test_package_docs/ex/Deprecated/hashCode.html

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testing/test_package_docs/ex/Deprecated/message.html

Lines changed: 98 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testing/test_package_docs/ex/Deprecated/noSuchMethod.html

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testing/test_package_docs/ex/Deprecated/operator_equals.html

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testing/test_package_docs/ex/Deprecated/runtimeType.html

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)