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

Unified Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 2380573006: ContextBuilder can configure contexts to use summaries (Closed)
Patch Set: Created 4 years, 3 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/lib/src/context/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index d53d90b26d71a386e0b1b64ecb9b2f197f06e177..b865b8e09c8b891a384a5e70ee9a63c8e1a6c694 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -1603,21 +1603,6 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
ContextBuilder builder = createContextBuilder(folder, options);
AnalysisContext context = builder.buildContext(folder.path);
- // TODO(brianwilkerson) Move bundle discovery into ContextBuilder
- if (analysisServer.options.enablePubSummaryManager) {
- List<LinkedPubPackage> linkedBundles =
- analysisServer.pubSummaryManager.getLinkedBundles(context);
- if (linkedBundles.isNotEmpty) {
- SummaryDataStore store = new SummaryDataStore([]);
- for (LinkedPubPackage package in linkedBundles) {
- store.addBundle(null, package.unlinked);
- store.addBundle(null, package.linked);
- }
- (context as InternalAnalysisContext).resultProvider =
- new InputPackagesResultProvider(context, store);
- }
- }
-
analysisServer.folderMap[folder] = context;
analysisServer._onContextsChangedController
.add(new ContextsChangedEvent(added: [context]));
@@ -1668,6 +1653,9 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
builder.packageResolverProvider = analysisServer.packageResolverProvider;
builder.defaultPackageFilePath = defaultPackageFilePath;
builder.defaultPackagesDirectoryPath = defaultPackagesDirectoryPath;
+ if (analysisServer.options.enablePubSummaryManager) {
+ builder.pubSummaryManager = analysisServer.pubSummaryManager;
+ }
return builder;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698