diff options
Diffstat (limited to 'editors/zed/files')
16 files changed, 374 insertions, 11 deletions
diff --git a/editors/zed/files/patch-Cargo.lock b/editors/zed/files/patch-Cargo.lock index 81437286e591..90fb39c65279 100644 --- a/editors/zed/files/patch-Cargo.lock +++ b/editors/zed/files/patch-Cargo.lock @@ -1,23 +1,134 @@ ---- Cargo.lock.orig 2025-08-08 18:43:10 UTC +--- Cargo.lock.orig 2025-11-15 04:02:09 UTC +++ Cargo.lock -@@ -8554,17 +8554,16 @@ name = "ipc-channel" +@@ -8378,21 +8378,20 @@ name = "ipc-channel" [[package]] name = "ipc-channel" -version = "0.19.0" -+version = "0.20.1" ++version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8251fb7bcd9ccd3725ed8deae9fe7db8e586495c9eb5b0c52e6233e5e75ea" -+checksum = "1700f6b8b9f00cdd675f32fbb3a5be882213140dfe045805273221ca266c43f8" ++checksum = "f93600b5616c2d075f8af8dbd23c1d69278c5d24e4913d220cbc60b14c95c180" dependencies = [ - "bincode", + "bincode 1.3.3", "crossbeam-channel", "fnv", - "lazy_static", "libc", - "mio", + "mio 1.1.0", - "rand 0.8.5", -+ "rand 0.9.1", ++ "rand 0.9.2", "serde", "tempfile", "uuid", +- "windows 0.58.0", ++ "windows 0.61.3", + ] + + [[package]] +@@ -19790,16 +19789,6 @@ name = "windows" + + [[package]] + name = "windows" +-version = "0.58.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +-dependencies = [ +- "windows-core 0.58.0", +- "windows-targets 0.52.6", +-] +- +-[[package]] +-name = "windows" + version = "0.61.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +@@ -19858,19 +19847,6 @@ name = "windows-core" + + [[package]] + name = "windows-core" +-version = "0.58.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +-dependencies = [ +- "windows-implement 0.58.0", +- "windows-interface 0.58.0", +- "windows-result 0.2.0", +- "windows-strings 0.1.0", +- "windows-targets 0.52.6", +-] +- +-[[package]] +-name = "windows-core" + version = "0.61.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +@@ -19919,17 +19895,6 @@ name = "windows-implement" + + [[package]] + name = "windows-implement" +-version = "0.58.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +-dependencies = [ +- "proc-macro2", +- "quote", +- "syn 2.0.106", +-] +- +-[[package]] +-name = "windows-implement" + version = "0.60.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +@@ -19952,17 +19917,6 @@ name = "windows-interface" + + [[package]] + name = "windows-interface" +-version = "0.58.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +-dependencies = [ +- "proc-macro2", +- "quote", +- "syn 2.0.106", +-] +- +-[[package]] +-name = "windows-interface" + version = "0.59.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +@@ -20038,15 +19992,6 @@ name = "windows-result" + + [[package]] + name = "windows-result" +-version = "0.2.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +-dependencies = [ +- "windows-targets 0.52.6", +-] +- +-[[package]] +-name = "windows-result" + version = "0.3.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +@@ -20061,16 +20006,6 @@ dependencies = [ + checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" + dependencies = [ + "windows-link 0.2.1", +-] +- +-[[package]] +-name = "windows-strings" +-version = "0.1.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +-dependencies = [ +- "windows-result 0.2.0", +- "windows-targets 0.52.6", + ] + + [[package]] diff --git a/editors/zed/files/patch-crates_cli_Cargo.toml b/editors/zed/files/patch-crates_cli_Cargo.toml index 6729ec12eb78..6b856471c9bc 100644 --- a/editors/zed/files/patch-crates_cli_Cargo.toml +++ b/editors/zed/files/patch-crates_cli_Cargo.toml @@ -1,11 +1,11 @@ ---- crates/cli/Cargo.toml.orig 2025-08-03 07:08:44 UTC +--- crates/cli/Cargo.toml.orig 2025-11-15 04:01:33 UTC +++ crates/cli/Cargo.toml -@@ -24,7 +24,7 @@ collections.workspace = true - anyhow.workspace = true +@@ -25,7 +25,7 @@ collections.workspace = true + askpass.workspace = true clap.workspace = true collections.workspace = true -ipc-channel = "0.19" -+ipc-channel = "0.20.1" ++ipc-channel = "0.20.2" parking_lot.workspace = true paths.workspace = true release_channel.workspace = true diff --git a/editors/zed/files/patch-crates_fs_src_fs.rs b/editors/zed/files/patch-crates_fs_src_fs.rs new file mode 100644 index 000000000000..6e1826cf7b49 --- /dev/null +++ b/editors/zed/files/patch-crates_fs_src_fs.rs @@ -0,0 +1,14 @@ +--- crates/fs/src/fs.rs.orig 2025-11-15 04:52:04 UTC ++++ crates/fs/src/fs.rs +@@ -309,7 +309,10 @@ impl FileHandle for std::fs::File { + + let fd = self.as_fd(); + let mut kif = MaybeUninit::<libc::kinfo_file>::uninit(); +- kif.kf_structsize = libc::KINFO_FILE_SIZE; ++ unsafe { ++ std::ptr::write_bytes(kif.as_mut_ptr(), 0, 1); ++ (*kif.as_mut_ptr()).kf_structsize = libc::KINFO_FILE_SIZE; ++ } + + let result = unsafe { libc::fcntl(fd.as_raw_fd(), libc::F_KINFO, kif.as_mut_ptr()) }; + if result == -1 { diff --git a/editors/zed/files/patch-crates_fs_src_fs__watcher.rs b/editors/zed/files/patch-crates_fs_src_fs__watcher.rs new file mode 100644 index 000000000000..46e20b340014 --- /dev/null +++ b/editors/zed/files/patch-crates_fs_src_fs__watcher.rs @@ -0,0 +1,20 @@ +--- crates/fs/src/fs_watcher.rs.orig 2025-11-15 04:58:18 UTC ++++ crates/fs/src/fs_watcher.rs +@@ -70,7 +70,7 @@ impl Watcher for FsWatcher { + return Ok(()); + } + } +- #[cfg(target_os = "linux")] ++ #[cfg(any(target_os = "linux", target_os = "freebsd"))] + { + log::trace!("path to watch is already watched: {path:?}"); + if self.registrations.lock().contains_key(path) { +@@ -83,7 +83,7 @@ impl Watcher for FsWatcher { + + #[cfg(target_os = "windows")] + let mode = notify::RecursiveMode::Recursive; +- #[cfg(target_os = "linux")] ++ #[cfg(any(target_os = "linux", target_os = "freebsd"))] + let mode = notify::RecursiveMode::NonRecursive; + + let registration_id = global({ diff --git a/editors/zed/files/patch-crates_gpui_examples_layer__shell.rs b/editors/zed/files/patch-crates_gpui_examples_layer__shell.rs new file mode 100644 index 000000000000..9ed9afee3ec4 --- /dev/null +++ b/editors/zed/files/patch-crates_gpui_examples_layer__shell.rs @@ -0,0 +1,18 @@ +--- crates/gpui/examples/layer_shell.rs.orig 2025-11-15 06:20:54 UTC ++++ crates/gpui/examples/layer_shell.rs +@@ -1,12 +1,12 @@ fn main() { + fn main() { +- #[cfg(all(target_os = "linux", feature = "wayland"))] ++ #[cfg(all(any(target_os = "linux", target_os = "freebsd"), feature = "wayland"))] + example::main(); + +- #[cfg(not(all(target_os = "linux", feature = "wayland")))] ++ #[cfg(not(all(any(target_os = "linux", target_os = "freebsd"), feature = "wayland")))] + panic!("This example requires the `wayland` feature and a linux system."); + } + +-#[cfg(all(target_os = "linux", feature = "wayland"))] ++#[cfg(all(any(target_os = "linux", target_os = "freebsd"), feature = "wayland"))] + mod example { + use std::time::{Duration, SystemTime, UNIX_EPOCH}; + diff --git a/editors/zed/files/patch-crates_gpui_src_platform.rs b/editors/zed/files/patch-crates_gpui_src_platform.rs new file mode 100644 index 000000000000..9b4cc0975678 --- /dev/null +++ b/editors/zed/files/patch-crates_gpui_src_platform.rs @@ -0,0 +1,20 @@ +--- crates/gpui/src/platform.rs.orig 2025-11-15 04:46:05 UTC ++++ crates/gpui/src/platform.rs +@@ -82,7 +82,7 @@ pub(crate) use windows::*; + #[cfg(target_os = "windows")] + pub(crate) use windows::*; + +-#[cfg(all(target_os = "linux", feature = "wayland"))] ++#[cfg(all(any(target_os = "linux", target_os = "freebsd"), feature = "wayland"))] + pub use linux::layer_shell; + + #[cfg(any(test, feature = "test-support"))] +@@ -1320,7 +1320,7 @@ pub enum WindowKind { + + /// A Wayland LayerShell window, used to draw overlays or backgrounds for applications such as + /// docks, notifications or wallpapers. +- #[cfg(all(target_os = "linux", feature = "wayland"))] ++ #[cfg(all(any(target_os = "linux", target_os = "freebsd"), feature = "wayland"))] + LayerShell(layer_shell::LayerShellOptions), + } + diff --git a/editors/zed/files/patch-crates_gpui_src_platform_blade_blade__renderer.rs b/editors/zed/files/patch-crates_gpui_src_platform_blade_blade__renderer.rs new file mode 100644 index 000000000000..b93698633fff --- /dev/null +++ b/editors/zed/files/patch-crates_gpui_src_platform_blade_blade__renderer.rs @@ -0,0 +1,11 @@ +--- crates/gpui/src/platform/blade/blade_renderer.rs.orig 2025-11-15 06:23:16 UTC ++++ crates/gpui/src/platform/blade/blade_renderer.rs +@@ -436,7 +436,7 @@ impl BladeRenderer { + && !self.gpu.wait_for(&last_sp, MAX_FRAME_TIME_MS) + { + log::error!("GPU hung"); +- #[cfg(target_os = "linux")] ++ #[cfg(any(target_os = "linux", target_os = "freebsd"))] + if self.gpu.device_information().driver_name == "radv" { + log::error!( + "there's a known bug with amdgpu/radv, try setting ZED_PATH_SAMPLE_COUNT=0 as a workaround" diff --git a/editors/zed/files/patch-crates_gpui_src_text__system.rs b/editors/zed/files/patch-crates_gpui_src_text__system.rs new file mode 100644 index 000000000000..b99ea3b0793a --- /dev/null +++ b/editors/zed/files/patch-crates_gpui_src_text__system.rs @@ -0,0 +1,11 @@ +--- crates/gpui/src/text_system.rs.orig 2025-11-15 06:24:54 UTC ++++ crates/gpui/src/text_system.rs +@@ -44,7 +44,7 @@ pub(crate) const SUBPIXEL_VARIANTS_Y: u8 = + pub(crate) const SUBPIXEL_VARIANTS_X: u8 = 4; + + pub(crate) const SUBPIXEL_VARIANTS_Y: u8 = +- if cfg!(target_os = "windows") || cfg!(target_os = "linux") { ++ if cfg!(target_os = "windows") || cfg!(target_os = "linux") || cfg!(target_os = "freebsd") { + 1 + } else { + SUBPIXEL_VARIANTS_X diff --git a/editors/zed/files/patch-crates_project_src_agent__server__store.rs b/editors/zed/files/patch-crates_project_src_agent__server__store.rs new file mode 100644 index 000000000000..6acc5fd6868e --- /dev/null +++ b/editors/zed/files/patch-crates_project_src_agent__server__store.rs @@ -0,0 +1,20 @@ +--- crates/project/src/agent_server_store.rs.orig 2025-11-15 06:30:50 UTC ++++ crates/project/src/agent_server_store.rs +@@ -1343,6 +1343,8 @@ fn get_platform_info() -> Option<(&'static str, &'stat + "pc-windows-msvc" + } else if cfg!(target_os = "linux") { + "unknown-linux-gnu" ++ } else if cfg!(target_os = "freebsd") { ++ "unknown-freebsd" + } else { + return None; + }; +@@ -1429,6 +1431,8 @@ impl ExternalAgentServer for LocalExtensionArchiveAgen + "linux" + } else if cfg!(target_os = "windows") { + "windows" ++ } else if cfg!(target_os = "freebsd") { ++ "freebsd" + } else { + anyhow::bail!("unsupported OS"); + }; diff --git a/editors/zed/files/patch-crates_remote__server_Cargo.toml b/editors/zed/files/patch-crates_remote__server_Cargo.toml new file mode 100644 index 000000000000..e5b7f034984c --- /dev/null +++ b/editors/zed/files/patch-crates_remote__server_Cargo.toml @@ -0,0 +1,20 @@ +--- crates/remote_server/Cargo.toml.orig 2025-11-15 04:13:17 UTC ++++ crates/remote_server/Cargo.toml +@@ -67,12 +67,16 @@ rayon.workspace = true + thiserror.workspace = true + rayon.workspace = true + +-[target.'cfg(not(windows))'.dependencies] ++[target.'cfg(not(any(windows, target_os = "freebsd")))'.dependencies] + crashes.workspace = true + crash-handler.workspace = true + fork.workspace = true + libc.workspace = true + minidumper.workspace = true ++ ++[target.'cfg(target_os = "freebsd")'.dependencies] ++fork.workspace = true ++libc.workspace = true + + [dev-dependencies] + action_log.workspace = true diff --git a/editors/zed/files/patch-crates_remote__server_src_main.rs b/editors/zed/files/patch-crates_remote__server_src_main.rs new file mode 100644 index 000000000000..1deb2ab8a7b4 --- /dev/null +++ b/editors/zed/files/patch-crates_remote__server_src_main.rs @@ -0,0 +1,10 @@ +--- crates/remote_server/src/main.rs.orig 2025-11-15 04:26:31 UTC ++++ crates/remote_server/src/main.rs +@@ -36,6 +36,7 @@ fn main() -> anyhow::Result<()> { + return Ok(()); + } + ++ #[cfg(not(target_os = "freebsd"))] + if let Some(socket) = &cli.crash_handler { + crashes::crash_server(socket.as_path()); + return Ok(()); diff --git a/editors/zed/files/patch-crates_remote__server_src_unix.rs b/editors/zed/files/patch-crates_remote__server_src_unix.rs new file mode 100644 index 000000000000..5651c60c6719 --- /dev/null +++ b/editors/zed/files/patch-crates_remote__server_src_unix.rs @@ -0,0 +1,18 @@ +--- crates/remote_server/src/unix.rs.orig 2025-11-15 05:26:18 UTC ++++ crates/remote_server/src/unix.rs +@@ -347,6 +347,7 @@ pub fn execute_run( + + let app = gpui::Application::headless(); + let id = std::process::id().to_string(); ++ #[cfg(not(target_os = "freebsd"))] + app.background_executor() + .spawn(crashes::init(crashes::InitCrashHandler { + session_id: id, +@@ -562,6 +563,7 @@ pub(crate) fn execute_proxy( + let server_paths = ServerPaths::new(&identifier)?; + + let id = std::process::id().to_string(); ++ #[cfg(not(target_os = "freebsd"))] + smol::spawn(crashes::init(crashes::InitCrashHandler { + session_id: id, + zed_version: VERSION.to_owned(), diff --git a/editors/zed/files/patch-crates_zed_Cargo.toml b/editors/zed/files/patch-crates_zed_Cargo.toml new file mode 100644 index 000000000000..00e9ae35d37e --- /dev/null +++ b/editors/zed/files/patch-crates_zed_Cargo.toml @@ -0,0 +1,20 @@ +--- crates/zed/Cargo.toml.orig 2025-11-15 04:18:59 UTC ++++ crates/zed/Cargo.toml +@@ -43,7 +43,6 @@ copilot.workspace = true + command_palette.workspace = true + component.workspace = true + copilot.workspace = true +-crashes.workspace = true + dap_adapters.workspace = true + db.workspace = true + debug_adapter_extension.workspace = true +@@ -175,6 +174,9 @@ ashpd.workspace = true + + [target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies] + ashpd.workspace = true ++ ++[target.'cfg(not(target_os = "freebsd"))'.dependencies] ++crashes.workspace = true + + [dev-dependencies] + call = { workspace = true, features = ["test-support"] } diff --git a/editors/zed/files/patch-crates_zed_src_main.rs b/editors/zed/files/patch-crates_zed_src_main.rs new file mode 100644 index 000000000000..71fe4f854f1d --- /dev/null +++ b/editors/zed/files/patch-crates_zed_src_main.rs @@ -0,0 +1,34 @@ +--- crates/zed/src/main.rs.orig 2025-11-14 23:13:53 UTC ++++ crates/zed/src/main.rs +@@ -8,6 +8,7 @@ use collections::HashMap; + use client::{Client, ProxySettings, UserStore, parse_zed_link}; + use collab_ui::channel_view::ChannelView; + use collections::HashMap; ++#[cfg(not(target_os = "freebsd"))] + use crashes::InitCrashHandler; + use db::kvp::{GLOBAL_KEY_VALUE_STORE, KEY_VALUE_STORE}; + use editor::Editor; +@@ -174,6 +175,7 @@ pub fn main() { + } + + // `zed --crash-handler` Makes zed operate in minidump crash handler mode ++ #[cfg(not(target_os = "freebsd"))] + if let Some(socket) = &args.crash_handler { + crashes::crash_server(socket.as_path()); + return; +@@ -284,6 +286,7 @@ pub fn main() { + let session_id = Uuid::new_v4().to_string(); + let session = app.background_executor().block(Session::new()); + ++ #[cfg(not(target_os = "freebsd"))] + app.background_executor() + .spawn(crashes::init(InitCrashHandler { + session_id: session_id.clone(), +@@ -541,6 +544,7 @@ pub fn main() { + auto_update::init(client.http_client(), cx); + dap_adapters::init(cx); + auto_update_ui::init(cx); ++ #[cfg(not(target_os = "freebsd"))] + reliability::init( + client.http_client(), + system_id.as_ref().map(|id| id.to_string()), diff --git a/editors/zed/files/patch-crates_zed_src_reliability.rs b/editors/zed/files/patch-crates_zed_src_reliability.rs new file mode 100644 index 000000000000..72cc90fa734a --- /dev/null +++ b/editors/zed/files/patch-crates_zed_src_reliability.rs @@ -0,0 +1,26 @@ +--- crates/zed/src/reliability.rs.orig 2025-11-15 05:44:38 UTC ++++ crates/zed/src/reliability.rs +@@ -11,6 +11,7 @@ use util::ResultExt; + use std::{ffi::OsStr, fs, sync::Arc}; + use util::ResultExt; + ++#[cfg(not(target_os = "freebsd"))] + pub fn init(http_client: Arc<HttpClientWithUrl>, installation_id: Option<String>, cx: &mut App) { + #[cfg(target_os = "macos")] + monitor_main_thread_hangs(http_client.clone(), installation_id.clone(), cx); +@@ -272,6 +273,7 @@ pub fn monitor_main_thread_hangs( + .detach() + } + ++#[cfg(not(target_os = "freebsd"))] + pub async fn upload_previous_minidumps( + http: Arc<HttpClientWithUrl>, + installation_id: Option<String>, +@@ -311,6 +313,7 @@ pub async fn upload_previous_minidumps( + Ok(()) + } + ++#[cfg(not(target_os = "freebsd"))] + async fn upload_minidump( + http: Arc<HttpClientWithUrl>, + endpoint: &str, diff --git a/editors/zed/files/patch-crates_zed_src_zed.rs b/editors/zed/files/patch-crates_zed_src_zed.rs new file mode 100644 index 000000000000..630fcaa7dcee --- /dev/null +++ b/editors/zed/files/patch-crates_zed_src_zed.rs @@ -0,0 +1,10 @@ +--- crates/zed/src/zed.rs.orig 2025-11-15 05:42:34 UTC ++++ crates/zed/src/zed.rs +@@ -370,6 +370,7 @@ pub fn initialize_workspace( + if let Some(specs) = window.gpu_specs() { + log::info!("Using GPU: {:?}", specs); + show_software_emulation_warning_if_needed(specs.clone(), window, cx); ++ #[cfg(not(target_os = "freebsd"))] + if let Some((crash_server, message)) = crashes::CRASH_HANDLER + .get() + .zip(bincode::serialize(&specs).ok()) |
