Index: pkg/analyzer/lib/src/task/dart.dart |
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart |
index fb3c3c1f637b5cde0251cc07cedc08934baa362a..aa910b20e2ef1f130a78e96ece9ecb0b044ef503 100644 |
--- a/pkg/analyzer/lib/src/task/dart.dart |
+++ b/pkg/analyzer/lib/src/task/dart.dart |
@@ -537,7 +537,7 @@ class BuildCompilationUnitElementTask extends SourceBasedAnalysisTask { |
// |
// Build or reuse CompilationUnitElement. |
// |
- unit = AstCloner.clone(unit); |
+// unit = AstCloner.clone(unit); |
AnalysisCache analysisCache = |
(context as InternalAnalysisContext).analysisCache; |
CompilationUnitElement element = |
@@ -573,7 +573,7 @@ class BuildCompilationUnitElementTask extends SourceBasedAnalysisTask { |
static Map<String, TaskInput> buildInputs(AnalysisTarget target) { |
LibrarySpecificUnit unit = target; |
return <String, TaskInput>{ |
- PARSED_UNIT_INPUT_NAME: PARSED_UNIT.of(unit.unit) |
+ PARSED_UNIT_INPUT_NAME: PARSED_UNIT.of(unit.unit, flushOnAccess: true) |
}; |
} |
@@ -4111,6 +4111,9 @@ class _SourceClosureTaskInputBuilder implements TaskInputBuilder<List<Source>> { |
} |
@override |
+ bool get flushOnAccess => false; |
+ |
+ @override |
List<Source> get inputValue { |
return _libraries.map((LibraryElement library) => library.source).toList(); |
} |