Skip to content

Examples command throws exception when pub serve encounters dart2js warning #52

@bencampbell-wf

Description

@bencampbell-wf

The dart_dev executable throws an exception when it encounters a dart2js warning when serving a non-dartium client. This exception causes the dart_dev process to exit leaving the child pub serve process running.

    [example] GET ....
    [Info from Dart2JS]:
    Compiling <omitted_path>/main.dart...
Unhandled exception:
Uncaught Error: [Dart2JS on <omitted_path>/main.dart]:
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:895)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:43)
#2      _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#3      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)

This seems to be an issue when a child process of dart_dev emits output to stderr.

Steps to Reproduce

  • run pub run dart_dev examples with an example that includes code that throws a warning or hint in the dart2js compiler.
  • serve a dartium client to confirm and confirm no error
  • serve a non-dartium(chrome) client and confirm it throws an exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions