From 2b37028e08a78185fcb566d68ebc2c021929b9be Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Tue, 21 Oct 2025 10:56:48 +0800 Subject: [PATCH] chore: Update dependencies to smol = 2 (#1404) just noticed the dependency is set to a fairly old version of smol (= 1), so update to smol = 2. Also gpui/zed seems to be using smol = 2 --- Cargo.lock | 234 +++++--------------------------- Cargo.toml | 2 +- crates/ui/src/text/text_view.rs | 4 +- 3 files changed, 40 insertions(+), 200 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba059074..f38e8b2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -169,8 +169,8 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df" dependencies = [ - "async-fs 2.1.3", - "async-net 2.0.0", + "async-fs", + "async-net", "enumflags2", "futures-channel", "futures-util", @@ -190,8 +190,8 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da0986d5b4f0802160191ad75f8d33ada000558757db3defb70299ca95d9fcbd" dependencies = [ - "async-fs 2.1.3", - "async-net 2.0.0", + "async-fs", + "async-net", "enumflags2", "futures-channel", "futures-util", @@ -265,25 +265,13 @@ dependencies = [ "slab", ] -[[package]] -name = "async-fs" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "blocking", - "futures-lite 1.13.0", -] - [[package]] name = "async-fs" version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09f7e37c0ed80b2a977691c47dae8625cfb21e205827106c64f7c588766b2e50" dependencies = [ - "async-lock 3.4.1", + "async-lock", "blocking", "futures-lite 2.6.1", ] @@ -296,60 +284,31 @@ checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel 2.5.0", "async-executor", - "async-io 2.5.0", - "async-lock 3.4.1", + "async-io", + "async-lock", "blocking", "futures-lite 2.6.1", "once_cell", ] -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.28", - "slab", - "socket2 0.4.10", - "waker-fn", -] - [[package]] name = "async-io" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19634d6336019ef220f09fd31168ce5c184b295cbf80345437cc36094ef223ca" dependencies = [ - "async-lock 3.4.1", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.6.1", "parking", - "polling 3.10.0", + "polling", "rustix 1.0.8", "slab", "windows-sys 0.60.2", ] -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - [[package]] name = "async-lock" version = "3.4.1" @@ -361,45 +320,17 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-net" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" -dependencies = [ - "async-io 1.13.0", - "blocking", - "futures-lite 1.13.0", -] - [[package]] name = "async-net" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ - "async-io 2.5.0", + "async-io", "blocking", "futures-lite 2.6.1", ] -[[package]] -name = "async-process" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" -dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", - "async-signal", - "blocking", - "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.44", - "windows-sys 0.48.0", -] - [[package]] name = "async-process" version = "2.4.0" @@ -407,8 +338,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65daa13722ad51e6ab1a1b9c01299142bc75135b337923cfa10e79bbbd669f00" dependencies = [ "async-channel 2.5.0", - "async-io 2.5.0", - "async-lock 3.4.1", + "async-io", + "async-lock", "async-signal", "async-task", "blocking", @@ -435,8 +366,8 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f567af260ef69e1d52c2b560ce0ea230763e6fbb9214a85d768760a920e3e3c1" dependencies = [ - "async-io 2.5.0", - "async-lock 3.4.1", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", @@ -455,9 +386,9 @@ checksum = "2c8e079a4ab67ae52b7403632e4618815d6db36d2a010cfe41b02c1b1578f93b" dependencies = [ "async-channel 1.9.0", "async-global-executor", - "async-io 2.5.0", - "async-lock 3.4.1", - "async-process 2.4.0", + "async-io", + "async-lock", + "async-process", "crossbeam-utils", "futures-channel", "futures-core", @@ -1010,7 +941,7 @@ checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ "bitflags 2.9.1", "log", - "polling 3.10.0", + "polling", "rustix 0.38.44", "slab", "thiserror 1.0.69", @@ -2025,17 +1956,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "5.4.1" @@ -2874,7 +2794,7 @@ dependencies = [ "serde_json", "slotmap", "smallvec", - "smol 2.0.2", + "smol", "stacksafe", "strum 0.27.2", "taffy", @@ -2939,7 +2859,7 @@ dependencies = [ "serde_json", "serde_repr", "smallvec", - "smol 1.3.0", + "smol", "tracing", "tree-sitter", "tree-sitter-bash", @@ -3131,12 +3051,6 @@ dependencies = [ "gpui-component", ] -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hermit-abi" version = "0.5.2" @@ -3616,17 +3530,6 @@ dependencies = [ "rustversion", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "io-surface" version = "0.16.1" @@ -3993,12 +3896,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -4628,7 +4525,7 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ - "hermit-abi 0.5.2", + "hermit-abi", "libc", ] @@ -4828,9 +4725,9 @@ checksum = "e3299dd401feaf1d45afd8fd1c0586f10fcfb22f244bb9afa942cec73503b89d" dependencies = [ "aes", "ashpd 0.12.0", - "async-fs 2.1.3", - "async-io 2.5.0", - "async-lock 3.4.1", + "async-fs", + "async-io", + "async-lock", "blocking", "cbc", "cipher", @@ -5257,22 +5154,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - [[package]] name = "polling" version = "3.10.0" @@ -5281,7 +5162,7 @@ checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.5.2", + "hermit-abi", "pin-project-lite", "rustix 1.0.8", "windows-sys 0.60.2", @@ -6154,20 +6035,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.37.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "519165d378b97752ca44bbe15047d5d3409e875f39327546b42ac81d7e18c1b6" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.44" @@ -6742,23 +6609,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "smol" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" -dependencies = [ - "async-channel 1.9.0", - "async-executor", - "async-fs 1.6.0", - "async-io 1.13.0", - "async-lock 2.8.0", - "async-net 1.8.0", - "async-process 1.8.1", - "blocking", - "futures-lite 1.13.0", -] - [[package]] name = "smol" version = "2.0.2" @@ -6767,11 +6617,11 @@ checksum = "a33bd3e260892199c3ccfc487c88b2da2265080acb316cd920da72fdfd7c599f" dependencies = [ "async-channel 2.5.0", "async-executor", - "async-fs 2.1.3", - "async-io 2.5.0", - "async-lock 3.4.1", - "async-net 2.0.0", - "async-process 2.4.0", + "async-fs", + "async-io", + "async-lock", + "async-net", + "async-process", "blocking", "futures-lite 2.6.1", ] @@ -6782,16 +6632,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.10" @@ -6923,7 +6763,7 @@ dependencies = [ "rust-embed", "serde", "serde_json", - "smol 1.3.0", + "smol", "tracing", "tracing-subscriber", "tree-sitter-navi", @@ -9583,9 +9423,9 @@ checksum = "4bb4f9a464286d42851d18a605f7193b8febaf5b0919d71c6399b7b26e5b0aad" dependencies = [ "async-broadcast", "async-executor", - "async-io 2.5.0", - "async-lock 3.4.1", - "async-process 2.4.0", + "async-io", + "async-lock", + "async-process", "async-recursion", "async-task", "async-trait", @@ -9691,7 +9531,7 @@ checksum = "3c3f2bb8e91cfc16ef201813d76fa6c4e98e5193f07f88d51c7b912d3761f72f" dependencies = [ "anyhow", "async-compression", - "async-fs 2.1.3", + "async-fs", "async-tar", "bytes", "derive_more", @@ -9854,7 +9694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989eeb4bc093333d33226f5a478d97d1d9b305fce5798bc89dd094768b4286b7" dependencies = [ "anyhow", - "async-fs 2.1.3", + "async-fs", "async_zip", "command-fds", "dirs 4.0.0", @@ -9875,7 +9715,7 @@ dependencies = [ "serde_json", "serde_json_lenient", "shlex", - "smol 2.0.2", + "smol", "take-until", "tempfile", "tendril", diff --git a/Cargo.toml b/Cargo.toml index cf78dc23..884bdc1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ serde = { version = "1.0.219", features = ["derive"] } serde_json = "1" serde_repr = "0.1" smallvec = "1" -smol = "1" +smol = "2" tracing = "0.1.41" [workspace.dependencies.windows] diff --git a/crates/ui/src/text/text_view.rs b/crates/ui/src/text/text_view.rs index 98efdbc0..f40b49a6 100644 --- a/crates/ui/src/text/text_view.rs +++ b/crates/ui/src/text/text_view.rs @@ -119,7 +119,7 @@ struct UpdateFuture { current_style: TextViewStyle, current_text: SharedString, timer: Timer, - rx: smol::channel::Receiver, + rx: Pin>>, tx_result: smol::channel::Sender>, delay: Duration, } @@ -140,7 +140,7 @@ impl UpdateFuture { current_style: style, current_text: text, timer: Timer::never(), - rx, + rx: Box::pin(rx), tx_result, delay, }