Commit graph

1014 commits

Author SHA1 Message Date
Antonio Scandurra
2fa63a3a50 Start on in-memory fs 2021-07-09 14:20:33 +02:00
Antonio Scandurra
4dae17a4cf Extract an Fs trait in Worktree 2021-07-09 10:58:07 +02:00
Max Brunsfeld
60ef74a18f Use select_biased! in Peer to avoid non-determinism 2021-07-08 22:09:02 -07:00
Max Brunsfeld
b2aa961b4f Allow rpc client to connect to an in-memory stream
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-08 17:38:54 -07:00
Max Brunsfeld
8b58c165a7 Re-export zed-rpc's test support items from zed's test support 2021-07-08 17:38:54 -07:00
Max Brunsfeld
2965fce70d Avoid panic when spawn is called after run exits in deterministic executor 2021-07-08 17:38:54 -07:00
Max Brunsfeld
9bfa5b62f2 Add a 'seed' parameter to gpui::test macro
This lets you control the starting seed
2021-07-08 17:38:54 -07:00
Max Brunsfeld
140c8833fe Start work on a deterministic executor for tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-08 13:39:24 -07:00
Antonio Scandurra
1f89b45b56
Merge pull request #106 from zed-industries/remote-conflict-indicator
Relay the saved mtime when saving a buffer
2021-07-08 17:51:28 +02:00
Antonio Scandurra
f1ce507ed4
Merge pull request #104 from zed-industries/double-buffer
Avoid adding the same entry when concurrently opening it more than once
2021-07-08 17:51:19 +02:00
Antonio Scandurra
792926c675
Merge pull request #100 from zed-industries/fix-url-to-path-conversion
Fix URL to `PathBuf` conversion in `mac::Platform`
2021-07-08 17:51:09 +02:00
Antonio Scandurra
d82411e539 Relay the saved mtime when saving a buffer 2021-07-08 15:49:41 +02:00
Antonio Scandurra
f55718cd18 Avoid adding the same entry when concurrently opening it more than once 2021-07-08 14:40:32 +02:00
Max Brunsfeld
f46c0a790e Improve support for gpui tests that need multiple contexts
If a test function takes multiple contexts, pass it however many
distinct contexts are needed. Construct each one with a different
starting entity id so that they do not share any entity ids.
2021-07-07 17:18:42 -07:00
Antonio Scandurra
7335e70eb7 Use async-tungstenite's built-in TLS connector
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-07 19:55:26 +02:00
Antonio Scandurra
024684e46c Improve logging when there is an error in the RPC layer
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-07 19:36:53 +02:00
Antonio Scandurra
d0660f41de Remove REST endpoints from zed-rpc
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-07 18:53:00 +02:00
Antonio Scandurra
cb9002254f Use a websocket to connect to the server
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-07 18:49:38 +02:00
Antonio Scandurra
4466b6b76a Refactor zed-rpc to work with websockets 2021-07-07 18:23:18 +02:00
Antonio Scandurra
ee962eab9b Revert "Start work on handling TLS for the RPC endpoint"
This reverts commit 193c704875.
2021-07-07 15:19:00 +02:00
Max Brunsfeld
193c704875 Start work on handling TLS for the RPC endpoint 2021-07-06 16:27:57 -07:00
Antonio Scandurra
75fc371f36 Ensure returned URLs are files before returning them in path prompts 2021-07-06 16:08:19 +02:00
Antonio Scandurra
ed1eb24ee2 Convert URLs to paths returned from NSSavePanel using [Url path] 2021-07-06 15:54:42 +02:00
Antonio Scandurra
39d3b21780 Convert URLs to paths returned from NSOpenPanel using [Url path] 2021-07-06 15:54:29 +02:00
Antonio Scandurra
59fe0549cc Replace paths_by_id with an entries_by_id sum tree 2021-07-06 12:41:31 +02:00
Antonio Scandurra
3ce2bea63a Unify maintenance of open buffers into Worktree::poll_snapshot 2021-07-06 10:38:39 +02:00
Max Brunsfeld
58eefcd331 Add ModelHandle::spawn_weak, fix worktree leak from spawn call 2021-07-05 17:55:52 -07:00
Max Brunsfeld
65e4e78cd7 Add unit test for worktree update messages, fix minor issues
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-05 17:55:48 -07:00
Nathan Sobo
73db910a95 Process remote worktree updates in the background
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-05 14:20:53 -06:00
Nathan Sobo
036dcd50fd Start on applying remote worktree updates in the background
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-05 13:44:42 -06:00
Antonio Scandurra
53adaa77c1 Propagate file system changes to remote worktrees 2021-07-05 17:54:48 +02:00
Antonio Scandurra
2a779d3529 Rename {Add,Remove}Guest to {Add,Remove}Peer 2021-07-05 10:24:39 +02:00
Antonio Scandurra
61222b4fe5 Expose Client::disconnect to force disconnection 2021-07-05 10:18:12 +02:00
Max Brunsfeld
899b9cd5ad Avoid deadlocks on rpc state by switching to an RwLock 2021-07-02 15:55:16 -07:00
Max Brunsfeld
08991db882 Implement Copy for peer::Receipt 2021-07-02 15:54:42 -07:00
Max Brunsfeld
a7f812e059 Avoid circular model update in save_buffer handler 2021-07-02 15:53:45 -07:00
Max Brunsfeld
86b9ab4505 Construct remote worktree snapshots in the background 2021-07-02 15:22:58 -07:00
Antonio Scandurra
569a4a1e2d WIP: Save remote buffers 2021-07-02 17:02:17 +02:00
Antonio Scandurra
b8bddd6c05 Fix tests 2021-07-02 15:18:08 +02:00
Antonio Scandurra
7ae1d9e997 Send also the currently active selection sets when serializing a buffer 2021-07-02 11:29:36 +02:00
Max Brunsfeld
9d51fe88e9 Serialize RPC sends and responses using a channel 2021-07-01 22:02:27 -07:00
Max Brunsfeld
42f7867f6e Avoid spurious error logging when host edits buffers not open by guests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-01 11:23:51 -07:00
Antonio Scandurra
e95936c624 Fix memory leak of Editor due to blinking cursors
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-01 15:57:17 +02:00
Antonio Scandurra
da7bd8439b Report SelectionSet deletion operations correctly 2021-07-01 12:54:16 +02:00
Antonio Scandurra
c881c7f30f Start on rendering remote selections 2021-07-01 11:21:43 +02:00
Antonio Scandurra
e07065265d Expose Worktree::{peers,replica_id} 2021-07-01 09:36:09 +02:00
Antonio Scandurra
ed9036f3fc Send a CloseWorktree message when a shared Worktree is dropped 2021-06-30 17:00:29 +02:00
Antonio Scandurra
1d53d43d6f Store online peers when joining a worktree 2021-06-30 15:07:33 +02:00
Antonio Scandurra
7704291432 Maintain a set of peers as they join and leave the worktree 2021-06-30 13:22:22 +02:00
Antonio Scandurra
ab089b6575 Avoid logging errors in RPC message handlers
The `on_message` helper already logs when an error occurs.
2021-06-30 12:05:58 +02:00