From a3d142f5863a8627a1f17c29f5aa277ac16c0cfc Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Thu, 21 May 2026 22:23:34 +0800 Subject: [PATCH] build(deps): vendor casement (winit fork) as a submodule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The casement crate was depended on through a sibling-repo path (`../../../winit`) that only existed on the maintainer's machine, so CI couldn't load the workspace manifest and every Rust Check job died with "failed to read winit/Cargo.toml". Vendoring it as a real submodule under `vendor/casement` (matching the `vendor/jian` pattern, picked up by CI's `submodules: recursive` checkout) closes that gap. The renamed GitHub repo `ZSeven-W/casement` (was `ZSeven-W/winit`) tracks the `op-file-open` branch — `feat(macos): drain_opened_file_urls` + the package rename landed there as commit 5877fa83. - `.gitmodules`: add vendor/casement. - Root Cargo.toml: exclude vendor/casement from the workspace glob (it's its own workspace). - op-host-native + op-host-desktop: path = "../../vendor/casement". --- .gitmodules | 4 ++++ Cargo.toml | 1 + crates/op-host-desktop/Cargo.toml | 8 ++++---- crates/op-host-native/Cargo.toml | 7 ++++--- vendor/casement | 1 + 5 files changed, 14 insertions(+), 7 deletions(-) create mode 160000 vendor/casement diff --git a/.gitmodules b/.gitmodules index eb15f426..65b8828c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,7 @@ [submodule "vendor/jian"] path = vendor/jian url = git@github.com:ZSeven-W/jian.git +[submodule "vendor/casement"] + path = vendor/casement + url = https://github.com/ZSeven-W/casement.git + branch = op-file-open diff --git a/Cargo.toml b/Cargo.toml index 5f53e469..5344b39d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ members = ["crates/*"] exclude = [ "vendor/agent", "vendor/anthropic-agent-sdk", + "vendor/casement", "vendor/jian", "vendor/skia-safe-op", "node_modules", diff --git a/crates/op-host-desktop/Cargo.toml b/crates/op-host-desktop/Cargo.toml index fcb84a55..65cb4a09 100644 --- a/crates/op-host-desktop/Cargo.toml +++ b/crates/op-host-desktop/Cargo.toml @@ -102,12 +102,12 @@ skia-safe = { version = "0.97.0", default-features = false, features = [ "gl", "pdf", ] } -# `casement` — ZSeven-W's winit fork (sibling repo, local path for -# now). It adds `winit::platform::macos::drain_opened_file_urls`, the -# macOS open-documents Apple-event hook upstream winit lacks. The +# `casement` — ZSeven-W's winit fork (vendored as a submodule under +# `vendor/casement`). It adds `winit::platform::macos::drain_opened_file_urls`, +# the macOS open-documents Apple-event hook upstream winit lacks. The # `package` key keeps the `winit` import name, so all `use winit::…` # stays unchanged. -winit = { package = "casement", path = "../../../winit", default-features = false, features = [ +winit = { package = "casement", path = "../../vendor/casement", default-features = false, features = [ "x11", "wayland", "wayland-csd-adwaita", diff --git a/crates/op-host-native/Cargo.toml b/crates/op-host-native/Cargo.toml index d8282f9e..4c422ca3 100644 --- a/crates/op-host-native/Cargo.toml +++ b/crates/op-host-native/Cargo.toml @@ -109,14 +109,15 @@ skia-safe = { version = "0.97.0", default-features = false, features = [ "gl", ] } glutin = "0.32.3" -# `casement` — ZSeven-W's winit fork (sibling repo, local path for -# now). The `package` key keeps the `winit` import name. `glutin-winit` +# `casement` — ZSeven-W's winit fork (vendored as a submodule under +# `vendor/casement` so CI checks out the same source the desktop binary +# links). The `package` key keeps the `winit` import name. `glutin-winit` # is intentionally NOT used: it hard-depends on the upstream `winit` # package, which would pull a second, incompatible winit into the # tree. Its only use here — `GlWindow::build_surface_attributes` — is # replaced by a direct `glutin::surface::SurfaceAttributesBuilder` # call in `context/provider.rs`. -winit = { package = "casement", path = "../../../winit", default-features = false, features = [ +winit = { package = "casement", path = "../../vendor/casement", default-features = false, features = [ "x11", "wayland", "wayland-csd-adwaita", diff --git a/vendor/casement b/vendor/casement new file mode 160000 index 00000000..5877fa83 --- /dev/null +++ b/vendor/casement @@ -0,0 +1 @@ +Subproject commit 5877fa83e8f7c5ce81afec234c1cd5146262a92e