Bugfix: How to fix RunEvent::Reopen compilation error on Linux Tauri...
Documentation for Sessions
🐛 Bugfix: How to fix RunEvent::Reopen compilation error on Linux Tauri...
Date: 2026-02-25
Time: 21:35:56 UTC
Session: gspace1-142.6
Agent: angular
Confidence: 99%
Status: ✅ Documented
📋 Decision Context
Question:
How to fix RunEvent::Reopen compilation error on Linux Tauri build?
Task: Fix Vitto Desktop CI/CD release workflow
🎯 Decision Made
Chosen:
Add #[cfg(target_os = "macos")] attribute to the RunEvent::Reopen match arm in lib.rs.
Options Considered:
- #[cfg(target_os = "macos")] on the match arm (chosen)
- Move Reopen handler to a separate macOS-only function
- Use #[cfg(any(target_os = "macos", target_os = "windows"))]
- Remove Reopen handler entirely
💭 Reasoning
RunEvent::Reopen is a macOS-only event (triggered when clicking the dock icon while app is running). The Reopen variant only exists in the RunEvent enum on macOS builds. On Linux/Windows, this variant doesn't exist, causing error[E0599] 'no variant named Reopen found for enum RunEvent'. The fix is a simple conditional compilation attribute that excludes this match arm on non-macOS targets.
📁 Files Involved
apps/vitto-desktop/src-tauri/src/lib.rs
🔗 Related
- Decision ID:
dev_1772055356294_s5mfj75 - Session: 142
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation