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:

  1. #[cfg(target_os = "macos")] on the match arm (chosen)
  2. Move Reopen handler to a separate macOS-only function
  3. Use #[cfg(any(target_os = "macos", target_os = "windows"))]
  4. 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


🔗 Related


Auto-generated by MCP Smart Consolidation