Commit Graph
257 Commits
Author SHA1 Message Date
Nathan Sobo 17195e615e Merge pull request #781 from zed-industries/structured-logging
Introduce structured logging
2022-04-09 07:40:24 -06:00
Max Brunsfeld ed2b690b9e Merge branch 'main' into namespace-actions 2022-04-08 11:48:43 -07:00
Nathan SoboandAntonio Scandurra 7e5a3f9f6b Introduce structured logging
We're enabling the log crate feature everywhere, but only using it on the server for now.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-08 10:06:51 -06:00
Antonio ScandurraandNathan Sobo 24cb44fb00 Remove postage from rpc
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-08 16:13:37 +02:00
Antonio Scandurra 32fd4eb3ac Insert project id in connection's project during project registration
...in contrast to doing so during worktree registration. This fixes a
randomized test failure which would panic because store invariants would be
violated. This would happen when a peer disconnected before it had a chance
to register a worktree because, when removing all the state associated with
that peer upon disconnection, we would notice the registered project without
however finding it in the peer's connection state.
2022-04-08 14:41:56 +02:00
Antonio Scandurra 222cd09838 Allow host to reconnect to the server in randomized test 2022-04-08 14:41:30 +02:00
Antonio Scandurra da976012a9 Allow simulate_guest and simulate_host to fail when host disconnects 2022-04-08 11:29:00 +02:00
5242a3a6dc Restructure action macro to assign a namespace to every action
Also, allow arbitrary types to be used as Actions via the impl_actions macro

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:20:49 -07:00
Nathan Sobo 717f53e3d2 WIP 2022-04-07 09:29:47 -06:00
Max BrunsfeldandKeith Simmons 866ffdd4ae Move Settings to its own crate
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-06 10:23:33 -07:00
Antonio Scandurra 5ef484c9a1 Update followers when navigating back and forth 2022-04-05 10:42:35 +02:00
Nathan Sobo 6a1be11aa6 Wait to create access token until we impersonate a user
We need to wait to create the token until we decide on whether we're impersonating a different user, otherwise we'll create the token for the original user and the impersonated user won't be able to authenticate.
2022-04-04 15:07:55 -06:00
Max Brunsfeld fe27a27cb6 Merge branch 'main' into prompt-on-close 2022-04-01 15:29:23 -07:00
Antonio Scandurra 65048760b2 Allow explicit reload of buffers via Project::reload_buffers 2022-04-01 14:01:56 +02:00
Max Brunsfeld e987a8ba63 Let fake and real LanguageServer access AsyncAppContext in handler callbacks
Also, reimplement FakeLanguageServer by wrapping LanguageServer, instead of
duplicating its functionality differently.
2022-03-31 21:57:00 -07:00
Keith SimmonsandMax Brunsfeld 564225c401 Provide diagnostic context to codeAction
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-31 15:39:52 -07:00
Max Brunsfeld 3b4cab9094 Move all configuration of individual LSP servers to LspAdapter 2022-03-29 18:14:30 -07:00
Max Brunsfeld ebc711f9f5 Restructure fake language server setup
Replace FakeLanguageServerConfig with FakeLanguageServerAdapter
2022-03-29 17:55:57 -07:00
Max Brunsfeld a8600e76a3 Make language's language server config non-optional 2022-03-28 18:14:49 -07:00
Antonio Scandurra cbd266052d Allow returning futures in fake language server request handlers 2022-03-28 10:44:32 +02:00
Nathan SoboandAntonio Scandurra 62b4eb5efc Add integration test for dropping host connections while sharing
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-25 10:32:31 -06:00
Nathan SoboandAntonio Scandurra a3e9a3afbf Clear out project registration and sharing state on disconnect
Previously, we weren't fully clearing the state associated with projects and worktrees when losing connection. This caused us to not see guest avatars disappear and not be able to re-share upon reconnect.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-25 10:15:08 -06:00
Nathan SoboandMax Brunsfeld ee9ed936e4 Don't try keychain after authentication fails
Previously, we were achieving this by deleting the keychain item, but this can sometimes fail which leads to an infinite loop. Now, we explicitly never try the keychain when reattempting authentication after authentication fails.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-23 12:15:36 -06:00
Antonio ScandurraandNathan Sobo 4f27049305 Focus followed items when they become active if the pane is active
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:41:48 +01:00
Max BrunsfeldandNathan Sobo 4435d9b106 Combine updates from multiple view events when updating followers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:22:42 -07:00
Antonio ScandurraandNathan Sobo c78bcf7116 Ensure leader updates don't change the active pane of followers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:44:59 +01:00
Antonio ScandurraandNathan Sobo 9885c4f6ba Don't trigger observations with notifications emitted prior to observing
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:28:11 +01:00
Antonio Scandurra 284a446be7 WIP 2022-03-22 13:35:37 +01:00
Antonio Scandurra e5a99cf8cd Stop following when leader disconnects 2022-03-22 11:16:04 +01:00
Antonio Scandurra 5dc36260e5 Reflect leader's view state when recycling existing local editors 2022-03-22 10:51:17 +01:00
Antonio Scandurra 67dbc3117d Stop following when activating a different item on the follower pane 2022-03-22 09:42:37 +01:00
Antonio Scandurra 3117554568 Automatically unfollow when editing, scrolling or changing selections 2022-03-22 09:17:01 +01:00
Max Brunsfeld 1728551282 Always mirror the leader's selections when following 2022-03-21 21:47:29 -07:00
Max BrunsfeldandAntonio Scandurra 06cd9ac664 Match the leader's last selection when unfollowing
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-21 14:04:55 -07:00
Max BrunsfeldandAntonio Scandurra 3e0bc979c3 Avoid infinite loop when collaborators follow each other
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-21 11:47:00 -07:00
Antonio Scandurra 9575796f9e Allow unfollowing of leaders by clicking on their avatar 2022-03-21 17:10:23 +01:00
Antonio Scandurra a154e4500b Implement Workspace::unfollow
This also changes the structure of the follow state back to be per-pane. This
is because we can't share the same view state across different panes for
a couple of reasons:

