chore: Update GPUI and fix FocusableWrapper removed error. (#1026)

Close #1024 

Ref https://github.com/zed-industries/zed/pull/32436
This commit is contained in:
Jason Lee 2025-07-02 11:06:04 +08:00 committed by GitHub
parent d86332dca3
commit 41663ca030
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 63 additions and 37 deletions

View file

@ -26,6 +26,7 @@ jobs:
runs-on: ${{ matrix.run_on }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install system dependencies
if: ${{ matrix.run_on != 'windows-latest' }}
run: script/bootstrap

57
Cargo.lock generated
View file

@ -724,7 +724,7 @@ dependencies = [
"bitflags 2.9.1",
"cexpr",
"clang-sys",
"itertools 0.11.0",
"itertools 0.10.5",
"lazy_static",
"lazycell",
"log",
@ -747,7 +747,7 @@ dependencies = [
"bitflags 2.9.1",
"cexpr",
"clang-sys",
"itertools 0.11.0",
"itertools 0.10.5",
"log",
"prettyplease",
"proc-macro2",
@ -1417,7 +1417,7 @@ dependencies = [
[[package]]
name = "collections"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"indexmap 2.9.0",
"rustc-hash 2.1.0",
@ -1975,7 +1975,7 @@ dependencies = [
[[package]]
name = "derive_refineable"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"proc-macro2",
"quote",
@ -3121,7 +3121,7 @@ dependencies = [
[[package]]
name = "gpui"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"anyhow",
"as-raw-xcb-connection",
@ -3304,7 +3304,7 @@ dependencies = [
[[package]]
name = "gpui_macros"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@ -3574,7 +3574,7 @@ dependencies = [
[[package]]
name = "http_client"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"anyhow",
"bytes",
@ -3591,7 +3591,7 @@ dependencies = [
[[package]]
name = "http_client_tls"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"rustls",
"rustls-platform-verifier",
@ -4417,7 +4417,7 @@ dependencies = [
[[package]]
name = "media"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"anyhow",
"bindgen 0.71.1",
@ -6319,10 +6319,30 @@ dependencies = [
"thiserror 2.0.12",
]
[[package]]
name = "ref-cast"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf"
dependencies = [
"ref-cast-impl",
]
[[package]]
name = "ref-cast-impl"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.101",
]
[[package]]
name = "refineable"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"derive_refineable",
"workspace-hack",
@ -6477,7 +6497,7 @@ dependencies = [
[[package]]
name = "reqwest_client"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"anyhow",
"bytes",
@ -6910,12 +6930,13 @@ dependencies = [
[[package]]
name = "schemars"
version = "0.8.22"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
checksum = "1375ba8ef45a6f15d83fa8748f1079428295d403d6ea991d09ab100155fbc06d"
dependencies = [
"dyn-clone",
"indexmap 2.9.0",
"ref-cast",
"schemars_derive",
"serde",
"serde_json",
@ -6923,9 +6944,9 @@ dependencies = [
[[package]]
name = "schemars_derive"
version = "0.8.22"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d"
checksum = "2b13ed22d6d49fe23712e068770b5c4df4a693a2b02eeff8e7ca3135627a24f6"
dependencies = [
"proc-macro2",
"quote",
@ -7052,7 +7073,7 @@ checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a"
[[package]]
name = "semantic_version"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"anyhow",
"serde",
@ -7634,7 +7655,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "sum_tree"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"arrayvec",
"log",
@ -8862,7 +8883,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "util"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed.git#c3d0230f89ff21257d965d4c410a274e52c4fe35"
source = "git+https://github.com/zed-industries/zed.git#faca128304dd175b9b9441572bb7b827e380c0cf"
dependencies = [
"anyhow",
"async-fs 2.1.2",

View file

@ -22,9 +22,14 @@ wef = { path = "crates/wef" }
anyhow = "1"
log = "0.4"
serde = "1.0.203"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1"
schemars = "1"
smallvec = "1"
rust-i18n = "3"
raw-window-handle = "0.6.2"
smol = "1"
tracing = "0.1.41"
[workspace.dependencies.windows]
features = ["Wdk", "Wdk_System", "Wdk_System_SystemServices"]

View file

@ -19,7 +19,15 @@ webview = ["dep:wry"]
[dependencies]
gpui.workspace = true
gpui-component-macros.workspace = true
anyhow = "1"
rust-i18n.workspace = true
schemars.workspace = true
serde.workspace = true
serde_json.workspace = true
smallvec.workspace = true
smol.workspace = true
tracing.workspace = true
anyhow.workspace = true
enum-iterator = "2.1.0"
futures-util = "0.3.31"
image = "0.25.1"
@ -28,13 +36,6 @@ once_cell = "1.19.0"
paste = "1"
regex = "1"
resvg = { version = "0.45.0", default-features = false, features = ["text"] }
rust-i18n = "3"
schemars = "0.8.22"
serde = "1.0.203"
serde_json = "1"
smallvec = "1.13.2"
smol = "1"
tracing = "0.1.41"
unicode-segmentation = "1.12.0"
usvg = { version = "0.45.0", default-features = false, features = ["text"] }
uuid = "1.10"

View file

@ -1,4 +1,4 @@
use gpui::{App, ClickEvent, FocusableWrapper, InteractiveElement, Stateful, Window};
use gpui::{App, ClickEvent, InteractiveElement, Stateful, Window};
pub trait InteractiveElementExt: InteractiveElement {
/// Set the listener for a double click event.
@ -18,5 +18,4 @@ pub trait InteractiveElementExt: InteractiveElement {
}
}
impl<E: InteractiveElement> InteractiveElementExt for FocusableWrapper<E> {}
impl<E: InteractiveElement> InteractiveElementExt for Stateful<E> {}

View file

@ -2,9 +2,9 @@ use std::{cell::RefCell, rc::Rc};
use gpui::{
anchored, deferred, div, prelude::FluentBuilder, px, relative, AnyElement, App, Context,
Corner, DismissEvent, DispatchPhase, Element, ElementId, Entity, Focusable, FocusableWrapper,
GlobalElementId, InspectorElementId, InteractiveElement, IntoElement, MouseButton,
MouseDownEvent, ParentElement, Pixels, Point, Position, Stateful, Style, Window,
Corner, DismissEvent, DispatchPhase, Element, ElementId, Entity, Focusable, GlobalElementId,
InspectorElementId, InteractiveElement, IntoElement, MouseButton, MouseDownEvent,
ParentElement, Pixels, Point, Position, Stateful, Style, Window,
};
use crate::menu::popup_menu::PopupMenu;
@ -19,7 +19,6 @@ pub trait ContextMenuExt: ParentElement + Sized {
}
impl<E> ContextMenuExt for Stateful<E> where E: ParentElement {}
impl<E> ContextMenuExt for FocusableWrapper<E> where E: ParentElement {}
/// A context menu that can be shown on right-click.
pub struct ContextMenu {

View file

@ -12,9 +12,9 @@ repository = "https://github.com/longbridge/gpui-component"
gpui.workspace = true
gpui-component.workspace = true
wef.workspace = true
serde.workspace = true
schemars.workspace = true
raw-window-handle.workspace = true
rust-i18n.workspace = true
image = { version = "0.25.6", default-features = false }
serde = { version = "1.0.219", features = ["derive"] }
schemars = "0.8.22"
raw-window-handle = "0.6.2"
rust-i18n = "3.1.5"