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

Unified Diff: pkg/analyzer/lib/src/summary/package_bundle_reader.dart

Issue 2538503002: Remove support for summary "fallback mode" from analyzer. (Closed)
Patch Set: Created 4 years, 1 month 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/lib/src/summary/idl.dart ('k') | pkg/analyzer/test/src/summary/in_summary_source_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/package_bundle_reader.dart
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index 23645da1d89ae9620ec7da0ab37b2d135aaa4d67..d1787973b9ffff34c2d4e522d98ad30c47792a7e 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -6,12 +6,10 @@ import 'package:analyzer/src/context/cache.dart';
import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/dart/element/element.dart';
import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/java_io.dart';
import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:analyzer/src/source/source_resource.dart';
import 'package:analyzer/src/summary/format.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:analyzer/src/summary/resynthesize.dart';
@@ -57,12 +55,7 @@ class InSummaryPackageUriResolver extends UriResolver {
UnlinkedUnit unit = _dataStore.unlinkedMap[uriString];
if (unit != null) {
String summaryPath = _dataStore.uriToSummaryPath[uriString];
- if (unit.fallbackModePath.isNotEmpty) {
- return new _InSummaryFallbackSource(
- new JavaFile(unit.fallbackModePath), actualUri, summaryPath);
- } else {
- return new InSummarySource(actualUri, summaryPath);
- }
+ return new InSummarySource(actualUri, summaryPath);
}
return null;
}
@@ -134,14 +127,7 @@ class InSummaryUriResolver extends UriResolver {
UnlinkedUnit unit = _dataStore.unlinkedMap[uriString];
if (unit != null) {
String summaryPath = _dataStore.uriToSummaryPath[uriString];
- if (unit.fallbackModePath.isNotEmpty) {
- return new _InSummaryFallbackFileSource(
- resourceProvider.getFile(unit.fallbackModePath),
- actualUri,
- summaryPath);
- } else {
- return new InSummarySource(actualUri, summaryPath);
- }
+ return new InSummarySource(actualUri, summaryPath);
}
return null;
}
@@ -472,35 +458,6 @@ class _FileBasedSummaryResynthesizer extends SummaryResynthesizer {
@override
bool hasLibrarySummary(String uri) {
LinkedLibrary linkedLibrary = _dataStore.linkedMap[uri];
- return linkedLibrary != null && !linkedLibrary.fallbackMode;
+ return linkedLibrary != null;
}
}
-
-/**
- * A source that is part of a package whose summary was generated in fallback
- * mode. This source behaves identically to a [FileSource] except that it also
- * provides [summaryPath].
- */
-class _InSummaryFallbackFileSource extends FileSource
- implements InSummarySource {
- @override
- final String summaryPath;
-
- _InSummaryFallbackFileSource(File file, Uri uri, this.summaryPath)
- : super(file, uri);
-}
-
-/**
- * A source that is part of a package whose summary was generated in fallback
- * mode. This source behaves identically to a [FileBasedSource] except that it
- * also provides [summaryPath].
- */
-@deprecated
-class _InSummaryFallbackSource extends FileBasedSource
- implements InSummarySource {
- @override
- final String summaryPath;
-
- _InSummaryFallbackSource(JavaFile file, Uri uri, this.summaryPath)
- : super(file, uri);
-}
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/test/src/summary/in_summary_source_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698