ZIm/crates/collab/src
Antonio Scandurra 9c9bf07e40 Create buffers for remote collaborators out of band
Previously, we would use `Project::serialize_buffer_for_peer` and
`Project::deserialize_buffer` respectively in the host and in the
guest to create a new buffer or just send its ID if the host thought
the buffer had already been sent.

These methods would be called as part of other methods, such as
`Project::open_buffer_by_id` or `Project::open_buffer_for_symbol`.
However, if any of the tasks driving the futures that eventually
called `Project::deserialize_buffer` were dropped after the host
responded with the buffer state but (crucially) before the guest
deserialized it and registered it, there could be a situation where
the host thought the guest had the buffer (thus sending them just the
buffer id) and the guest would wait indefinitely.

Given how crucial this interaction is, this commit switches to creating
remote buffers for peers out of band. The host will push buffers to guests,
who will always refer to buffers via IDs and wait for the host to send them,
as opposed to including the buffer's payload as part of some other operation.
2022-08-17 11:55:36 +02:00
..
bin Add bootstrap script, avoid hard-coding zed team members 2022-08-15 13:25:31 -07:00
rpc One big cleanup pass of clippy lints 2022-08-10 16:51:01 -07:00
api.rs One big cleanup pass of clippy lints 2022-08-10 16:51:01 -07:00
auth.rs One big cleanup pass of clippy lints 2022-08-10 16:51:01 -07:00
db.rs Ensure a deterministic order to project activity summaries 2022-08-15 15:23:12 -07:00
env.rs Rename zed-server to collab 2022-04-09 08:30:42 -06:00
errors.rs Remove more unused code related to GitHub auth and errors 2022-04-21 08:57:49 -06:00
integration_tests.rs Add failing unit test for buffer opening cancellation 2022-08-17 11:55:34 +02:00
lib.rs Fix failing seed bin build and add bin builds to ci pipeline 2022-05-26 15:41:24 -07:00
main.rs Add an API that returns the most active users and the projects where they've been active 2022-06-20 19:46:37 -07:00
rpc.rs Create buffers for remote collaborators out of band 2022-08-17 11:55:36 +02:00