Commit Graph
3084 Commits
Author SHA1 Message Date
Antonio Scandurra 4675ae8fa3 Merge pull request #517 from zed-industries/activate-pane-when-activating-item
Make pane active when activating one of its items
2022-03-02 17:33:12 +01:00
Antonio Scandurra 680f16b96b Make pane active when activating one of its items 2022-03-02 16:52:35 +01:00
Antonio Scandurra bded3d2220 Create vendor/bin if it doesn't exist 2022-03-02 15:23:06 +01:00
Antonio Scandurra 1a0afa9271 Bump protocol version 2022-03-02 15:08:33 +01:00
Antonio Scandurra 6825ed91f0 v0.18.0 2022-03-02 15:05:49 +01:00
Antonio Scandurra 2c5ee6c739 Merge branch 'leaks' 2022-03-02 15:05:01 +01:00
Antonio Scandurra 6196dff0d3 Use Node 16 on CI 2022-03-02 15:00:01 +01:00
Antonio Scandurra 9bc4d0ad72 Install node as part of ci.yml when bundling the app 2022-03-02 14:58:24 +01:00
Antonio Scandurra 2c76ea43d7 WIP: investigate why npm is not there 2022-03-02 14:41:59 +01:00
Antonio Scandurra c1c06d81d8 💄 2022-03-02 14:41:40 +01:00
Antonio Scandurra 138721c454 Always run tests and bundle creation in separate runners
This is better for caching and, thus, yields faster CI runs.
2022-03-02 14:30:52 +01:00
Antonio Scandurra acb9d5158a Fix warnings 2022-03-02 12:45:49 +01:00
Antonio Scandurra ef7bccfa76 Make dhat optional 2022-03-02 11:02:10 +01:00
Antonio Scandurra d3607d3117 Merge pull request #499 from zed-industries/project-find
Project-wide search
2022-03-02 10:58:50 +01:00
Antonio Scandurra 3ae035a9ad Advance clock when simulating random delay 2022-03-02 10:39:46 +01:00
Antonio Scandurra 694ea5ca74 Delete timer state when the future that's awaiting it gets dropped 2022-03-02 10:08:38 +01:00
Max Brunsfeld 4a6b77de77 Avoid storing type name string on AnyViewHandle
It won't be needed for leak error messages, because the typed
view handle will typically be created first. And this avoids
increasing the size of the handle used in production.
2022-03-01 18:22:09 -08:00
Max Brunsfeld 397149a097 Tear down client's connection states when dropping test clients 2022-03-01 18:17:41 -08:00
Max Brunsfeld 0f8c49c773 Flush effects when dropping test clients in random collaboration test 2022-03-01 18:17:25 -08:00
Max Brunsfeld 497ffb602d Avoid retaining executor when using Connection::in_memory 2022-03-01 18:02:12 -08:00
Max BrunsfeldandNathan Sobo 0b1ef30f94 Fix remaining language server hangs on shutdown
* Use fork of async-pipe library that handles closed pipes correctly.
* Clear response handlers map when terminating output task, so as
  to wake any pending request futures.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 15:54:59 -08:00
Max Brunsfeld 6cdc2f766d Handle Peer responses using a futures::oneshot instead of postage::mpsc 2022-03-01 13:37:33 -08:00
Max Brunsfeld 42166fbd55 Prevent hangs in lsp requests made while server is shutting down
* Avoid postage::oneshot, since receiver is not woken when sender is dropped.
* Clear the response channels when an IO task exits.
2022-03-01 13:36:49 -08:00
Max Brunsfeld 1f98014888 Clean up tasks properly when dropping a FakeLanguageServer
* Make sure the fake's IO tasks are stopped
* Ensure that the fake's stdout is closed, so that the corresponding language
  server's IO tasks are woken up and halted.
