From a5bc6b845d65fbf1ace5307bfd9005469dce629c Mon Sep 17 00:00:00 2001 From: Hunter B Date: Mon, 21 Sep 2026 09:35:30 -0700 Subject: [PATCH] chore(tui): name windows::core::BOOL and drop the direct windows-core dependency crates/tui declared windows-core as a direct dependency for one import: window_control.rs named `windows_core::BOOL` for the EnumWindows callback. The manifest comment said `windows` does not re-export BOOL, but it does: plugins/registry.rs in this same crate already imports `windows::core::{BOOL, PCWSTR}` and compiles on the Windows lane. The separate pin is what broke dependabot's #6359. It bumped windows-core to 0.100 while `windows` stayed at 0.62, so the callback's BOOL (windows-core 0.100) no longer matched the BOOL that `windows` 0.62's EnumWindows expects (windows-core 0.62): E0308 on the Windows compile. Naming the type through `windows` keeps a single windows-core in the graph, chosen by `windows`. Validation: `cargo metadata --locked` exits 0 and the Cargo.lock delta is the single removed `windows-core` edge under codewhale-tui. The changed code is cfg(windows) and cannot be compiled on the macOS host, so the Windows CI lane is the compile receipt for this change. Supersedes #6359 Co-Authored-By: Claude Fable 5.1 --- Cargo.lock | 1 - crates/tui/Cargo.toml | 5 ----- crates/tui/src/tui/window_control.rs | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2d6599d13b..0a62771c61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1224,7 +1224,6 @@ dependencies = [ "wait-timeout", "webbrowser", "windows", - "windows-core", "windows-sys 0.61.2", "wiremock", ] diff --git a/crates/tui/Cargo.toml b/crates/tui/Cargo.toml index 8cf080f35d..e4a036583f 100644 --- a/crates/tui/Cargo.toml +++ b/crates/tui/Cargo.toml @@ -162,8 +162,3 @@ objc2-foundation = { version = "0.3.2", default-features = false, features = ["s [target.'cfg(target_os = "windows")'.dependencies] windows = { version = "0.62", features = ["Win32_Foundation", "Win32_Media_Audio", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Environment", "Win32_System_JobObjects", "Win32_System_Registry", "Win32_System_Threading", "Win32_UI_WindowsAndMessaging"] } -# `windows` re-exports most of windows-core's types but not all of them -# (BOOL, HRESULT, … live in windows-core itself); window_control.rs names -# windows_core::BOOL for the EnumWindows callback, so it must be a direct -# dependency. Version already resolved via `windows` — no extra build work. -windows-core = { version = "0.62" } diff --git a/crates/tui/src/tui/window_control.rs b/crates/tui/src/tui/window_control.rs index a80eab92ac..9acfe79acb 100644 --- a/crates/tui/src/tui/window_control.rs +++ b/crates/tui/src/tui/window_control.rs @@ -56,7 +56,7 @@ mod imp { SW_RESTORE, SWP_ASYNCWINDOWPOS, SWP_NOACTIVATE, SWP_NOMOVE, SWP_NOSIZE, SWP_SHOWWINDOW, SetWindowPos, ShowWindowAsync, WINDOWINFO, WS_EX_TOPMOST, WS_MAXIMIZE, }; - use windows_core::BOOL; + use windows::core::BOOL; /// Pin state: remembers the pre-pin window rect so unpinning restores it, /// plus whether the window was maximized (unpin restores maximized then,