Antonio Scandurra
e00eafb3e8
WIP
2021-07-19 15:45:49 +02:00
Antonio Scandurra
9e448e694d
Add fold_map::Snapshot::text_summary_for_range
2021-07-19 12:25:27 +02:00
Antonio Scandurra
7a86a2c831
Change fold_map::Edit to return DisplayOffsets
...
This is needed so that we can translate display offsets into display
points in the `WrapMap`.
2021-07-19 11:34:47 +02:00
Antonio Scandurra
38dffc310f
Fix errors in WrapMap randomized tests
2021-07-19 10:48:13 +02:00
Antonio Scandurra
9895c77f5c
WIP
2021-07-16 18:43:50 +02:00
Antonio Scandurra and Nathan Sobo
1ba9e48271
Start on adding a randomized test for BackgroundWrapper
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-16 17:53:23 +02:00
Antonio Scandurra
8d3c3d7c46
Work on a randomized test for edits/snapshots returned by FoldMap
...
...and make it pass too!
2021-07-16 15:48:43 +02:00
Antonio Scandurra
831b620e51
Make writing/reading FoldMap explicit so that we can retrieve edits
2021-07-16 13:49:38 +02:00
Antonio Scandurra
23b55d88d9
Pull snapshot history out of fold map
2021-07-16 13:49:02 +02:00
Max Brunsfeld
e0930ddc09
Add FoldMapSnapshot::edits_since_creation
2021-07-15 18:27:59 -07:00
Nathan Sobo and Max Brunsfeld
8b34deab58
Try to return edits from FoldMap::apply_edits
...
The goal is to describe how the fold map changed. Hopefully this is correct.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 15:08:18 -06:00
Nathan Sobo and Max Brunsfeld
2c9f730638
Give the FoldMap its own edit type that does not have deleted_lines
...
We want to use this struct to communicate about edits performed to the fold map itself, and it will be simpler if we don't have to communicate this data.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 14:19:58 -06:00
Max Brunsfeld
f561f33aa9
Move DisplayMap's reading methods to DisplayMapSnapshot
2021-07-15 11:48:57 -07:00
Nathan Sobo and Max Brunsfeld
2bde54971e
Move all FoldMap query methods to FoldMapSnapshot
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 11:36:24 -06:00
Nathan Sobo
09afba9251
Introduce buffer::Content<'a> struct to share logic with buffer::Snapshot
...
We want to move a bunch of methods on FoldMap to fold_map::Snapshot. This captures a buffer snapshot, and we'll need a bunch of methods that currently are on Buffer to also be implemented on buffer::Snapshot. This Content reference struct will be a good zero-cost place to store that logic.
2021-07-15 09:50:50 -06:00
Antonio Scandurra
be954872d0
Calculate an old_lines range in Edits iterator
2021-07-15 10:11:24 +02:00
Antonio Scandurra
c2e7460fcd
WIP
2021-07-14 19:09:46 +02:00
Antonio Scandurra
a5edc14e3a
WIP: Start on WrapMap
2021-07-14 18:43:48 +02:00
Antonio Scandurra
e1c0d902d9
💄
2021-07-14 09:25:12 +02:00
Max Brunsfeld
c18ca77d14
🎨 Use fs::Metadata in fs::FakeFsEntry
2021-07-13 16:03:54 -07:00
Max Brunsfeld
7260442d42
Move the fs module out of worktree
2021-07-13 15:40:11 -07:00
Max Brunsfeld
dcae4747b0
Decouple Fs trait from Worktree
...
Make it a more direct shim for the standard FS APIs
2021-07-13 15:40:11 -07:00
Max Brunsfeld
cdaa4e0719
Fix flaky FileFinder test by avoiding redundant worktree snapshot polls when idle
2021-07-13 13:53:51 -07:00
Max Brunsfeld
561cabbba2
Use FakeFs in all integration tests
2021-07-13 12:48:00 -07:00
Nathan Sobo and Max Brunsfeld
82569a031f
Fix race condition in integration test
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-13 13:24:48 -06:00
Nathan Sobo and Max Brunsfeld
411e7df931
Move Fs trait into its own module
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-13 12:52:42 -06:00
391ad489ff
Rename zed-rpc to zrpc
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-13 18:22:00 +02:00
c4e37dc47c
Use the same background executor for spawning CPU intensive tasks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-13 18:13:25 +02:00
Antonio Scandurra and Nathan Sobo
6abac39eaa
Remove stray logging statements
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-13 17:47:54 +02:00
Antonio Scandurra and Nathan Sobo
7ad2071a51
Fix tests that were not aware of Worktree::open_local being async
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-13 17:27:40 +02:00
Antonio Scandurra
2ecdc65f38
WIP
2021-07-13 16:36:35 +02:00
Antonio Scandurra
f836a25500
Use an executor::Background in AppContext::thread_pool
2021-07-13 14:06:38 +02:00
Antonio Scandurra
f58ef25fc5
Don't create a real background executor when Fs is fake
2021-07-13 12:32:10 +02:00
Antonio Scandurra
9e1f72bfa9
Use an unfair lock to ensure tests are deterministic
...
Also avoid using `smol::block_on` as it interacts with their `Reactor`.
2021-07-13 09:45:59 +02:00
Max Brunsfeld and Nathan Sobo
2a90347b82
Store an Fs on Workspace, pass it to each Worktree
...
Push test-only worktree behavior down into the Fs,
via a `watch` method which provides fs events.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-12 17:26:14 -07:00
Nathan Sobo and Max Brunsfeld
1537500fcb
Include contents of the zed-server repo
...
We're going full monorepo.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-12 14:14:39 -06:00
Antonio Scandurra
34abda3a04
🔥 Remove stray logging statements
2021-07-12 17:52:16 +02:00
Antonio Scandurra and Nathan Sobo
59d61d33cb
Allow worktrees to be joined with no open window
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-12 17:44:53 +02:00
Antonio Scandurra
a661b43e75
Pass AppState to workspace:join_worktree
2021-07-12 17:02:22 +02:00
Antonio Scandurra
ccff27a157
Ignore whitespaces surrounding a shared worktree's URL
2021-07-12 14:16:36 +02:00
Antonio Scandurra
0f399c6a01
Don't lose operations for buffers that are being opened
2021-07-12 11:59:56 +02:00
Antonio Scandurra
4f752a4144
Emit event when performing a rename in InMemoryFs
2021-07-10 08:48:49 +02:00
Nathan Sobo
4aab70d7fb
Remove authentication at the RPC layer
...
This means we can remove IOHandler and return a simple future that is Send
2021-07-09 21:57:10 -06:00
Nathan Sobo
89ef4d760d
Send an Authorization HTTP header when connecting web sockets
2021-07-09 21:27:33 -06:00
Nathan Sobo
4ffd29bd81
Pass AppState as action arg to workspace:share_worktree
2021-07-09 21:26:54 -06:00
Max Brunsfeld
eeebc761b6
Restructure Peer to handle connections' messages in order
2021-07-09 16:27:34 -07:00
b7fae693f9
Send buffer operations in the order they occur
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-09 19:07:04 +02:00
ad3dcfed10
Use the Fs trait for refreshing buffers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-09 19:02:27 +02:00
9412a7ae07
Remove non-determinism caused by polling snapshots via a timer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-09 18:42:25 +02:00
Antonio Scandurra
13c56cf6ce
WIP
2021-07-09 18:32:57 +02:00