From 2a3fe33446a336b4e58490c8c1c52f50bcb16d45 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Wed, 19 Oct 2022 22:52:27 +0100 Subject: [PATCH] build: remove no longer required patch, reduce build times --- Cargo.lock | 122 ++++++++------------------------------------------ Cargo.toml | 13 +++--- src/config.rs | 2 +- 3 files changed, 25 insertions(+), 112 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 99ef377..51adf2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -191,17 +191,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -335,45 +324,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "clap" -version = "3.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" -dependencies = [ - "atty", - "bitflags", - "clap_derive", - "clap_lex", - "indexmap", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_derive" -version = "3.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -411,17 +361,6 @@ dependencies = [ "tracing-error", ] -[[package]] -name = "colored" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" -dependencies = [ - "atty", - "lazy_static", - "winapi", -] - [[package]] name = "concurrent-queue" version = "1.2.4" @@ -437,23 +376,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "cornfig" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6981753b68f7642c3737b302cd37dee779189fcdad975a69d6a7bb165f134e" -dependencies = [ - "cfg-if", - "clap", - "colored", - "pest", - "pest_derive", - "serde", - "serde_json", - "serde_yaml", - "toml", -] - [[package]] name = "cpufeatures" version = "0.2.5" @@ -1211,7 +1133,6 @@ dependencies = [ "async_once", "chrono", "color-eyre", - "cornfig", "derive_builder", "dirs", "futures-util", @@ -1219,6 +1140,7 @@ dependencies = [ "gtk", "gtk-layer-shell", "lazy_static", + "libcorn", "mpd_client", "notify", "regex", @@ -1288,6 +1210,19 @@ version = "0.2.135" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" +[[package]] +name = "libcorn" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0cc0f2cad23e81a2f48e4b0142a9f278bc7369a98b04cd7cc190ede637085da" +dependencies = [ + "cfg-if", + "pest", + "pest_derive", + "serde", + "toml", +] + [[package]] name = "libloading" version = "0.7.3" @@ -1544,12 +1479,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "os_str_bytes" -version = "6.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" - [[package]] name = "overload" version = "0.1.1" @@ -1890,12 +1819,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" @@ -2111,7 +2034,8 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "swayipc-async" version = "2.0.1" -source = "git+https://github.com/JakeStanger/swayipc-rs.git?branch=feat/derive-clone#d8322a5412b021d0c002506b92b83b91ffd238d7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812eaecd6f9e658587570dffe2768d7b58410cbcaad6579dd44414a890594f74" dependencies = [ "async-io", "async-pidfd", @@ -2123,8 +2047,9 @@ dependencies = [ [[package]] name = "swayipc-types" -version = "1.1.2" -source = "git+https://github.com/JakeStanger/swayipc-rs.git?branch=feat/derive-clone#d8322a5412b021d0c002506b92b83b91ffd238d7" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a558cee16f6eeb791722bbf060607cc53f7f9a47fe80055eca81bceebd34928e" dependencies = [ "serde", "serde_json", @@ -2193,12 +2118,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" - [[package]] name = "thiserror" version = "1.0.37" @@ -2566,7 +2485,6 @@ dependencies = [ "downcast-rs", "libc", "nix 0.24.2", - "scoped-tls", "wayland-commons", "wayland-scanner", "wayland-sys", @@ -2624,8 +2542,6 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" dependencies = [ - "dlib", - "lazy_static", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 74937aa..4809ff6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ description = "Customisable wlroots/sway bar" [dependencies] derive_builder = "0.11.2" gtk = "0.15.5" -gtk-layer-shell = "0.4.1" +gtk-layer-shell = "0.4.4" glib = "0.15.12" tokio = { version = "1.21.2", features = ["macros", "rt-multi-thread", "time"] } tracing = "0.1.37" @@ -25,10 +25,10 @@ serde = { version = "1.0.141", features = ["derive"] } serde_json = "1.0.82" serde_yaml = "0.9.4" toml = "0.5.9" -cornfig = "0.3.0" +libcorn = "0.4.0" lazy_static = "1.4.0" async_once = "0.2.6" -regex = "1.6.0" +regex = { version = "1.6.0", default-features = false, features = ["std"] } stray = { version = "0.1.2" } dirs = "4.0.0" walkdir = "2.3.2" @@ -37,8 +37,5 @@ mpd_client = "1.0.0" swayipc-async = { version = "2.0.1" } sysinfo = "0.26.4" wayland-client = "0.29.5" -wayland-protocols = { version = "0.29.5", features=["unstable_protocols", "client"] } -smithay-client-toolkit = "0.16.0" - -[patch.crates-io] -swayipc-async = { git = "https://github.com/JakeStanger/swayipc-rs.git", branch = "feat/derive-clone" } \ No newline at end of file +wayland-protocols = { version = "0.29.5", features = ["unstable_protocols", "client"] } +smithay-client-toolkit = { version = "0.16.0", default-features = false, features=["calloop"] } \ No newline at end of file diff --git a/src/config.rs b/src/config.rs index 057c44d..7256289 100644 --- a/src/config.rs +++ b/src/config.rs @@ -169,7 +169,7 @@ impl Config { // so serialize the interpreted result then deserialize that let file = String::from_utf8(file).wrap_err("Config file contains invalid UTF-8")?; - let config = cornfig::parse(&file).wrap_err("Invalid corn config")?.value; + let config = libcorn::parse(&file).wrap_err("Invalid corn config")?.value; Ok(serde_json::from_str(&serde_json::to_string(&config)?)?) } _ => unreachable!(),