- Rendering the same view in N different panes is almost always not something
that we want due to global state such as focus.
- If we allowed it and a user followed the same person in two different panes,
there would be no way of unfollowing in one pane without also unfollowing in
the other.
2022-03-21 16:55:18 +01:00
Max Brunsfeld 570c987455 Handle view updates when following
Basic following now works. Editors' scroll positions
are their only replicated view state.
2022-03-18 15:56:57 -07:00
Max Brunsfeld e338da0271 Allow clicking a titlebar avatar to initiate following 2022-03-18 13:37:07 -07:00
Antonio Scandurra 7d7e10598a Broadcast active view to followers 2022-03-18 16:00:03 +01:00
Antonio Scandurra 10e6d82c3e WIP: Start on sending view updates to followers 2022-03-18 14:20:09 +01:00
Antonio Scandurra f0b7bd6e17 Serialize initial follow state in leader and reflect it in follower 2022-03-18 10:22:13 +01:00
Max Brunsfeld 0fdaa1d715 WIP 2022-03-17 17:53:49 -07:00
Max Brunsfeld 5702737de2 Start work on an integration test for following 2022-03-17 13:53:06 -07:00
Antonio ScandurraandNathan Sobo 4bbfd0918e Start defining follow protocol
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 16:50:29 +01:00
Antonio ScandurraandNathan Sobo 6f9c37851c Add Editor::for_multibuffer and repurpose Editor::for_buffer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:39:02 +01:00
Antonio ScandurraandNathan Sobo 44d997c00c Rename app_state to global in gpui
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:33:01 +01:00
Antonio Scandurra 6446660c88 Rename open_buffer_for_path to open_buffer 2022-03-17 11:42:13 +01:00
Antonio Scandurra aced1e2315 Finish refactoring of how editors are opened 2022-03-17 11:29:46 +01:00
Nathan SoboandMax Brunsfeld 728c708150 WIP: Massage opening of editors
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-16 17:40:09 -06:00