mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Linux release builds use MenuBuilder for the shared tray menu, while MenuItemBuilder and SubmenuBuilder are only used in the macOS native menu bar. Gate only the macOS-only imports so Linux builds no longer warn about them and still compile the shared tray path. Constraint: Linux builds compile the shared tray setup path and require MenuBuilder Constraint: MenuItemBuilder and SubmenuBuilder are only referenced inside cfg(target_os = "macos") Rejected: Gate the whole tauri::menu import on macOS | Linux still needs MenuBuilder for tray menu construction Confidence: high Scope-risk: narrow Directive: Do not gate MenuBuilder by platform unless setup_system_tray is also made platform-specific Tested: cargo fmt --check Tested: git diff --check Not-tested: Local Linux cargo check beyond system GTK/WebKit pkg-config setup; GitHub release Linux job is the verification surface