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

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

Issue 1134873003: Move getErrors() to DartWorkManager, report errors in ChangeNotice(s). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 0e16454f22c4e3e854fe84acb312ee6da7c662ff..dc01ee1ea0c098b167d311f42521d1b450e68497 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -746,27 +746,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
AnalysisErrorInfo getErrors(Source source) {
- // TODO(brianwilkerson) Figure out how to implement this cleanly. The
- // problem is that _getResult doesn't know to go into the individual inputs
- // for the task to get their values for tasks that are just merging other
- // result values. Therefore, if some, but not all, of the error lists have
- // been computed, no errors will be returned by it.
- List<List<AnalysisError>> errorLists = <List<AnalysisError>>[];
- errorLists.add(_cache.getValue(source, BUILD_DIRECTIVES_ERRORS));
- errorLists.add(_cache.getValue(source, BUILD_LIBRARY_ERRORS));
- errorLists.add(_cache.getValue(source, PARSE_ERRORS));
- errorLists.add(_cache.getValue(source, SCAN_ERRORS));
- for (Source library in getLibrariesContaining(source)) {
- LibrarySpecificUnit unit = new LibrarySpecificUnit(library, source);
- errorLists.add(_cache.getValue(unit, BUILD_FUNCTION_TYPE_ALIASES_ERRORS));
- errorLists.add(_cache.getValue(unit, HINTS));
- errorLists.add(_cache.getValue(unit, RESOLVE_REFERENCES_ERRORS));
- errorLists.add(_cache.getValue(unit, RESOLVE_TYPE_NAMES_ERRORS));
- errorLists.add(_cache.getValue(unit, VERIFY_ERRORS));
- }
- LineInfo lineInfo = _cache.getValue(source, LINE_INFO);
- return new AnalysisErrorInfoImpl(
- AnalysisError.mergeLists(errorLists), lineInfo);
+ return dartWorkManager.getErrors(source);
}
@override
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/dart_work_manager.dart » ('j') | pkg/analyzer/lib/src/task/dart_work_manager.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698