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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 2652823002: Use single InputPackagesResultProvider, without SdkSummaryResultProvider. (Closed)
Patch Set: Fixes for analyzer_cli. Created 3 years, 11 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
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 52a64b7fc47df3d2b1a8b85632b4658ff2c80400..5c20e0bf5d3c36f14502cf2fda5d90e79c48979d 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -204,6 +204,15 @@ class AnalysisContextImpl implements InternalAnalysisContext {
*/
List<AnalysisListener> _listeners = new List<AnalysisListener>();
+ /**
+ * Determines whether this context should attempt to make use of the global
+ * SDK cache partition. Note that if this context is responsible for
+ * resynthesizing the SDK element model, this flag should be set to `false`,
+ * so that resynthesized elements belonging to this context won't leak into
+ * the global SDK cache partition.
+ */
+ bool useSdkCachePartition = true;
+
@override
ResultProvider resultProvider;
@@ -739,6 +748,9 @@ class AnalysisContextImpl implements InternalAnalysisContext {
if (factory == null) {
return new AnalysisCache(<CachePartition>[_privatePartition]);
}
+ if (!useSdkCachePartition) {
+ return new AnalysisCache(<CachePartition>[_privatePartition]);
+ }
DartSdk sdk = factory.dartSdk;
if (sdk == null) {
return new AnalysisCache(<CachePartition>[_privatePartition]);

Powered by Google App Engine
This is Rietveld 408576698