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

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

Issue 2231413003: Link packages with an SDK extension. (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 4bc6ce3ae2957cd88bef08bcc00485dc59c17dad..f3574a27cdb026a70bc6798c0ea9d936beee3b01 100644
--- a/pkg/analyzer/lib/src/summary/pub_summary.dart
+++ b/pkg/analyzer/lib/src/summary/pub_summary.dart
@@ -243,9 +243,15 @@ class PubSummaryManager {
packageToNode[package.name] = node;
});
- // Fill the store with unlinked bundles.
+ // Fill the store with the linked SDK and unlinked package bundles.
SummaryDataStore store = new SummaryDataStore(const <String>[]);
store.addBundle(null, sdkBundle);
+ {
+ PackageBundle extension = computeSdkExtension(context, sdkBundle);
+ if (extension != null) {
+ store.addBundle(null, extension);
+ }
+ }
for (PackageBundle unlinked in unlinkedBundles.values) {
store.addBundle(null, unlinked);
}
@@ -529,7 +535,8 @@ class _LinkedNode extends Node<_LinkedNode> {
if (!uri.hasScheme) {
// A relative path in this package, skip it.
} else if (uri.scheme == 'dart') {
- // TODO(scheglov) link _sdkext bundles.
+ // Dependency on the SDK is implicit and always added.
+ // The SDK linked bundle is precomputed before linking packages.
Paul Berry 2016/08/11 20:47:17 (As discussed in person) I think we still need to
} else if (uriStr.startsWith('package:')) {
String package = PubSummaryManager.getPackageName(uriStr);
_LinkedNode packageNode = packageToNode[package];
« 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