Fancy error reporting with miette

  Рет қаралды 5,580

chris biscardi

chris biscardi

Күн бұрын

Пікірлер: 11
@felixst-gelais6722
@felixst-gelais6722 2 жыл бұрын
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
@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 ;-)
@whoisryosuke
@whoisryosuke 2 жыл бұрын
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... 🤔
@chrisbiscardi
@chrisbiscardi 2 жыл бұрын
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.
@azzamsya
@azzamsya 2 жыл бұрын
Thank you so much for this tutorial!
@Yotanido
@Yotanido 2 жыл бұрын
For fancy parse errors, Ariadne is also very nice
@chrisbiscardi
@chrisbiscardi 2 жыл бұрын
ariadne is listed as inspiration in miette's readme too!
@katopz
@katopz 2 жыл бұрын
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. 🤔
@iippari7
@iippari7 2 жыл бұрын
Did you remember to enable the `fancy` feature? I've never used miette, but that sounds like it could be what's going wrong.
@underhilloverhill
@underhilloverhill 2 жыл бұрын
could be the terminal/font config
@magnusmarkling
@magnusmarkling 2 жыл бұрын
I get the smooth underline when running a simple example (with "fancy" enabled) in both Terminal and iTerm2 apps on MacOS. Nothing else required.
Can we have Redux in Rust? (Yewdux)
15:56
chris biscardi
Рет қаралды 6 М.
Heap profiling Rust programs with DHAT
16:37
chris biscardi
Рет қаралды 10 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Why do we need macros in Rust?
12:21
chris biscardi
Рет қаралды 8 М.
Rust's Most Important Containers 📦 10 Useful Patterns
17:11
Code to the Moon
Рет қаралды 130 М.
How to make a triple A game in Rust Bevy? Part 1.
10:29
altpotato
Рет қаралды 519
Rust Tests Itself (kind of!)
11:41
No Boilerplate
Рет қаралды 78 М.
Rust Powered Database SurrealDB (It's Pretty Ambitious)
11:28
Code to the Moon
Рет қаралды 111 М.
Ace Rust Macros ♠️ the declarative kind
14:06
Code to the Moon
Рет қаралды 41 М.
His Wife Threw his Gaming PC out the Window… Can I Fix It?
19:43
Linus Tech Tips
Рет қаралды 1 МЛН
Rust - Simple Code Layout (start simple, scale better)
6:14
Jeremy Chone
Рет қаралды 59 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН