Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
More progress and some debug logs to remove
Conrad Irwinf6bc229d1d4f
diff --git a/assets/settings/default.json b/assets/settings/default.jsonindex 8fb73a2ecb0..cc724657c0c 100644--- a/assets/settings/default.json+++ b/assets/settings/default.json@@ -76,7 +76,7 @@// Settings related to calls in Zed"calls": {// Join calls with the microphone muted by default- "mute_on_join": true+ "mute_on_join": false},// Scrollbar related settings"scrollbar": {diff --git a/crates/util/src/channel.rs b/crates/util/src/channel.rsindex 2364dcaad48..47c6a570a1f 100644--- a/crates/util/src/channel.rs+++ b/crates/util/src/channel.rs@@ -44,9 +44,9 @@ impl ReleaseChannel {pub fn url_scheme(&self) -> &'static str {match self {- ReleaseChannel::Dev => "zed-dev:/",- ReleaseChannel::Preview => "zed-preview:/",- ReleaseChannel::Stable => "zed:/",+ ReleaseChannel::Dev => "zed-dev://",+ ReleaseChannel::Preview => "zed-preview://",+ ReleaseChannel::Stable => "zed://",}}diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex a1249173090..1644f86b61c 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -47,6 +47,7 @@ use std::{any::TypeId,borrow::Cow,cmp, env,+ fs::OpenOptions,future::Future,path::{Path, PathBuf},rc::Rc,@@ -4161,6 +4162,7 @@ async fn join_channel_internal(active_call: &ModelHandle<ActiveCall>,cx: &mut AsyncAppContext,) -> Result<bool> {+ dbg!("join channel internal");let should_prompt = active_call.read_with(cx, |active_call, cx| {let Some(room) = active_call.room().map(|room| room.read(cx)) else {return false;@@ -4193,6 +4195,7 @@ async fn join_channel_internal(return Ok(false); // unreachable!() hopefully}}+ dbg!("asdajdkjkasd");let client = cx.read(|cx| active_call.read(cx).client());@@ -4218,13 +4221,17 @@ async fn join_channel_internal(}}+ dbg!("past here");+let room = active_call.update(cx, |active_call, cx| {active_call.join_channel(channel_id, cx)}).await?;- room.update(cx, |room, cx| room.next_room_update()).await;+ room.update(cx, |room, _| room.next_room_update()).await;++ dbg!("wow");let task = room.update(cx, |room, cx| {if let Some((project, host)) = room.most_active_project() {@@ -4237,7 +4244,16 @@ async fn join_channel_internal(task.await?;return anyhow::Ok(true);}-+ use std::io::Write;+ writeln!(+ OpenOptions::new()+ .write(true)+ .append(true)+ .open("/Users/conrad/dbg")+ .unwrap(),+ "no jokes"+ )+ .unwrap();anyhow::Ok(false)}@@ -4257,6 +4273,7 @@ pub fn join_channel(&mut cx,).await;+ dbg!("joined!");// join channel succeeded, and opened a windowif matches!(result, Ok(true)) {diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rsindex 52aaf639ea4..f25a1e14be0 100644--- a/crates/zed/src/main.rs+++ b/crates/zed/src/main.rs@@ -66,6 +66,15 @@ use crate::open_url::{OpenListener, OpenRequest};mod open_url;fn main() {+ writeln!(+ OpenOptions::new()+ .write(true)+ .append(true)+ .open("/Users/conrad/dbg")+ .unwrap(),+ "HELLO"+ )+ .unwrap();let http = http::client();init_paths();init_logger();@@ -270,6 +279,7 @@ fn main() {}OpenRequest::JoinChannel { channel_id } => cx.update(|cx| {+ dbg!("joining channel");workspace::join_channel(channel_id, app_state.clone(), None, cx)}).detach(),diff --git a/crates/zed/src/open_url.rs b/crates/zed/src/open_url.rsindex 3e4902b9785..8cad217a8c9 100644--- a/crates/zed/src/open_url.rs+++ b/crates/zed/src/open_url.rs@@ -3,6 +3,8 @@ use cli::{ipc::IpcSender, CliRequest, CliResponse};use futures::channel::mpsc;use futures::channel::mpsc::{UnboundedReceiver, UnboundedSender};use std::ffi::OsStr;+use std::fs::OpenOptions;+use std::io::Write;use std::os::unix::prelude::OsStrExt;use std::sync::atomic::Ordering;use std::{path::PathBuf, sync::atomic::AtomicBool};@@ -41,6 +43,16 @@ impl OpenListener {}pub fn open_urls(&self, urls: Vec<String>) {+ writeln!(+ OpenOptions::new()+ .write(true)+ .append(true)+ .open("/Users/conrad/dbg")+ .unwrap(),+ "{:?}",+ &urls,+ )+ .unwrap();self.triggered.store(true, Ordering::Release);let request = if let Some(server_name) =urls.first().and_then(|url| url.strip_prefix("zed-cli://"))@@ -79,6 +91,7 @@ impl OpenListener {}}}+ log::error!("invalid zed url: {}", request_path);None}