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 0faff27f7977cbabc80e997fa9a92e635bce255d..f5c554cae78a8cd7bb694e83b7428b6e7015640f 100644 |
--- a/pkg/analyzer/lib/src/context/context.dart |
+++ b/pkg/analyzer/lib/src/context/context.dart |
@@ -300,7 +300,7 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
this._options.enableStrictCallChecks != |
options.enableStrictCallChecks || |
this._options.enableSuperMixins != options.enableSuperMixins || |
- this._options.patchPlatform != options.patchPlatform; |
+ !_samePatchPaths(this._options.patchPaths, options.patchPaths); |
this._options.analyzeFunctionBodiesPredicate = |
options.analyzeFunctionBodiesPredicate; |
this._options.generateImplicitErrors = options.generateImplicitErrors; |
@@ -328,7 +328,7 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
this._options.trackCacheDependencies = options.trackCacheDependencies; |
this._options.disableCacheFlushing = options.disableCacheFlushing; |
this._options.finerGrainedInvalidation = options.finerGrainedInvalidation; |
- this._options.patchPlatform = options.patchPlatform; |
+ this._options.patchPaths = options.patchPaths; |
if (options is AnalysisOptionsImpl) { |
this._options.strongModeHints = options.strongModeHints; |
this._options.implicitCasts = options.implicitCasts; |
@@ -1966,6 +1966,21 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
return true; |
}); |
} |
+ |
+ static bool _samePatchPaths( |
+ Map<String, List<String>> a, Map<String, List<String>> b) { |
+ if (a.length != b.length) return false; |
+ for (var key in a.keys) { |
+ if (!b.containsKey(key)) return false; |
+ var aValue = a[key]; |
+ var bValue = b[key]; |
+ if (aValue.length != bValue.length) return false; |
+ for (var i = 0; i < aValue.length; i++) { |
+ if (aValue[i] != bValue[i]) return false; |
+ } |
+ } |
+ return true; |
+ } |
} |
/** |