Antonio Scandurra
1eea2f3653
Add integration test for code actions
2022-02-14 11:42:56 +01:00
Antonio Scandurra
68917c78be
Implement Server::add_request_handler in terms of ::add_message_handler
2022-02-14 09:31:31 +01:00
Antonio Scandurra
a41eb5a663
Ensure server always responds when receiving a request
2022-02-13 10:21:01 +01:00
Antonio Scandurra
331667c00e
WIP: Start auditing all forward_request calls on the server
...
When the host returns an error after a server has forwarded a request,
we want to surface that error to the guest. At the moment, the server
just returns early leaving some requests unresponded on the guest.
I started auditing all the code paths where we do that, but I am
wondering whether there's some other approach that would prevent us
from repeating this mistake in other code paths.
2022-02-12 14:12:13 +01:00
Antonio Scandurra
cbe93af3a8
Reduce number of iterations on test_editing_while_guest_opens_buffer
...
I think this was mistakenly increased as part of some other change.
2022-02-12 13:01:18 +01:00
Antonio Scandurra
ca052b4a4d
Make test_propagate_saves_and_fs_changes more robust
...
...by using a condition that awaits on the actual paths as opposed
to the simple file counts.
2022-02-12 12:37:51 +01:00
Antonio Scandurra
f2b4a0665f
Fix integration test verifying the rename behavior
...
Specifically, the test now ensures that the host's worktree observes a/file1's
change event *before* the rename occurs, otherwise when interpreting the change
event it will mistakenly think that the file has been deleted (because its path
has changed) and will subsequently fail to detect the rename, causing the test
to fail.
2022-02-12 12:26:39 +01:00
01664d494c
Restructure fake language server to setup request handlers in advance
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-11 15:08:56 -08:00
Antonio Scandurra and Nathan Sobo
a41725daee
Render code actions indicator
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-11 16:01:15 +01:00
Antonio Scandurra
4929b8c525
Move Buffer::format to Project::format
2022-02-11 12:07:46 +01:00
Max Brunsfeld and Nathan Sobo
6731d92f60
Give the editor a handle to the project, not a weak handle to the workspace
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-08 15:48:44 -08:00
Max Brunsfeld
93bcde953c
Consolidate logic for completion alongside code actions in Project
...
This way, completions are dealt with more consistently with code actions,
and the logic is not spread across so many places. The `language::File`
trait and the multibuffer no longer need to deal with completions. Completions
are no longer generic over an anchor type.
2022-02-08 14:24:45 -08:00
Max Brunsfeld
e0fe8b5a7c
Merge branch 'main' into assists
2022-02-08 12:41:57 -08:00
Antonio Scandurra
dca974c7d4
Apply code actions remotely
2022-02-08 12:18:14 +01:00
Antonio Scandurra
17114cc6f7
Merge branch 'main' into assists
2022-02-08 09:39:43 +01:00
Max Brunsfeld
050f95149e
Clear test db pool whenever no dbs are in use
2022-02-07 18:30:09 -08:00
Max Brunsfeld and Nathan Sobo
c245356b42
Try another hacky approach for tearing down DBs after all tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-07 15:23:35 -08:00
Max Brunsfeld and Nathan Sobo
b0ed58add3
Run multiple iterations of all integration tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-07 15:11:41 -08:00
Max Brunsfeld and Nathan Sobo
e3f055d950
Use a pool of databases to speed up integration tests
...
Also, use env_logger consistently in the tests for each crate.
Only initiallize the logger at all if some RUST_LOG env var is set.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-07 15:00:00 -08:00
Max Brunsfeld and Nathan Sobo
8a2613d49c
Preserve ordering between responses and other incoming messages
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-07 14:14:15 -08:00
d4fe1115e7
Use an unbounded channel for peer's outgoing messages
...
Using a bounded channel may have blocked the collaboration server
from making progress handling RPC traffic.
There's no need to apply backpressure to calling code within the
same process - suspending a task that is attempting to call `send` has
an even greater memory cost than just buffering a protobuf message.
We do still want a bounded channel for incoming messages, so that
we provide backpressure to noisy peers - blocking their writes as opposed
to allowing them to buffer arbitrarily many messages in our server.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-07 12:27:13 -08:00
Antonio Scandurra and Nathan Sobo
a172c3c5c6
Apply file-system operations coming from an LSP code action
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-07 16:11:40 +01:00
Antonio Scandurra
982e90539d
WIP: Start on applying code actions
2022-02-07 12:20:03 +01:00
Nathan Sobo
ba99b01de6
Generalize showing and hiding of context menus
...
We still cancel pending completions when hiding the context menu so its not perfectly general, but I think this is ok.
2022-02-05 12:13:02 -07:00
Nathan Sobo
93a3f4b615
Move rendering and select prev/next into ContextMenu enum
...
This prepares the way to have a code actions context menu.
2022-02-05 10:19:43 -07:00
Max Brunsfeld
3dfff3866a
Add integration test for getting and resolving completions
2022-02-03 15:24:16 -08:00
Antonio Scandurra
d765e75bad
Apply additional edits for completion when the buffer is remote
2022-02-02 16:29:13 +01:00
Antonio Scandurra
ed549e352f
Start on requesting completions for remote buffers
2022-02-02 12:22:47 +01:00
Max Brunsfeld and Nathan Sobo
8d2b7ba032
Insert completion text on enter
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-31 13:46:50 -08:00
Max Brunsfeld and Nathan Sobo
0e55f0ccaa
Use Rust 2021 edition in all crates
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-26 12:50:31 -08:00
Max Brunsfeld and Nathan Sobo
0cfb9ff1ae
Add random delays in FakeFs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-24 16:50:38 -08:00
Max Brunsfeld and Nathan Sobo
2b8685c1a2
Insert random delays when sending and receiving websocket messages in tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-24 16:37:22 -08:00
Antonio Scandurra
b7314ef2aa
WIP: Start restructuring executor
2022-01-24 18:49:20 +01:00
Antonio Scandurra
96b66dcce1
Fix race condition when opening a buffer and getting a definition to it
2022-01-24 18:47:55 +01:00
Antonio Scandurra
dabab6e323
Verify simultaneously opening buffers via definition and open_buffer
...
This fails because we don't yet handle this scenario.
2022-01-24 15:08:04 +01:00
Antonio Scandurra
245490f934
Implement Project::definition when the buffer is remote
2022-01-24 13:10:13 +01:00
Antonio Scandurra
f859d444ff
Don't show conflict indicator on remote buffer after a reload
2022-01-24 10:17:36 +01:00
Antonio Scandurra
4372fe1ed0
Maintain remote buffers via UpdateBufferFile messages sent by host
2022-01-24 09:32:40 +01:00
Antonio Scandurra
31dfd01fda
Make add_local_worktree private and use find_or_create_local_worktree
...
The former always adds a worktree, even if we have one already in the
project and that could be misused. The public API should always search
for a local worktree containing the requested path first so that the
project can uphold invariants about which worktrees it has.
2022-01-22 11:23:00 +01:00
Max Brunsfeld and Nathan Sobo
2712cadaf6
Get integration tests passing
...
* Fix misuse of guest buffer's id as its remote id
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-21 17:44:24 -08:00
Max Brunsfeld
6751bd9d78
Change integration tests to open buffers via the project
2022-01-21 12:23:17 -08:00
Antonio Scandurra
6e7e86e491
Remove weak worktrees from project when nobody references them
...
Also, avoid showing them in the project panel as well as in the
contacts panel.
2022-01-21 14:34:14 +01:00
Antonio Scandurra
71082d4cdc
Return a Task<Result<()>> in {ItemView,Buffer,MultiBuffer}::save
2022-01-20 09:58:24 +01:00
Max Brunsfeld
e56c043693
Get tests passing, centralize more diagnostic logic in Project
2022-01-19 16:32:55 -08:00
Max Brunsfeld
f43dcd6763
Move logic for starting language servers to the project
2022-01-19 14:05:06 -08:00
Antonio Scandurra
f51cf6b05e
Cleanup worktrees' shared state when unsharing
2022-01-17 10:58:49 +01:00
Nathan Sobo
057dc62b90
Merge pull request #338 from zed-industries/use-wildcard-cert
...
Associate staging and production load balancers with wildcard cert
2022-01-12 17:23:04 -07:00
Nathan Sobo and Max Brunsfeld
a93502bb64
Add placeholder environment variables to our deploy
...
We have the ability to define environment-specific environment variables, but don't current need it. This keeps these files in place while avoiding noise from running `export` with no args due to the files being empty.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-01-12 16:33:41 -07:00
Nathan Sobo and Max Brunsfeld
e71b989041
Use the same wildcard certificate on production and staging
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-01-12 16:28:09 -07:00
Nathan Sobo and Max Brunsfeld
3a82d0d8e1
Use a wildcard cert on DigitalOcean in the staging environment
...
If this works, we'll use it for production as well and delete the other certs.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-01-12 16:17:21 -07:00