Antonio Scandurra
a653e87658
WIP: Avoid converting RopeFingerprint into a string
...
Co-Authored-By: Petros Amoiridis <petros@zed.dev>
2023-01-18 12:22:08 +01:00
Antonio Scandurra
bb200aa082
Relay saved version metadata to ensure buffers modified state converges
2023-01-17 16:32:54 +01:00
Max Brunsfeld
41ff42ddec
Fix crash when restarting a language server after it reports an unknown buffer version
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-01-10 16:27:15 -08:00
Antonio Scandurra
95098e4f29
Update git diff base when synchronizing a guest's buffers
2023-01-08 09:10:57 -07:00
Antonio Scandurra
8487ae77e7
Share new worktrees when resharing project
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-01-06 12:58:19 -07:00
Antonio Scandurra
585c23e9f6
Match guest's reported buffers on host when synchronizing after reconnect
...
If the host thinks a guest has a buffer that they don't have, the host won't
send it to them when they attempt to open it the next time. This can happen
if the guest disconnected before they received the host's response to an
initial open buffer request.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-01-06 11:48:34 -07:00
Antonio Scandurra
0d31c8c1c8
Only share worktrees when UpdateProject
succeeded
2023-01-06 10:41:11 -07:00
Antonio Scandurra
8c5a0ca3a4
Couple worktree sharing with project metadata updates
2023-01-06 10:31:36 -07:00
Antonio Scandurra
5c05b7d413
Ensure initial project metadata is sent when first sharing a project
2023-01-06 10:18:26 -07:00
Nathan Sobo
4256a96051
Avoid holding project handle on a call that could hang
...
This fixes a leaked handle error.
2023-01-05 21:01:27 -07:00
Nathan Sobo
77e322cb75
Wait for incomplete buffers when handling incoming buffer file updates
2023-01-05 13:50:25 -07:00
Nathan Sobo
7a629769b7
Re-request incomplete remote buffers when syncing buffers
...
Any buffers we requested but that haven't been fully sent will cause
outstainding open requests to hang. If we re-request them, any
waiting open requests will resume when the requested buffers finish
being created.
Co-authored-by: Max Brunsfeld <max@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-01-04 16:00:43 -07:00
Nathan Sobo
789bbf15b7
Update buffer files when synchronizing buffers
...
It's possible that the host was disconnected when attempting to notify
guests of a file save, so we need to transmit this in order to correctly
update the file's mtime.
Next failing seed OPERATIONS=200 SEED=6894
2023-01-04 12:33:48 -07:00
Nathan Sobo
1dd085fc92
Introduce completed_scan_id to worktree
...
We need to know the most recent scan id we have actually completed. This is to
handle the case where a guest disconnects when we're in the middle of streaming
worktree entries to them. When they reconnect, they need to report a scan_id
from before we started streaming the entries, because we have no record of when
the stream was interrupted.
Next failure:
SEED=5051 ITERATIONS=1 OPERATIONS=200 cargo test --release --package=collab random -- --nocapture
2023-01-03 18:26:57 -07:00
Nathan Sobo
90fb9b53ad
WIP
2023-01-03 13:30:14 -07:00
Nathan Sobo
a6ffcdd0cf
Track open buffers when handling sync requests
...
When a host sends a buffer to a guest for the first time, they record that
they have done so in a set tied to that guest's peer id. When the guest
reconnects and syncs buffers, they do so under a different peer id, so we
need to be sure we track which buffers we have sent them to avoid sending
them the same buffer twice, which violates the guest's assumptions.
2023-01-02 20:27:59 -07:00
Nathan Sobo
f3dee2d332
Remove printlns, found a failure
...
Failing seed:
SEED=416 MAX_PEERS=2 ITERATIONS=5000 OPERATIONS=159 cargo +beta test --package=collab random -- --nocapture
2022-12-27 17:01:31 -07:00
Antonio Scandurra
6458a9144e
WIP: failing randomized test
...
SEED=175 MAX_PEERS=2 ITERATIONS=1 OPERATIONS=159 cargo test --package=collab random -- --nocapture
2022-12-23 15:02:06 +01:00
Antonio Scandurra
344d05045d
Avoid hanging waiting for operations when buffer has none
2022-12-23 12:26:48 +01:00
Max Brunsfeld
d750b02a7c
Handle file and diff updates to incomplete buffers
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-21 15:39:57 -08:00
Max Brunsfeld
c321f5d94a
Assert that buffers' file state matches in randomized collab test
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-21 15:38:44 -08:00
Antonio Scandurra
47348542ef
Synchronize buffers when either the host or a guest reconnects
2022-12-21 14:20:56 +01:00
Antonio Scandurra
b5fb8e6b8b
Remove unused JoinProjectError
2022-12-21 13:10:07 +01:00
Antonio Scandurra
ecd80c553c
Verify removing worktrees while host is offline
2022-12-21 11:47:01 +01:00
Antonio Scandurra
59d7f06c57
Handle proto::UpdateProjectCollaborator
message in Project
2022-12-21 11:09:27 +01:00
Max Brunsfeld
ec6f2a3ad4
💄 Reorder private Project method
2022-12-20 17:32:42 -08:00
Max Brunsfeld
6542b30d1f
Implement rejoining projects as guest when rejoining a room
...
Co-authored-by: Julia Risley <julia@zed.dev>
2022-12-20 15:02:26 -08:00
Max Brunsfeld
55ebfe8321
Handle unshared projects when rejoining a room
...
Also, construct remote projects via the room, to guarantee
that the room can manage the projects' sharing lifecycle.
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-20 11:10:46 -08:00
Antonio Scandurra
9d15b3d295
Remove unused import
2022-12-20 17:47:22 +01:00
Antonio Scandurra
d31fd9bbf2
Support adding worktrees to project while host is offline
2022-12-20 17:42:08 +01:00
Antonio Scandurra
52babc51a0
Make host reconnection test pass when mutating worktree while offline
2022-12-20 17:30:58 +01:00
Antonio Scandurra
1a3940a12e
Fix project reconnection test to ensure rooms actually reconnects
2022-12-20 14:51:46 +01:00
Max Brunsfeld
70dd586be9
Start work on rejoining rooms, supplying all project info at once
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-19 17:50:43 -08:00
Antonio Scandurra
d8219545c9
💄
2022-12-19 16:17:27 +01:00
Antonio Scandurra
06f6d02579
Stop counting extensions in worktree
2022-12-19 16:05:22 +01:00
Antonio Scandurra
05e99eb67e
Introduce an epoch to ConnectionId
and PeerId
2022-12-14 15:55:56 +01:00
Mikayla Maki
da100a09fb
WIP
2022-12-08 20:21:00 -08:00
Mikayla Maki
c42da5c9b9
WIP
2022-12-08 20:21:00 -08:00
Mikayla Maki
83aefffa38
Rearrange the terminal code to not have a cyclic dependency with the project
2022-12-08 20:21:00 -08:00
Mikayla Maki
1b8763d0cf
WIP - move terminal to project as pre-prep for collaboration
2022-12-08 20:21:00 -08:00
Antonio Scandurra
9a62150dce
Merge branch 'main' into reconnections-2
2022-12-05 19:18:40 +01:00
Antonio Scandurra
7bbd97cfb9
Send diagnostic summaries synchronously
2022-12-05 19:07:06 +01:00
Kay Simmons
d20d21c6a2
Dock persistence working!
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-12-03 16:06:01 -08:00
Mikayla Maki
4798161118
Distributed database pattern built.
...
Co-Authored-By: kay@zed.dev
2022-12-03 16:06:01 -08:00
Mikayla Maki
c84201fc9f
Done first draft of strongly typed migrations
2022-12-03 16:05:25 -08:00
Antonio Scandurra
969c314315
Merge branch 'main' into reconnections-2
2022-12-02 19:09:33 +01:00
Antonio Scandurra
d0709e7bfa
Error if project is disconnected after getting completions response
2022-11-28 19:19:24 +01:00
Antonio Scandurra
af2a2d2494
Return error when waiting on a worktree snapshot after disconnecting
2022-11-28 17:43:40 +01:00
Antonio Scandurra
2a0ddd99d2
Error if project is disconnected after getting code actions response
2022-11-28 15:05:34 +01:00
Antonio Scandurra
5581674f8f
After completing LSP request, return an error if guest is disconnected
2022-11-28 14:39:27 +01:00