fun fact: "miette" means "crumb" in french! so the lib is comparing error reporting with "following bread crumbs", which i think is pretty neat
@Siniverisyys Жыл бұрын
I felt like that I didn't have the time or energy to take on miette's fancy error handling, but you explained it so well it seems pretty easy now. Really looking forward to the `wrap_err` feature too. Probably not just helpful to the user - helpful to the developer too ;-)
@whoisryosuke2 жыл бұрын
Great way to add structured error output to a project. I like how clean everything looks implemented. Maybe a little confusing with miette using `Result`? Maybe `MResult` might be better for them to avoid confusion... 🤔
@chrisbiscardi2 жыл бұрын
type aliasing Result to specialize it to the type in the library crate it's being used in is a fairly common approach. serde_json has a Result, reqwest has one too, and even the standard library uses on in std::io::Result. You can always swap `use miette::Result` instead with a miette::Result in the type signature to be more clear if you want to.
@azzamsya2 жыл бұрын
Thank you so much for this tutorial!
@Yotanido2 жыл бұрын
For fancy parse errors, Ariadne is also very nice
@chrisbiscardi2 жыл бұрын
ariadne is listed as inspiration in miette's readme too!
@katopz2 жыл бұрын
How can I have smooth line pointer and underline error print out like that? All I have here is an ascii ^^^^^^^^^^^^^^^^^^^^^^^ like this when error. 🤔
@iippari72 жыл бұрын
Did you remember to enable the `fancy` feature? I've never used miette, but that sounds like it could be what's going wrong.
@underhilloverhill2 жыл бұрын
could be the terminal/font config
@magnusmarkling2 жыл бұрын
I get the smooth underline when running a simple example (with "fancy" enabled) in both Terminal and iTerm2 apps on MacOS. Nothing else required.