2022-03-01 13:26:59 -08:00
Max Brunsfeld 4f2095a87c Remove stray printing in db tests 2022-03-01 12:10:35 -08:00
Max Brunsfeld 347d2ec27c Make integration tests depend only on a few core crates, not all of zed 2022-03-01 12:09:51 -08:00
62610cd4d9 Fix failure in test_unshare_project due to dropping handle outside of an update block
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 10:50:58 -08:00
0171bd43fa Use simulate_random_delay when polling snapshot only in tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-01 19:17:38 +01:00
d19e8f03af Remove debug_elements_callbacks from App
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-01 19:16:58 +01:00
Antonio Scandurra d2041fda05 Fix Presenter leak when removing windows 2022-03-01 18:50:05 +01:00
Antonio ScandurraandNathan Sobo 657b559d01 Revert "Use async_broadcast to emit fake FS events"
This reverts commit 9c733bb29b, because
having a bounded broadcast introduces the possibility of waiting forever
when there isn't yet a receiver processing those events.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:14:40 +01:00
Antonio ScandurraandNathan Sobo 3e3e28a831 Forbid parking in project_panel::tests::test_visible_list
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:14:18 +01:00
Antonio ScandurraandNathan Sobo a7db99230e Use a weak handle to poll local worktree snapshot
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:08:10 +01:00
Antonio ScandurraandNathan Sobo 9a3147043a Make TestAppContext and its dependencies available only in tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:01:52 +01:00
Antonio ScandurraandNathan Sobo 6c3b6bca75 Detect when view handles are leaked
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 16:11:12 +01:00
Antonio ScandurraandNathan Sobo 668f791a8b Enable leak backtraces by setting LEAK_BACKTRACE=1
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 16:00:40 +01:00
Antonio ScandurraandNathan Sobo 9c733bb29b Use async_broadcast to emit fake FS events
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 15:48:15 +01:00
Antonio Scandurra 87897cd3e8 Capture a weak reference to the Project in fake LSP 2022-03-01 13:34:03 +01:00
Antonio Scandurra 511fdc869f Don't block when emitting fs events
Blocking could happen while processing events, which would cause the
background scanner to never make any further progress.
2022-03-01 13:08:50 +01:00
Antonio Scandurra 6bd783fceb Remove project from host connection when unregistering it 2022-03-01 12:18:55 +01:00
Antonio Scandurra 79568c471a Pass a reference to TestAppContext in tests
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Antonio Scandurra 51f111880b Allow capturing references in the future passed to Deterministic::run 2022-03-01 11:59:58 +01:00
Antonio Scandurra bfb04b57ec Remove all windows on dropping TestAppContext
This allows us to remove the dropped entities and flush effects as
necessary.
2022-03-01 10:55:12 +01:00
Antonio Scandurra 6955c5d781 Avoid reference cycle between Client and its models 2022-03-01 10:55:05 +01:00
Max Brunsfeld 45cc78730d WIP - include dhat for memory profiling tests 2022-02-28 22:52:21 -08:00
Max BrunsfeldandNathan Sobo 3d5668c383 Try clearing Client's state at the ends of integration tests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-28 22:52:21 -08:00
Max Brunsfeld b64693b4bb Hold client weakly in UserStore
This avoids a reference cycle that is causing some tests
to fail due to leaked handles at the moment. There may be
a better way to fix this though.
2022-02-28 22:47:50 -08:00
Max Brunsfeld c79f033b5c Avoid retaining executor in the FakeFs
This probably isn't the *root* cause of why an executor is leaked,
but by cutting off this cyclic references, it may make it a bit easier
to track down leaks of an executor.
2022-02-28 22:40:04 -08:00
Max BrunsfeldandNathan Sobo 29edf2691a Clean up guest connection states correctly when a collaborator disconnects
This bug was caught by running the executor until parked after tests.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-28 22:21:32 -08:00
Max Brunsfeld 45e85d6010 Clear the executor at the end of a test by running until it is parked 2022-02-28 22:20:03 -08:00