Index: pkg/analyzer_cli/lib/src/package_analyzer.dart |
diff --git a/pkg/analyzer_cli/lib/src/package_analyzer.dart b/pkg/analyzer_cli/lib/src/package_analyzer.dart |
index 14eebd0bb7599b78c13cc670acdc226d062d219e..418db256480b64919ab045f12693df39457f9286 100644 |
--- a/pkg/analyzer_cli/lib/src/package_analyzer.dart |
+++ b/pkg/analyzer_cli/lib/src/package_analyzer.dart |
@@ -94,12 +94,13 @@ class PackageAnalyzer { |
// Write summary for Dart libraries. |
if (options.packageSummaryOutput != null) { |
PackageBundleAssembler assembler = new PackageBundleAssembler(); |
- for (Source source in context.librarySources) { |
+ for (Source source in explicitSources) { |
+ if (context.computeKindOf(source) != SourceKind.LIBRARY) { |
+ continue; |
+ } |
if (pathos.isWithin(packageLibPath, source.fullName)) { |
LibraryElement libraryElement = context.computeLibraryElement(source); |
- if (libraryElement != null) { |
- assembler.serializeLibraryElement(libraryElement); |
- } |
+ assembler.serializeLibraryElement(libraryElement); |
} |
} |
// Write the whole package bundle. |