Commit Graph
223 Commits
Author SHA1 Message Date
Max Brunsfeld c58e335b87 Make UpdateBuffer a request, store unsent operations on worktree 2021-09-09 11:26:06 -07:00
Antonio Scandurra 000305472a Minor stylistic changes 2021-09-09 19:51:26 +02:00
Nathan SoboandAntonio Scandurra d34f374fe7 Beautify error logging
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-24 08:15:24 -06:00
Max Brunsfeld 5ecedd894d Add ChannelList to AppState 2021-08-23 15:03:45 -07:00
Nathan Sobo c3dda14490 WIP: Move sum_tree module into gpui so we can use it in List 2021-08-20 16:18:39 -06:00
Max BrunsfeldandNathan Sobo 86c819757d Move Arc outside of rpc::Client
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-19 12:56:50 -07:00
Max BrunsfeldandNathan Sobo 266867b516 Send SaveBuffer message on foreground thread
This ensures that it gets sent *after* any other messages
for which we have already spawned a foreground send.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-19 12:17:32 -07:00
6288ac2e21 Fix double borrow panic
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-08-19 19:58:13 +02:00
5338b30c00 Remove remaining instances of router
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-08-19 19:38:17 +02:00
Nathan Sobo 3f5db7284d Remove shared_worktrees map from ClientState
Each worktree instance now handles its own messages.
2021-08-18 19:16:40 -06:00
Nathan SoboandMax Brunsfeld 37f24d10ec Subscribe to worktree messages at the entity level
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-18 19:06:46 -06:00
Nathan SoboandMax Brunsfeld ef421d735d Implement broadcast of typed envelopes
This required a rework of the macro so that we can always construct a typed envelope from our list of available message types from incoming protobuf envelopes.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-18 13:12:27 -06:00
Nathan SoboandMax Brunsfeld 1a21902460 Move fuzzy mod out of worktree
We now match against arbitrary strings in addition to paths.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 17:46:53 -06:00
Nathan Sobo 85a076312a Merge branch 'main' into theme-variables 2021-08-04 16:47:43 -06:00
Max BrunsfeldandNathan Sobo b30d0daabf Add a theme picker
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 14:55:27 -07:00
Max Brunsfeld eb05103d2d Fix saving an untitled file outside of any existing worktree 2021-07-30 14:19:42 -07:00
c1a9a20ac9 Setup randomized test harness in gpui::test
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-30 09:50:28 -07:00
Antonio Scandurra 8de8c679c7 Fix panic when fuzzy-matching on a Worktree that contains no files
As part of our work on the deterministic executor, in c4e37dc we fixed a
bug that occurred when there were more CPUs than paths to fuzzy-match
on.

However, that introduced another bug that caused Zed to panic when
trying to calculate how many paths should be fuzzy-matched by each
available worker thread for worktrees that didn't contain any file.

This commit bails out early in `fuzzy::match_paths` if the vector of
paths to search is empty.
2021-07-30 09:50:02 -07: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
Nathan SoboandMax 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 SoboandMax 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 ScandurraandNathan Sobo 6abac39eaa Remove stray logging statements
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-13 17:47:54 +02:00
Antonio ScandurraandNathan 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 BrunsfeldandNathan 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
Antonio Scandurra 34abda3a04 🔥 Remove stray logging statements 2021-07-12 17:52:16 +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
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
Antonio Scandurra 0e19b061d4 Fix warnings 2021-07-09 17:35:57 +02:00
Antonio Scandurra 3d799fe8e7 Implement InMemoryFs::rename 2021-07-09 17:02:42 +02:00
Antonio Scandurra 63e76e426a Implement Fs::child_entries for InMemoryFs 2021-07-09 16:41:05 +02:00
Antonio Scandurra b96578f471 Extract Fs::child_entries method to avoid sync I/O in BackgroundScanner 2021-07-09 16:15:24 +02:00
Antonio Scandurra 6957027341 Replace crossbeam_channel with an async smol::channel 2021-07-09 15:06:51 +02:00
Antonio Scandurra 102026f3c7 Implement a scoped pool on executor::Background 2021-07-09 15:00:51 +02:00
Antonio Scandurra d5361299ad Start on refactoring BackgroundScanner to be generic over fs 2021-07-09 14:20:42 +02:00
Antonio Scandurra 2fa63a3a50 Start on in-memory fs 2021-07-09 14:20:33 +02:00