-
Notifications
You must be signed in to change notification settings - Fork 110
Less verbose error for analysis error #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6ee7e7f
03351cc
b3a7442
326e90e
0874ef0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| import 'dart:async'; | ||
|
|
||
| import 'package:analyzer/dart/element/element.dart'; | ||
| import 'package:analyzer/exception/exception.dart'; | ||
| import 'package:build/build.dart'; | ||
| import 'package:dart_style/src/dart_formatter.dart'; | ||
|
|
||
|
|
@@ -98,7 +99,11 @@ class GeneratorBuilder extends Builder { | |
|
|
||
| Stream<GeneratedOutput> _generate(LibraryElement unit, | ||
| List<Generator> generators, BuildStep buildStep) async* { | ||
| for (var element in getElementsFromLibraryElement(unit)) { | ||
| var elements = safeIterate(getElementsFromLibraryElement(unit), (e, [_]) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like in general we could just handle this inside of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could. It would introduce a My preference would be this layout, WDYT? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am OK with it as is, that would be somewhat annoying for sure. |
||
| log.fine('Resolve error details:\n$e'); | ||
| log.severe('Failed to resolve ${buildStep.inputId}.'); | ||
| }); | ||
| for (var element in elements) { | ||
| yield* _processUnitMember(element, generators, buildStep); | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, this would just blow up.
Now it'll succeed, but log errors, right? Or are we treating
severelogs as fatal?Just trying to understand...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
severelogs are fatal in bazel and build_barback.They are tolerated in build_runner but we want to change that: dart-lang/build#215