diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-30 09:08:00 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-30 09:08:00 +0400 |
| commit | 3f8788e4ed9c9ee3afa8fffde04a696f627d0f72 (patch) | |
| tree | 2e59816a036181bc7af1afd19e9b2d928a7fcfee | |
| parent | 56cffa155b20eaeb5b3a5f3ad434493d700a43a6 (diff) | |
| download | niri-3f8788e4ed9c9ee3afa8fffde04a696f627d0f72.tar.gz niri-3f8788e4ed9c9ee3afa8fffde04a696f627d0f72.tar.bz2 niri-3f8788e4ed9c9ee3afa8fffde04a696f627d0f72.zip | |
Use non-fancy miette hook
Cuts down our dependencies a bit. We only use miette due to knuffel so
it makes sense.
| -rw-r--r-- | Cargo.lock | 147 | ||||
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | src/main.rs | 3 |
3 files changed, 3 insertions, 149 deletions
@@ -3,15 +3,6 @@ version = 3 [[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -283,30 +274,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "backtrace-ext" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" -dependencies = [ - "backtrace", -] - -[[package]] name = "base64" version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1031,12 +998,6 @@ dependencies = [ ] [[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - -[[package]] name = "gl_generator" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1165,23 +1126,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bffb4def18c48926ccac55c1223e02865ce1a821751a95920448662696e7472c" [[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix 0.38.15", - "windows-sys 0.48.0", -] - -[[package]] -name = "is_ci" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" - -[[package]] name = "itoa" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1462,17 +1406,8 @@ version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" dependencies = [ - "backtrace", - "backtrace-ext", - "is-terminal", "miette-derive", "once_cell", - "owo-colors", - "supports-color", - "supports-hyperlinks", - "supports-unicode", - "terminal_size", - "textwrap", "thiserror", "unicode-width", ] @@ -1759,15 +1694,6 @@ dependencies = [ ] [[package]] -name = "object" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" -dependencies = [ - "memchr", -] - -[[package]] name = "once_cell" version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1805,12 +1731,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - -[[package]] name = "parking" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2177,12 +2097,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] name = "rustc-hash" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2357,12 +2271,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] -name = "smawk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" - -[[package]] name = "smithay" version = "0.3.0" source = "git+https://github.com/Smithay/smithay.git#74ef59a3f8b6a1f86a74388590f2f852040354e4" @@ -2457,34 +2365,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] -name = "supports-color" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" -dependencies = [ - "is-terminal", - "is_ci", -] - -[[package]] -name = "supports-hyperlinks" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" -dependencies = [ - "is-terminal", -] - -[[package]] -name = "supports-unicode" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" -dependencies = [ - "is-terminal", -] - -[[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2539,27 +2419,6 @@ dependencies = [ ] [[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "textwrap" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" -dependencies = [ - "smawk", - "unicode-linebreak", - "unicode-width", -] - -[[package]] name = "thiserror" version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2787,12 +2646,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "unicode-linebreak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" - -[[package]] name = "unicode-segmentation" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -19,7 +19,7 @@ knuffel = "3.2.0" libc = "0.2.148" logind-zbus = "3.1.2" log = { version = "0.4.20", features = ["max_level_trace", "release_max_level_debug"] } -miette = { version = "5.10.0", features = ["fancy"] } +miette = "5.10.0" nix = { version = "0.27.1", default-features = false, features = ["time"] } pipewire = "0.7.2" portable-atomic = { version = "1.4.3", default-features = false, features = ["float"] } diff --git a/src/main.rs b/src/main.rs index e5e26bca..62a059b1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ use std::{env, mem}; use clap::Parser; use config::Config; -use miette::Context; +use miette::{Context, NarratableReportHandler}; use niri::{Niri, State}; use portable_atomic::Ordering; use smithay::reexports::calloop::{self, EventLoop}; @@ -54,6 +54,7 @@ fn main() { let _client = tracy_client::Client::start(); + miette::set_hook(Box::new(|_| Box::new(NarratableReportHandler::new()))).unwrap(); let (mut config, path) = match Config::load(cli.config).context("error loading config") { Ok((config, path)) => (config, Some(path)), Err(err) => { |
