Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: pkg/analyzer_cli/lib/src/build_mode.dart

Issue 1826353002: Add a fallback mode for building summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/summary/in_summary_source_test.dart ('k') | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/build_mode.dart
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index 0c20851589ee8c43d5becac6fd2fab4e8a82428c..42c3dc1c6e430158ea4a794391d3bf2bf58aa39a 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -86,11 +86,17 @@ class BuildMode {
if (options.buildSummaryOutput != null) {
PackageBundleAssembler assembler = new PackageBundleAssembler();
for (Source source in explicitSources) {
- if (context.computeKindOf(source) != SourceKind.LIBRARY) {
- continue;
+ if (context.computeKindOf(source) == SourceKind.LIBRARY) {
+ if (options.buildSummaryFallback) {
+ assembler.addFallbackLibrary(source);
+ } else {
+ LibraryElement libraryElement = context.computeLibraryElement(source);
+ assembler.serializeLibraryElement(libraryElement);
+ }
+ }
+ if (options.buildSummaryFallback) {
+ assembler.addFallbackUnit(source);
}
- LibraryElement libraryElement = context.computeLibraryElement(source);
- assembler.serializeLibraryElement(libraryElement);
}
// Write the whole package bundle.
PackageBundleBuilder sdkBundle = assembler.assemble();
« no previous file with comments | « pkg/analyzer/test/src/summary/in_summary_source_test.dart ('k') | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698