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

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

Issue 2232403002: Use existing unlinked bundles even for packages outside of the pub cache. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | pkg/analyzer/test/src/summary/pub_summary_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/pub_summary.dart
diff --git a/pkg/analyzer/lib/src/summary/pub_summary.dart b/pkg/analyzer/lib/src/summary/pub_summary.dart
index f3574a27cdb026a70bc6798c0ea9d936beee3b01..399e3f81a0533c53bb1c407e407f69839d79b9ac 100644
--- a/pkg/analyzer/lib/src/summary/pub_summary.dart
+++ b/pkg/analyzer/lib/src/summary/pub_summary.dart
@@ -295,14 +295,11 @@ class PubSummaryManager {
packageMap.forEach((String packageName, List<Folder> libFolders) {
if (libFolders.length == 1) {
Folder libFolder = libFolders.first;
- // TODO(scheglov) handle Flutter packages, outside of the pub cache.
- if (isPathInPubCache(pathContext, libFolder.path)) {
- PubPackage package = new PubPackage(packageName, libFolder);
- PackageBundle unlinkedBundle =
- _getUnlinkedOrSchedule(package, strong);
- if (unlinkedBundle != null) {
- unlinkedBundles[package] = unlinkedBundle;
- }
+ PubPackage package = new PubPackage(packageName, libFolder);
+ PackageBundle unlinkedBundle =
+ _getUnlinkedOrSchedule(package, strong);
+ if (unlinkedBundle != null) {
+ unlinkedBundles[package] = unlinkedBundle;
}
}
});
@@ -426,12 +423,14 @@ class PubSummaryManager {
// Ignore file system exceptions.
}
}
- // Schedule computation in the background.
- if (package != null && seenPackages.add(package)) {
- if (packagesToComputeUnlinked.isEmpty) {
- _scheduleNextUnlinked();
+ // Schedule computation in the background, if in the pub cache.
+ if (isPathInPubCache(pathContext, package.folder.path)) {
+ if (seenPackages.add(package)) {
+ if (packagesToComputeUnlinked.isEmpty) {
+ _scheduleNextUnlinked();
+ }
+ packagesToComputeUnlinked.add(package);
}
- packagesToComputeUnlinked.add(package);
}
// The bundle is for available.
return null;
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/pub_summary_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698