wybe icon indicating copy to clipboard operation
wybe copied to clipboard

Idea: display error messages inline next to source-code.

Open neon64 opened this issue 3 years ago • 1 comments

I was thinking a little bit about ways to make Wybe easier to learn, and one thing that I have really appreciated using e.g.: Rust is really helpful/aesthetic error messages. I came across this library for Haskell:

https://github.com/mesabloo/diagnose (which is in turn inspired by https://github.com/zesterer/ariadne)

which produces diagnostics like this:

image

Do you think this might be something worth integrating? If so, I'd be happy/keen to sketch a proof of concept.

neon64 avatar Jul 09 '22 13:07 neon64

Wow, that looks awesome! Yes, I'd love to see error messages like that, but I think it would be a lot of work. I also think these messages are probably a bit too verbose for all the time. Maybe employ a heuristic that gives all that detail for the first n errors and then give more succinct messages (or just "... and 117 more errors; use -e switch to see all errors").

pschachte avatar Jul 09 '22 14:07 pschachte