Skip to content
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

Clean up stack traces on build() failure #427

Closed
matanlurey opened this issue Sep 13, 2017 · 1 comment
Closed

Clean up stack traces on build() failure #427

matanlurey opened this issue Sep 13, 2017 · 1 comment
Assignees

Comments

@matanlurey
Copy link
Contributor

Here is a stack trace for when the output fails dartfmt:

[INFO] Build: Running build...
[SEVERE] runBuilder: Error formatting generated source code for 112din/lib/src/schema/structures/channel.dartwhich was output to lib/src/schema/structures/channel.g.dart.
This may indicate an issue in the generated code or in the formatter.
Please check the generated code and file an issue on source_gen if appropriate.
Could not format because the source could not be parsed:

line 8, column 37: A non-redirecting 'factory' constructor must have a body.
class _$Channel implements Channel {factory _$Channel.fromJson(Map<String,Object> json);_$Channel(build);@override dynamic noSuchMethod(i) => super.noSuchMethod(i); }class _$ChannelBuilder { }
                                    ^^^^^^^
#0      ErrorListener.throwIfErrors (package:dart_style/src/error_listener.dart:23:5)
#1      DartFormatter.formatSource (package:dart_style/src/dart_formatter.dart:128:19)
#2      DartFormatter.format (package:dart_style/src/dart_formatter.dart:65:12)
#3      _Builder._generateForLibrary (package:source_gen/src/builder.dart:127:36)
<asynchronous suspension>
#4      _Builder.build (package:source_gen/src/builder.dart:69:11)
<asynchronous suspension>
#5      runBuilder.buildForInput (package:build/src/generate/run_builder.dart:43:21)
<asynchronous suspension>
#6      MappedListIterable.elementAt (dart:_internal/iterable.dart:413)
#7      ListIterator.moveNext (dart:_internal/iterable.dart:342)
#8      Future.wait (dart:async/future.dart:355)
#9      runBuilder.<anonymous closure> (package:build/src/generate/run_builder.dart:49:31)
#10     _rootRun (dart:async/zone.dart:1120)
#11     _CustomZone.run (dart:async/zone.dart:1001)
#12     runZoned (dart:async/zone.dart:1467)
#13     scopeLog (package:build/src/builder/logging.dart:12:38)
#14     runBuilder (package:build/src/generate/run_builder.dart:49:9)
<asynchronous suspension>
#15     BuildImpl._runBuilder (package:build_runner/src/generate/build_impl.dart:229:13)
<asynchronous suspension>
#16     BuildImpl._runPhases (package:build_runner/src/generate/build_impl.dart:181:14)
<asynchronous suspension>
#17     logWithTime (package:build_runner/src/logging/logging.dart:19:28)
<asynchronous suspension>
#18     BuildImpl._safeBuild.<anonymous closure> (package:build_runner/src/generate/build_impl.dart:102:26)
<asynchronous suspension>
#19     Chain.capture.<anonymous closure> (package:stack_trace/src/chain.dart:93:24)
#20     _rootRun (dart:async/zone.dart:1120)
#21     _CustomZone.run (dart:async/zone.dart:1001)
#22     runZoned (dart:async/zone.dart:1467)
#23     Chain.capture (package:stack_trace/src/chain.dart:91:12)
#24     BuildImpl._safeBuild (package:build_runner/src/generate/build_impl.dart:100:11)
#25     BuildImpl.run (package:build_runner/src/generate/build_impl.dart:75:24)
<asynchronous suspension>
#26     BuildImpl.create (package:build_runner/src/generate/build_impl.dart:68:37)
<asynchronous suspension>
#27     singleBuild (package:build_runner/src/generate/build_impl.dart:33:27)
<asynchronous suspension>
#28     build (package:build_runner/src/generate/build.dart:63:22)
<asynchronous suspension>
#29     main (file:///Users/matan/git/din/tool/generators/api.dart:18:9)
<asynchronous suspension>
#30     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#31     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

We should probably be using .terse to clean this up, potentially also removing pkg/build.

@matanlurey
Copy link
Contributor Author

Matan is going to take a shot here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant