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

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

Issue 1130763003: Get computeError working (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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error.dart » ('j') | pkg/analyzer/lib/src/generated/error.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bb0cd6a7da3b1e0e413ed946cdfc40fb6804b6af..61856778d4e9b5aca11f26f6dd9ca7aa66675ecf 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -762,9 +762,27 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
AnalysisErrorInfo getErrors(Source source) {
- List<AnalysisError> errors = _getResult(source, DART_ERRORS);
+ // 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(_getResult(source, BUILD_DIRECTIVES_ERRORS));
+ errorLists.add(_getResult(source, BUILD_LIBRARY_ERRORS));
+ errorLists.add(_getResult(source, PARSE_ERRORS));
+ errorLists.add(_getResult(source, SCAN_ERRORS));
+ for (Source library in getLibrariesContaining(source)) {
+ LibrarySpecificUnit unit = new LibrarySpecificUnit(library, source);
+ errorLists.add(_getResult(unit, BUILD_FUNCTION_TYPE_ALIASES_ERRORS));
+ errorLists.add(_getResult(unit, HINTS));
+ errorLists.add(_getResult(unit, RESOLVE_REFERENCES_ERRORS));
+ errorLists.add(_getResult(unit, RESOLVE_TYPE_NAMES_ERRORS));
+ errorLists.add(_getResult(unit, VERIFY_ERRORS));
+ }
LineInfo lineInfo = _getResult(source, LINE_INFO);
- return new AnalysisErrorInfoImpl(errors, lineInfo);
+ return new AnalysisErrorInfoImpl(
+ AnalysisError.mergeLists(errorLists), lineInfo);
}
@override
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error.dart » ('j') | pkg/analyzer/lib/src/generated/error.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698