5926753a2f
Big thanks to @jridgewell for helping me out with a number of Rust-isms with this change. This expands `handle_issues` and the `NextDevServerBuilder` to accept an arbitrary `IssueReporter` -- a trait implementing `report_issues` which receives captured issues to send somewhere. This replaces using a fixed `ConsoleUi` to send issues to stdout/stderr, though `ConsoleUi` now implements `IssueReporter` and is the default implementation of an issue reporter if no other is provided. It also moves the responsibility of detecting fatal errors out of `ConsoleUi` and into `handle_issues` itself. This lays the foundation for alternative reporters, such as a test reporter to snapshot or assert against issues emitted, or a newline-delimited JSON reporter for other tools to consume. Co-authored-by: Justin Ridgewell <justin@ridgewell.name> --------- Co-authored-by: Justin Ridgewell <justin@ridgewell.name> |
||
---|---|---|
.. | ||
crates |