zesterer / ariadne

A fancy diagnostics & error reporting crate
https://crates.io/crates/ariadne
MIT License
1.61k stars 72 forks source link

Support for above-code labels #9

Open jjl opened 2 years ago

jjl commented 2 years ago

I have been thinking about how to make nice errors for using builtins in the lisp for my in-progress build tool, dull. At first i copied the structure of the example output image (in wonderfully shit ascii art lol), but it occurred to me that it would be nice to put the reasons above so that they read in order.

ParameterError

 +-[great.dull:1:16]
  |            +- After this scoop indicator
  |            | +- and this scoop parameter
  |            | | +- There should be no more arguments
  |            _ _ _
1 | (defn foo [& _ _])

How does this fit into your plans for layout?

zesterer commented 2 years ago

Oh, that's an interesting idea for sure! I didn't consider that. I think I'll add this to my todo list for the refactor of Ariadne I'm planning to do soon.

Lokathor commented 1 year ago

I looked at the screenshot and wanted this after like 5 seconds, another vote for it.