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

Unified Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 1141953002: Always send errors/lines with parsed/resolved units. (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/test/src/task/dart_work_manager_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart_work_manager.dart
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index 30cd4d098aa0c688754898e0d9933c0ff0895bc8..66f73924fecb83ce530fc67f74e54ad81708670d 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -228,28 +228,34 @@ class DartWorkManager implements WorkManager {
}
// Update notice.
if (_isDartSource(target)) {
- bool hasErrorResult = false;
+ bool shouldSetErrors = false;
outputs.forEach((ResultDescriptor descriptor, value) {
if (descriptor == PARSED_UNIT && value != null) {
context.getNotice(target).parsedDartUnit = value;
+ shouldSetErrors = true;
+ }
+ if (_isErrorResult(descriptor)) {
+ shouldSetErrors = true;
}
- hasErrorResult = hasErrorResult || _isErrorResult(descriptor);
});
- if (hasErrorResult) {
+ if (shouldSetErrors) {
AnalysisErrorInfo info = getErrors(target);
context.getNotice(target).setErrors(info.errors, info.lineInfo);
}
}
if (target is LibrarySpecificUnit) {
Source source = target.source;
- bool hasErrorResult = false;
+ bool shouldSetErrors = false;
outputs.forEach((ResultDescriptor descriptor, value) {
if (descriptor == RESOLVED_UNIT && value != null) {
context.getNotice(source).resolvedDartUnit = value;
+ shouldSetErrors = true;
+ }
+ if (_isErrorResult(descriptor)) {
+ shouldSetErrors = true;
}
- hasErrorResult = hasErrorResult || _isErrorResult(descriptor);
});
- if (hasErrorResult) {
+ if (shouldSetErrors) {
AnalysisErrorInfo info = getErrors(source);
context.getNotice(source).setErrors(info.errors, info.lineInfo);
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_work_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698