Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
WIP
Antonio Scandurra0ede89d82a0d
diff --git a/crates/collab/migrations/20221219181850_project_reconnection_support.sql b/crates/collab/migrations/20221219181850_project_reconnection_support.sqlnew file mode 100644index 00000000000..6efef5571c5--- /dev/null+++ b/crates/collab/migrations/20221219181850_project_reconnection_support.sql@@ -0,0 +1,3 @@+ALTER TABLE "worktree_entries"+ ADD COLUMN "scan_id" INT8,+ ADD COLUMN "is_deleted" BOOL;diff --git a/crates/collab/src/integration_tests.rs b/crates/collab/src/integration_tests.rsindex 0c26486667f..4d08205b81d 100644--- a/crates/collab/src/integration_tests.rs+++ b/crates/collab/src/integration_tests.rs@@ -6077,6 +6077,7 @@ async fn test_random_collaboration(let mut user_ids = Vec::new();let mut op_start_signals = Vec::new();let mut next_entity_id = 100000;+ let mut can_disconnect = rng.lock().gen_bool(0.2);let mut operations = 0;while operations < max_operations {diff --git a/crates/rpc/proto/zed.proto b/crates/rpc/proto/zed.protoindex 9528bd10b7d..6da9d0a7fc5 100644--- a/crates/rpc/proto/zed.proto+++ b/crates/rpc/proto/zed.proto@@ -253,6 +253,15 @@ message ShareProjectResponse {uint64 project_id = 1;}+message ReshareProject {+ uint64 id = 1;+ repeated WorktreeMetadata worktrees = 2;+}++message ReshareProjectResponse {+ repeated Collaborator collaborators = 1;+}+message UnshareProject {uint64 project_id = 1;}@@ -273,6 +282,22 @@ message JoinProjectResponse {repeated LanguageServer language_servers = 4;}+message RejoinProject {+ uint64 project_id = 1;+ repeated RejoinWorktree worktrees = 2;+}++message RejoinWorktree {+ uint64 id = 1;+ uint64 scan_id = 2;+}++message RejoinProjectResponse {+ repeated WorktreeMetadata worktrees = 1;+ repeated Collaborator collaborators = 2;+ repeated LanguageServer language_servers = 3;+}+message LeaveProject {uint64 project_id = 1;}