foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.24k stars 1.73k forks source link

Feature: Diagnostic Report Handler TUI #1694

Open sambacha opened 2 years ago

sambacha commented 2 years ago

Component

Forge, Cast, Anvil

Describe the feature you would like

Diagnostic Report Handler for Foundry's TUI

Integrate a new terminal/shell interface crate to improve readability and UI/UX

Basically, integrate miette as the presentation interface for displaying error outputs / diagnostic messages from forge tests (and possibly enrich compiler messages to fit the format?)

The miette crate also comes bundled with a default ReportHandler

Example Error Handling Display


A great example would be providing a diagnostic code URL for the corresponding 4 byte signature of a function. This would basically build on this suggested proposed feature: https://github.com/foundry-rs/foundry/issues/1672

Mockup

Not Foundry I know

Diagnostic Code URL

Informative Resources

Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators

miette GitHub repo

miette at docs.rs

Additional context

No response

sambacha commented 2 years ago

This could also be useful for this issue as well: https://github.com/foundry-rs/foundry/issues/1795

sambacha commented 1 year ago

This TUI should actually instead use highlighting as opposed to strictly using symbols for pointing so that it can be independent of terminals screen size

zerosnacks commented 2 months ago

Related: https://github.com/foundry-rs/foundry/issues/928