From 05aeae3b09e0a4e3bdc299c06d09e7ae1d46ce06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20misaki=20masa?= Date: Thu, 26 Feb 2026 14:18:00 +0800 Subject: [PATCH] fix: ensure `cargo-deb` picks up the right build artifacts (#3720) --- Cargo.lock | 70 +++++++++++++------------- Cargo.toml | 2 +- scripts/build.sh | 9 +++- yazi-plugin/preset/plugins/archive.lua | 2 +- yazi-watcher/src/backend.rs | 1 + yazi-watcher/src/local/local.rs | 2 +- 6 files changed, 46 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2834affd..1c728ce2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -429,9 +429,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96eb4cdd6cf1b31d671e9efe75c5d1ec614776856cefbe109ca373554a6d514f" +checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" dependencies = [ "hybrid-array", ] @@ -920,9 +920,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "211f05e03c7d03754740fd9e585de910a095d6b99f8bcfffdef8319fa02a8331" +checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" dependencies = [ "hybrid-array", ] @@ -1239,13 +1239,13 @@ dependencies = [ [[package]] name = "digest" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bf3682cdec91817be507e4aa104314898b95b84d74f3d43882210101a545b6" +checksum = "285743a676ccb6b3e116bc14cc69319b957867930ae9c4822f8e0f54509d7243" dependencies = [ - "block-buffer 0.11.0", + "block-buffer 0.12.0", "const-oid 0.10.2", - "crypto-common 0.2.0", + "crypto-common 0.2.1", ] [[package]] @@ -2096,7 +2096,7 @@ checksum = "fe44f2bbd99fcb302e246e2d6bcf51aeda346d02a365f80296a07a8c711b6da6" dependencies = [ "argon2", "bcrypt-pbkdf", - "digest 0.11.0", + "digest 0.11.1", "ecdsa", "ed25519-dalek", "hex", @@ -2163,9 +2163,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.89" +version = "0.3.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4eacb0641a310445a4c513f2a5e23e19952e269c6a38887254d5f837a305506" +checksum = "14dc6f6450b3f6d4ed5b16327f38fed626d375a886159ca555bd7822c0c3a5a6" dependencies = [ "once_cell", "wasm-bindgen", @@ -3691,9 +3691,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rfc6979" @@ -3707,9 +3707,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.52" +version = "0.8.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" [[package]] name = "ring" @@ -3734,7 +3734,7 @@ dependencies = [ "const-oid 0.10.2", "crypto-bigint 0.7.0-rc.18", "crypto-primes", - "digest 0.11.0", + "digest 0.11.1", "pkcs1", "pkcs8 0.11.0-rc.11", "rand_core 0.10.0-rc-3", @@ -4041,9 +4041,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.16.1" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" +checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9" dependencies = [ "base64", "chrono", @@ -4060,9 +4060,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.16.1" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" +checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0" dependencies = [ "darling 0.21.3", "proc-macro2", @@ -4099,7 +4099,7 @@ checksum = "3b167252f3c126be0d8926639c4c4706950f01445900c4b3db0fd7e89fcb750a" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.11.0", + "digest 0.11.1", ] [[package]] @@ -4121,7 +4121,7 @@ checksum = "7c5f3b1e2dc8aad28310d8410bd4d7e180eca65fca176c52ab00d364475d0024" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.11.0", + "digest 0.11.1", ] [[package]] @@ -4208,7 +4208,7 @@ version = "3.0.0-rc.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a96996ccff7dfa16f052bd995b4cecc72af22c35138738dc029f0ead6608d" dependencies = [ - "digest 0.11.0", + "digest 0.11.1", "rand_core 0.10.0-rc-3", ] @@ -5029,9 +5029,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.112" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d7d0fce354c88b7982aec4400b3e7fcf723c32737cef571bd165f7613557ee" +checksum = "60722a937f594b7fde9adb894d7c092fc1bb6612897c46368d18e7a20208eff2" dependencies = [ "cfg-if", "once_cell", @@ -5042,9 +5042,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.62" +version = "0.4.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee85afca410ac4abba5b584b12e77ea225db6ee5471d0aebaae0861166f9378a" +checksum = "8a89f4650b770e4521aa6573724e2aed4704372151bd0de9d16a3bbabb87441a" dependencies = [ "cfg-if", "futures-util", @@ -5056,9 +5056,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.112" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55839b71ba921e4f75b674cb16f843f4b1f3b26ddfcb3454de1cf65cc021ec0f" +checksum = "0fac8c6395094b6b91c4af293f4c79371c163f9a6f56184d2c9a85f5a95f3950" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5066,9 +5066,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.112" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf2e969c2d60ff52e7e98b7392ff1588bffdd1ccd4769eba27222fd3d621571" +checksum = "ab3fabce6159dc20728033842636887e4877688ae94382766e00b180abac9d60" dependencies = [ "bumpalo", "proc-macro2", @@ -5079,9 +5079,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.112" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0861f0dcdf46ea819407495634953cdcc8a8c7215ab799a7a7ce366be71c7b30" +checksum = "de0e091bdb824da87dc01d967388880d017a0a9bc4f3bdc0d86ee9f9336e3bb5" dependencies = [ "unicode-ident", ] @@ -5122,9 +5122,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.89" +version = "0.3.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10053fbf9a374174094915bbce141e87a6bf32ecd9a002980db4b638405e8962" +checksum = "705eceb4ce901230f8625bd1d665128056ccbe4b7408faa625eec1ba80f59a97" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index 3c5c1fd6..c0ebd87a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ russh = { version = "0.57.0", default-features = false, features = scopeguard = "1.2.0" serde = { version = "1.0.228", features = [ "derive" ] } serde_json = "1.0.149" -serde_with = "3.16.1" +serde_with = "3.17.0" syntect = { version = "5.3.0", default-features = false, features = [ "parsing", "plist-load", "regex-onig" ] } thiserror = "2.0.18" tokio = { version = "1.49.0", features = [ "full" ] } diff --git a/scripts/build.sh b/scripts/build.sh index a07042d0..c6fd4685 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -8,6 +8,11 @@ export YAZI_GEN_COMPLETIONS=1 git config --global --add safe.directory "*" cargo build --release --locked --target "$1" +# Copy the binaries to a known location +mkdir -p "target/release" +cp "target/$1/release/ya" "target/release/ya" +cp "target/$1/release/yazi" "target/release/yazi" + # Package deb if [[ "$ARTIFACT_NAME" == *-linux-* ]] && { [[ "$ARTIFACT_NAME" == *-aarch64-* ]] || [[ "$ARTIFACT_NAME" == *-x86_64-* ]]; }; then cargo install cargo-deb @@ -16,8 +21,8 @@ fi # Create the artifact mkdir -p "$ARTIFACT_NAME/completions" -cp "target/$1/release/ya" "$ARTIFACT_NAME" -cp "target/$1/release/yazi" "$ARTIFACT_NAME" +cp "target/release/ya" "$ARTIFACT_NAME" +cp "target/release/yazi" "$ARTIFACT_NAME" cp yazi-cli/completions/* "$ARTIFACT_NAME/completions" cp yazi-boot/completions/* "$ARTIFACT_NAME/completions" cp README.md LICENSE "$ARTIFACT_NAME" diff --git a/yazi-plugin/preset/plugins/archive.lua b/yazi-plugin/preset/plugins/archive.lua index cca59da6..da219d38 100644 --- a/yazi-plugin/preset/plugins/archive.lua +++ b/yazi-plugin/preset/plugins/archive.lua @@ -40,7 +40,7 @@ function M:peek(job) left[#left] = ui.Line { string.rep(" │", f.depth), left[#left], - ui.truncate(f.path.name, { + ui.truncate(f.path.name or tostring(f.path), { rtl = true, max = math.max(0, job.area.w - (f.depth * 2) - ui.width(left[#left]) - ui.width(right[#right])), }), diff --git a/yazi-watcher/src/backend.rs b/yazi-watcher/src/backend.rs index 70a7858a..eb11fb7b 100644 --- a/yazi-watcher/src/backend.rs +++ b/yazi-watcher/src/backend.rs @@ -14,6 +14,7 @@ impl Backend { #[cfg(any(target_os = "linux", target_os = "macos"))] yazi_fs::mounts::Partitions::monitor(&yazi_fs::mounts::PARTITIONS, || { yazi_proxy::MgrProxy::watch(); + yazi_proxy::MgrProxy::refresh(); yazi_macro::err!(yazi_dds::Pubsub::pub_after_mount()) }); diff --git a/yazi-watcher/src/local/local.rs b/yazi-watcher/src/local/local.rs index 56a08c1f..c581bc2e 100644 --- a/yazi-watcher/src/local/local.rs +++ b/yazi-watcher/src/local/local.rs @@ -20,7 +20,7 @@ impl Local { pub(crate) fn serve(rx: mpsc::UnboundedReceiver, reporter: Reporter) -> Self { tokio::spawn(Self::changed(rx)); - let config = notify::Config::default().with_poll_interval(Duration::from_millis(500)); + let config = notify::Config::default().with_poll_interval(Duration::from_secs(1)); let handler = move |res: Result| { if let Ok(event) = res && !event.kind.is_access()