Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
code review
Conrad Irwin8922437fcd0a
diff --git a/crates/call/src/room.rs b/crates/call/src/room.rsindex b7aeee90e20..32b8232b4f7 100644--- a/crates/call/src/room.rs+++ b/crates/call/src/room.rs@@ -878,7 +878,7 @@ impl Room {Ok(())}- pub fn next_room_update(&mut self) -> impl Future<Output = ()> {+ pub fn room_update_completed(&mut self) -> impl Future<Output = ()> {let mut done_rx = self.room_update_completed_rx.clone();async move {while let Some(result) = done_rx.next().await {diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex e690757af71..c021384d910 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -47,7 +47,6 @@ use std::{any::TypeId,borrow::Cow,cmp, env,- fs::OpenOptions,future::Future,path::{Path, PathBuf},rc::Rc,@@ -4246,7 +4245,8 @@ async fn join_channel_internal(}).await?;- room.update(cx, |room, _| room.next_room_update()).await;+ room.update(cx, |room, _| room.room_update_completed())+ .await;let task = room.update(cx, |room, cx| {if let Some((project, host)) = room.most_active_project(cx) {@@ -4259,16 +4259,6 @@ 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)}diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.tomlindex 3c93462d4b9..7eb14559be8 100644--- a/crates/zed/Cargo.toml+++ b/crates/zed/Cargo.toml@@ -156,7 +156,7 @@ workspace = { path = "../workspace", features = ["test-support"] }unindent.workspace = true-[package.metadata.bundle]+[package.metadata.bundle-dev]icon = ["resources/[email protected]", "resources/app-icon-preview.png"]identifier = "dev.zed.Zed-Dev"name = "Zed Dev"diff --git a/crates/zed/resources/zed.entitlements b/crates/zed/resources/zed.entitlementsindex 9f5414243de..f40a8a253ad 100644--- a/crates/zed/resources/zed.entitlements+++ b/crates/zed/resources/zed.entitlements@@ -2,8 +2,6 @@<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>- <key>com.apple.developer.associated-domains</key>- <array><string>applinks:cirw.in</string></array><key>com.apple.security.automation.apple-events</key><true/><key>com.apple.security.cs.allow-jit</key>@@ -12,8 +10,14 @@<true/><key>com.apple.security.device.camera</key><true/>- <key>com.apple.security.keychain-access-groups</key>- <array><string>MQ55VZLNZQ.dev.zed.Shared</string></array>+ <key>com.apple.security.personal-information.addressbook</key>+ <true/>+ <key>com.apple.security.personal-information.calendars</key>+ <true/>+ <key>com.apple.security.personal-information.location</key>+ <true/>+ <key>com.apple.security.personal-information.photos-library</key>+ <true/><!-- <key>com.apple.security.cs.disable-library-validation</key><true/> --></dict>diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rsindex 004e5769d57..a75caa54f6e 100644--- a/crates/zed/src/main.rs+++ b/crates/zed/src/main.rs@@ -61,20 +61,11 @@ use zed::{only_instance::{ensure_only_instance, IsOnlyInstance},};-use crate::open_url::{OpenListener, OpenRequest};+use crate::open_listener::{OpenListener, OpenRequest};-mod open_url;+mod open_listener;fn main() {- writeln!(- OpenOptions::new()- .write(true)- .append(true)- .open("/Users/conrad/dbg")- .unwrap(),- "HELLO"- )- .unwrap();let http = http::client();init_paths();init_logger();diff --git a/crates/zed/src/open_url.rs b/crates/zed/src/open_listener.rssimilarity index 92%rename from crates/zed/src/open_url.rsrename to crates/zed/src/open_listener.rsindex 8cad217a8c9..e3c08ff2c8e 100644--- a/crates/zed/src/open_url.rs+++ b/crates/zed/src/open_listener.rs@@ -43,16 +43,6 @@ 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://"))