chore: update gpui

This commit is contained in:
2026-01-14 15:00:52 +07:00
parent ac9afb1790
commit 014757cfc9
4 changed files with 87 additions and 27 deletions

100
Cargo.lock generated
View File

@@ -2,6 +2,15 @@
# It is not intended for manual editing. # It is not intended for manual editing.
version = 4 version = 4
[[package]]
name = "addr2line"
version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
dependencies = [
"gimli",
]
[[package]] [[package]]
name = "adler2" name = "adler2"
version = "2.0.1" version = "2.0.1"
@@ -97,7 +106,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0c269894b6fe5e9d7ada0cf69b5bf847ff35bc25fc271f08e1d080fce80339a" checksum = "f0c269894b6fe5e9d7ada0cf69b5bf847ff35bc25fc271f08e1d080fce80339a"
dependencies = [ dependencies = [
"object", "object 0.32.2",
] ]
[[package]] [[package]]
@@ -578,6 +587,21 @@ dependencies = [
"fs_extra", "fs_extra",
] ]
[[package]]
name = "backtrace"
version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
dependencies = [
"addr2line",
"cfg-if",
"libc",
"miniz_oxide",
"object 0.37.3",
"rustc-demangle",
"windows-link 0.2.1",
]
[[package]] [[package]]
name = "base64" name = "base64"
version = "0.22.1" version = "0.22.1"
@@ -1155,7 +1179,7 @@ dependencies = [
[[package]] [[package]]
name = "collections" name = "collections"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
@@ -1583,7 +1607,7 @@ dependencies = [
[[package]] [[package]]
name = "derive_refineable" name = "derive_refineable"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -2411,6 +2435,12 @@ dependencies = [
"weezl", "weezl",
] ]
[[package]]
name = "gimli"
version = "0.32.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
[[package]] [[package]]
name = "glob" name = "glob"
version = "0.3.3" version = "0.3.3"
@@ -2487,7 +2517,7 @@ dependencies = [
[[package]] [[package]]
name = "gpui" name = "gpui"
version = "0.2.2" version = "0.2.2"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"as-raw-xcb-connection", "as-raw-xcb-connection",
@@ -2503,6 +2533,7 @@ dependencies = [
"calloop", "calloop",
"calloop-wayland-source", "calloop-wayland-source",
"cbindgen", "cbindgen",
"chrono",
"circular-buffer", "circular-buffer",
"cocoa 0.26.0", "cocoa 0.26.0",
"cocoa-foundation 0.2.0", "cocoa-foundation 0.2.0",
@@ -2518,7 +2549,6 @@ dependencies = [
"embed-resource", "embed-resource",
"etagere", "etagere",
"filedescriptor", "filedescriptor",
"flume",
"foreign-types 0.5.0", "foreign-types 0.5.0",
"futures", "futures",
"gpui_macros", "gpui_macros",
@@ -2547,6 +2577,7 @@ dependencies = [
"raw-window-handle", "raw-window-handle",
"refineable", "refineable",
"resvg", "resvg",
"scheduler",
"schemars", "schemars",
"seahash", "seahash",
"semver", "semver",
@@ -2588,7 +2619,7 @@ dependencies = [
[[package]] [[package]]
name = "gpui_macros" name = "gpui_macros"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
@@ -2599,7 +2630,7 @@ dependencies = [
[[package]] [[package]]
name = "gpui_tokio" name = "gpui_tokio"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"gpui", "gpui",
@@ -2821,7 +2852,7 @@ dependencies = [
[[package]] [[package]]
name = "http_client" name = "http_client"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-compression", "async-compression",
@@ -2846,7 +2877,7 @@ dependencies = [
[[package]] [[package]]
name = "http_client_tls" name = "http_client_tls"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"rustls", "rustls",
"rustls-platform-verifier", "rustls-platform-verifier",
@@ -3607,7 +3638,7 @@ dependencies = [
[[package]] [[package]]
name = "media" name = "media"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bindgen", "bindgen",
@@ -4212,6 +4243,15 @@ dependencies = [
"memchr", "memchr",
] ]
[[package]]
name = "object"
version = "0.37.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
dependencies = [
"memchr",
]
[[package]] [[package]]
name = "once_cell" name = "once_cell"
version = "1.21.3" version = "1.21.3"
@@ -4458,7 +4498,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]] [[package]]
name = "perf" name = "perf"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"collections", "collections",
"serde", "serde",
@@ -5093,7 +5133,7 @@ dependencies = [
[[package]] [[package]]
name = "refineable" name = "refineable"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"derive_refineable", "derive_refineable",
] ]
@@ -5192,7 +5232,7 @@ dependencies = [
[[package]] [[package]]
name = "reqwest_client" name = "reqwest_client"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@@ -5246,7 +5286,7 @@ dependencies = [
[[package]] [[package]]
name = "rope" name = "rope"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"log", "log",
@@ -5309,6 +5349,12 @@ dependencies = [
"ordered-multimap", "ordered-multimap",
] ]
[[package]]
name = "rustc-demangle"
version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"
[[package]] [[package]]
name = "rustc-hash" name = "rustc-hash"
version = "1.1.0" version = "1.1.0"
@@ -5516,6 +5562,20 @@ dependencies = [
"windows-sys 0.61.2", "windows-sys 0.61.2",
] ]
[[package]]
name = "scheduler"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [
"async-task",
"backtrace",
"chrono",
"flume",
"futures",
"parking_lot",
"rand 0.9.2",
]
[[package]] [[package]]
name = "schemars" name = "schemars"
version = "1.2.0" version = "1.2.0"
@@ -6095,7 +6155,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]] [[package]]
name = "sum_tree" name = "sum_tree"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"log", "log",
@@ -7053,7 +7113,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]] [[package]]
name = "util" name = "util"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-fs", "async-fs",
@@ -7089,7 +7149,7 @@ dependencies = [
[[package]] [[package]]
name = "util_macros" name = "util_macros"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"perf", "perf",
"quote", "quote",
@@ -8564,7 +8624,7 @@ dependencies = [
[[package]] [[package]]
name = "zlog" name = "zlog"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@@ -8581,7 +8641,7 @@ checksum = "bd8f3f50b848df28f887acb68e41201b5aea6bc8a8dacc00fb40635ff9a72fea"
[[package]] [[package]]
name = "ztracing" name = "ztracing"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
dependencies = [ dependencies = [
"tracing", "tracing",
"tracing-subscriber", "tracing-subscriber",
@@ -8592,7 +8652,7 @@ dependencies = [
[[package]] [[package]]
name = "ztracing_macro" name = "ztracing_macro"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#20284e4f218081a2c9f90ab78dbb7062e6203725" source = "git+https://github.com/zed-industries/zed#acfc71a42304a19d1c0b5753d3513c0ec0fa1547"
[[package]] [[package]]
name = "zune-core" name = "zune-core"

View File

@@ -43,7 +43,7 @@ pub fn load_embedded_fonts(cx: &App) {
let embedded_fonts = Mutex::new(Vec::new()); let embedded_fonts = Mutex::new(Vec::new());
let executor = cx.background_executor(); let executor = cx.background_executor();
executor.block(executor.scoped(|scope| { cx.foreground_executor().block_on(executor.scoped(|scope| {
for font_path in &font_paths { for font_path in &font_paths {
if !font_path.ends_with(".ttf") { if !font_path.ends_with(".ttf") {
continue; continue;

View File

@@ -88,9 +88,8 @@ impl NostrRegistry {
}); });
// Construct the lmdb // Construct the lmdb
let lmdb = cx.background_executor().block(async move { let lmdb = cx.foreground_executor().block_on(async move {
let path = config_dir().join("nostr"); NostrLmdb::open(config_dir().join("nostr"))
NostrLmdb::open(path)
.await .await
.expect("Failed to initialize database") .expect("Failed to initialize database")
}); });

View File

@@ -1,6 +1,6 @@
use std::time::Duration; use std::time::Duration;
use gpui::{px, Context, Pixels, Timer}; use gpui::{px, Context, Pixels};
static INTERVAL: Duration = Duration::from_millis(500); static INTERVAL: Duration = Duration::from_millis(500);
static PAUSE_DELAY: Duration = Duration::from_millis(300); static PAUSE_DELAY: Duration = Duration::from_millis(300);
@@ -54,7 +54,8 @@ impl BlinkCursor {
// Schedule the next blink // Schedule the next blink
let epoch = self.next_epoch(); let epoch = self.next_epoch();
cx.spawn(async move |this, cx| { cx.spawn(async move |this, cx| {
Timer::after(INTERVAL).await; cx.background_executor().timer(INTERVAL).await;
if let Some(this) = this.upgrade() { if let Some(this) = this.upgrade() {
this.update(cx, |this, cx| this.blink(epoch, cx)); this.update(cx, |this, cx| this.blink(epoch, cx));
} }
@@ -76,7 +77,7 @@ impl BlinkCursor {
// delay 500ms to start the blinking // delay 500ms to start the blinking
let epoch = self.next_epoch(); let epoch = self.next_epoch();
cx.spawn(async move |this, cx| { cx.spawn(async move |this, cx| {
Timer::after(PAUSE_DELAY).await; cx.background_executor().timer(PAUSE_DELAY).await;
if let Some(this) = this.upgrade() { if let Some(this) = this.upgrade() {
this.update(cx, |this, cx| { this.update(cx, |this, cx| {