From dae3e574e49baff324d8e708ce4de1b407717568 Mon Sep 17 00:00:00 2001 From: Zax71 <67716263+zax71@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:28:21 +0100 Subject: [PATCH] gpui_linux: Improve error message when X11 and Wayland feature flags are missing (#58685) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improves `gpui_linux` error messages for missing feature flags. Currently, you'd need to look at the source & Rust backtrace to diagnose the error shown when the feature flags are missing. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Improve `gpui_linux` error messages for missing feature flags --------- Co-authored-by: Tom Houlé --- crates/gpui_linux/src/linux.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/gpui_linux/src/linux.rs b/crates/gpui_linux/src/linux.rs index bafdc2e5241..7202248e376 100644 --- a/crates/gpui_linux/src/linux.rs +++ b/crates/gpui_linux/src/linux.rs @@ -52,6 +52,8 @@ pub fn current_platform(headless: bool) -> Rc { "Headless" => Rc::new(LinuxPlatform { inner: HeadlessClient::new(), }), - _ => unreachable!(), + _ => unreachable!( + r#"At least one of the "wayland" or "x11" features must be enabled on gpui_linux or gpui_platform."# + ), } }