Use non-fancy miette hook
Browse files at this commit3f8788e4ed9c9ee3afa8fffde04a696f627d0f72Parent: 56cffa13 changed files +3 -149
- Cargo.lock +0 -147
- Cargo.toml +1 -1
- src/main.rs +2 -1
Cargo.lockmodified+0 -147
| @@ -2,15 +2,6 @@ | ||
| 2 | 2 | # It is not intended for manual editing. |
| 3 | 3 | version = 3 |
| 4 | 4 | |
| 5 | -[[package]] | |
| 6 | -name = "addr2line" | |
| 7 | -version = "0.21.0" | |
| 8 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 9 | -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" | |
| 10 | -dependencies = [ | |
| 11 | - "gimli", | |
| 12 | -] | |
| 13 | - | |
| 14 | 5 | [[package]] |
| 15 | 6 | name = "adler" |
| 16 | 7 | version = "1.0.2" |
| @@ -282,30 +273,6 @@ version = "1.1.0" | ||
| 282 | 273 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 283 | 274 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" |
| 284 | 275 | |
| 285 | -[[package]] | |
| 286 | -name = "backtrace" | |
| 287 | -version = "0.3.69" | |
| 288 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 289 | -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" | |
| 290 | -dependencies = [ | |
| 291 | - "addr2line", | |
| 292 | - "cc", | |
| 293 | - "cfg-if", | |
| 294 | - "libc", | |
| 295 | - "miniz_oxide", | |
| 296 | - "object", | |
| 297 | - "rustc-demangle", | |
| 298 | -] | |
| 299 | - | |
| 300 | -[[package]] | |
| 301 | -name = "backtrace-ext" | |
| 302 | -version = "0.2.1" | |
| 303 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 304 | -checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" | |
| 305 | -dependencies = [ | |
| 306 | - "backtrace", | |
| 307 | -] | |
| 308 | - | |
| 309 | 276 | [[package]] |
| 310 | 277 | name = "base64" |
| 311 | 278 | version = "0.21.4" |
| @@ -1030,12 +997,6 @@ dependencies = [ | ||
| 1030 | 997 | "wasi", |
| 1031 | 998 | ] |
| 1032 | 999 | |
| 1033 | -[[package]] | |
| 1034 | -name = "gimli" | |
| 1035 | -version = "0.28.0" | |
| 1036 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1037 | -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" | |
| 1038 | - | |
| 1039 | 1000 | [[package]] |
| 1040 | 1001 | name = "gl_generator" |
| 1041 | 1002 | version = "0.14.0" |
| @@ -1164,23 +1125,6 @@ version = "2.0.2" | ||
| 1164 | 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 1165 | 1126 | checksum = "bffb4def18c48926ccac55c1223e02865ce1a821751a95920448662696e7472c" |
| 1166 | 1127 | |
| 1167 | -[[package]] | |
| 1168 | -name = "is-terminal" | |
| 1169 | -version = "0.4.9" | |
| 1170 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1171 | -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" | |
| 1172 | -dependencies = [ | |
| 1173 | - "hermit-abi", | |
| 1174 | - "rustix 0.38.15", | |
| 1175 | - "windows-sys 0.48.0", | |
| 1176 | -] | |
| 1177 | - | |
| 1178 | -[[package]] | |
| 1179 | -name = "is_ci" | |
| 1180 | -version = "1.1.1" | |
| 1181 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1182 | -checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" | |
| 1183 | - | |
| 1184 | 1128 | [[package]] |
| 1185 | 1129 | name = "itoa" |
| 1186 | 1130 | version = "1.0.9" |
| @@ -1462,17 +1406,8 @@ version = "5.10.0" | ||
| 1462 | 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 1463 | 1407 | checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" |
| 1464 | 1408 | dependencies = [ |
| 1465 | - "backtrace", | |
| 1466 | - "backtrace-ext", | |
| 1467 | - "is-terminal", | |
| 1468 | 1409 | "miette-derive", |
| 1469 | 1410 | "once_cell", |
| 1470 | - "owo-colors", | |
| 1471 | - "supports-color", | |
| 1472 | - "supports-hyperlinks", | |
| 1473 | - "supports-unicode", | |
| 1474 | - "terminal_size", | |
| 1475 | - "textwrap", | |
| 1476 | 1411 | "thiserror", |
| 1477 | 1412 | "unicode-width", |
| 1478 | 1413 | ] |
| @@ -1758,15 +1693,6 @@ dependencies = [ | ||
| 1758 | 1693 | "objc-sys", |
| 1759 | 1694 | ] |
| 1760 | 1695 | |
| 1761 | -[[package]] | |
| 1762 | -name = "object" | |
| 1763 | -version = "0.32.1" | |
| 1764 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1765 | -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" | |
| 1766 | -dependencies = [ | |
| 1767 | - "memchr", | |
| 1768 | -] | |
| 1769 | - | |
| 1770 | 1696 | [[package]] |
| 1771 | 1697 | name = "once_cell" |
| 1772 | 1698 | version = "1.18.0" |
| @@ -1804,12 +1730,6 @@ version = "0.1.1" | ||
| 1804 | 1730 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 1805 | 1731 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" |
| 1806 | 1732 | |
| 1807 | -[[package]] | |
| 1808 | -name = "owo-colors" | |
| 1809 | -version = "3.5.0" | |
| 1810 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 1811 | -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" | |
| 1812 | - | |
| 1813 | 1733 | [[package]] |
| 1814 | 1734 | name = "parking" |
| 1815 | 1735 | version = "2.1.1" |
| @@ -2176,12 +2096,6 @@ version = "0.7.5" | ||
| 2176 | 2096 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 2177 | 2097 | checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" |
| 2178 | 2098 | |
| 2179 | -[[package]] | |
| 2180 | -name = "rustc-demangle" | |
| 2181 | -version = "0.1.23" | |
| 2182 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2183 | -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" | |
| 2184 | - | |
| 2185 | 2099 | [[package]] |
| 2186 | 2100 | name = "rustc-hash" |
| 2187 | 2101 | version = "1.1.0" |
| @@ -2356,12 +2270,6 @@ version = "1.11.1" | ||
| 2356 | 2270 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 2357 | 2271 | checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" |
| 2358 | 2272 | |
| 2359 | -[[package]] | |
| 2360 | -name = "smawk" | |
| 2361 | -version = "0.3.2" | |
| 2362 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2363 | -checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" | |
| 2364 | - | |
| 2365 | 2273 | [[package]] |
| 2366 | 2274 | name = "smithay" |
| 2367 | 2275 | version = "0.3.0" |
| @@ -2456,34 +2364,6 @@ version = "0.10.0" | ||
| 2456 | 2364 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 2457 | 2365 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" |
| 2458 | 2366 | |
| 2459 | -[[package]] | |
| 2460 | -name = "supports-color" | |
| 2461 | -version = "2.1.0" | |
| 2462 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2463 | -checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" | |
| 2464 | -dependencies = [ | |
| 2465 | - "is-terminal", | |
| 2466 | - "is_ci", | |
| 2467 | -] | |
| 2468 | - | |
| 2469 | -[[package]] | |
| 2470 | -name = "supports-hyperlinks" | |
| 2471 | -version = "2.1.0" | |
| 2472 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2473 | -checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" | |
| 2474 | -dependencies = [ | |
| 2475 | - "is-terminal", | |
| 2476 | -] | |
| 2477 | - | |
| 2478 | -[[package]] | |
| 2479 | -name = "supports-unicode" | |
| 2480 | -version = "2.0.0" | |
| 2481 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2482 | -checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" | |
| 2483 | -dependencies = [ | |
| 2484 | - "is-terminal", | |
| 2485 | -] | |
| 2486 | - | |
| 2487 | 2367 | [[package]] |
| 2488 | 2368 | name = "syn" |
| 2489 | 2369 | version = "1.0.109" |
| @@ -2538,27 +2418,6 @@ dependencies = [ | ||
| 2538 | 2418 | "windows-sys 0.48.0", |
| 2539 | 2419 | ] |
| 2540 | 2420 | |
| 2541 | -[[package]] | |
| 2542 | -name = "terminal_size" | |
| 2543 | -version = "0.1.17" | |
| 2544 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2545 | -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" | |
| 2546 | -dependencies = [ | |
| 2547 | - "libc", | |
| 2548 | - "winapi", | |
| 2549 | -] | |
| 2550 | - | |
| 2551 | -[[package]] | |
| 2552 | -name = "textwrap" | |
| 2553 | -version = "0.15.2" | |
| 2554 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2555 | -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" | |
| 2556 | -dependencies = [ | |
| 2557 | - "smawk", | |
| 2558 | - "unicode-linebreak", | |
| 2559 | - "unicode-width", | |
| 2560 | -] | |
| 2561 | - | |
| 2562 | 2421 | [[package]] |
| 2563 | 2422 | name = "thiserror" |
| 2564 | 2423 | version = "1.0.49" |
| @@ -2786,12 +2645,6 @@ version = "1.0.12" | ||
| 2786 | 2645 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 2787 | 2646 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" |
| 2788 | 2647 | |
| 2789 | -[[package]] | |
| 2790 | -name = "unicode-linebreak" | |
| 2791 | -version = "0.1.5" | |
| 2792 | -source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 2793 | -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" | |
| 2794 | - | |
| 2795 | 2648 | [[package]] |
| 2796 | 2649 | name = "unicode-segmentation" |
| 2797 | 2650 | version = "1.10.1" |
Cargo.tomlmodified+1 -1
| @@ -19,7 +19,7 @@ knuffel = "3.2.0" | ||
| 19 | 19 | libc = "0.2.148" |
| 20 | 20 | logind-zbus = "3.1.2" |
| 21 | 21 | log = { version = "0.4.20", features = ["max_level_trace", "release_max_level_debug"] } |
| 22 | -miette = { version = "5.10.0", features = ["fancy"] } | |
| 22 | +miette = "5.10.0" | |
| 23 | 23 | nix = { version = "0.27.1", default-features = false, features = ["time"] } |
| 24 | 24 | pipewire = "0.7.2" |
| 25 | 25 | portable-atomic = { version = "1.4.3", default-features = false, features = ["float"] } |
src/main.rsmodified+2 -1
| @@ -20,7 +20,7 @@ use std::{env, mem}; | ||
| 20 | 20 | |
| 21 | 21 | use clap::Parser; |
| 22 | 22 | use config::Config; |
| 23 | -use miette::Context; | |
| 23 | +use miette::{Context, NarratableReportHandler}; | |
| 24 | 24 | use niri::{Niri, State}; |
| 25 | 25 | use portable_atomic::Ordering; |
| 26 | 26 | use smithay::reexports::calloop::{self, EventLoop}; |
| @@ -54,6 +54,7 @@ fn main() { | ||
| 54 | 54 | |
| 55 | 55 | let _client = tracy_client::Client::start(); |
| 56 | 56 | |
| 57 | + miette::set_hook(Box::new(|_| Box::new(NarratableReportHandler::new()))).unwrap(); | |
| 57 | 58 | let (mut config, path) = match Config::load(cli.config).context("error loading config") { |
| 58 | 59 | Ok((config, path)) => (config, Some(path)), |
| 59 | 60 | Err(err) => { |