Max Brunsfeld
3719a9ee23
Use published prost crates
...
The previous version of prost didn't build on nightly rust.
2021-09-30 15:37:04 -07:00
Antonio Scandurra
96961a7dfe
Bump zrpc version to 1
2021-09-23 18:27:12 +02:00
Antonio Scandurra
5b40dcaeed
Remove stray logging
2021-09-23 18:26:42 +02:00
Max Brunsfeld
8bfee93be4
Start work on compressing RPC messages
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-09-23 18:26:42 +02:00
Antonio Scandurra
286846cafd
Merge pull request #179 from zed-industries/rpc-protocol-version
...
Forbid connections from outdated clients
2021-09-23 18:26:12 +02:00
Antonio Scandurra
0aadc94442
Properly initialize response_channels
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-23 17:50:13 +02:00
Antonio Scandurra
2352725c58
💄
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-23 17:32:37 +02:00
Antonio Scandurra
6b0ed820bf
Prevent requests from hanging when shutting down a connection
...
When closing a connection (either due to an error or simply because the
user wanted to), we will now *take* `response_channels` as opposed to
clearing them. This ensures that `Peer::request` can't succeed in both
adding the oneshot channel in `response_channels` map _and_ submit the
message onto the `outgoing_tx` channel.
This also streamlines how we close a connection by unifying all the exit
code paths of the IO handling future.
2021-09-23 16:35:40 +02:00
Antonio Scandurra
c70b4a99c9
Remove non-determinism from zrpc::tests::peer::test_io_error
2021-09-23 15:55:28 +02:00
Antonio Scandurra
511cbaa2bd
Version the zrpc protocol using a X-ZRPC-VERSION
header
2021-09-23 15:35:35 +02:00
Max Brunsfeld
412535420b
Allow joining worktrees by clicking them in the people panel
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-21 12:21:03 -07:00
Antonio Scandurra
c90dc7235e
Rename participants
to guests
in proto
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-21 18:30:49 +02:00
Max Brunsfeld
5dfd4be174
WIP
2021-09-20 18:05:46 -07:00
Antonio Scandurra
f13af7dc59
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-17 18:37:00 +02:00
Antonio Scandurra
f2825cceba
Start on Presence
as the backing model for the people panel
2021-09-17 16:18:41 +02:00
Antonio Scandurra
12fa309b7c
Implement proto::GetCollaborators
request
2021-09-17 14:36:50 +02:00
Max Brunsfeld
e3c0d6980c
Switch to a new flow for advertising, sharing and joining worktrees
...
Now, when you open a local worktree, we immediately send an `OpenWorktree` message
to the server, telling it the name of the folder that you've opened, and the names of all the
collaborators (based on a `.zed.toml` file). The server responds with a unique id for the
worktree.
When starting share this local worktree, you now include this previously-assigned id
in the `ShareWorktree` message.
When joining a worktree, there is no longer a need to provide an access token. The access
is controlled by the set of "collaborator logins" that were provided when the worktree
was initially opened by the host.
2021-09-16 18:39:29 -07:00
Max Brunsfeld
176ca9086e
Rename OpenWorktree message to JoinWorktree
...
We'll repurpose the name 'OpenWorktree' for opening a local
worktree while signed in, and advertising the open status to
the worktree's collaborators.
2021-09-16 12:57:19 -07:00
Antonio Scandurra
8973e250ca
Re-send pending messages after reconnecting
2021-09-16 16:23:43 +02:00
Nathan Sobo
4a9918979e
WIP: Clear cached credentials if authentication fails
...
Still need to actually handle an HTTP response from the server indicating there was an invalid token.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-14 19:19:11 -06:00
Max Brunsfeld
c58e335b87
Make UpdateBuffer
a request, store unsent operations on worktree
2021-09-09 11:26:06 -07:00
Max Brunsfeld
38bfaba135
Add a generic Ack
message, use it instead of Pong
...
Remove the `id` field from `Ping`, because it isn't used.
There is already an id on the message envelope.
2021-09-09 11:24:16 -07:00
Nathan Sobo
e2b56e8764
If a test connection has been killed, never return a message
2021-09-09 08:25:58 -06:00
Antonio Scandurra
8de18b5a84
Re-join channel when reconnecting
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-09 15:34:46 +02:00
Antonio Scandurra
156fd4ba57
Add integration test simulating killing a connection while chatting
2021-09-09 13:27:44 +02:00
Max Brunsfeld
b6eac57f63
Introduce a concrete Conn
type for peer's websocket connection
...
This is mostly to set us up to test the rpc::Client's reconnect
logic.
There are multiple ways that the `rpc::Client` may establish
its websocket connection: (SSL in production, plain TCP during
local development, and using an in-memory connection for tests).
Now we can represent all of those connections using a common type.
Also, several long methods no longer need to be generic, which
is good for compile time.
2021-09-08 18:14:47 -07:00
Antonio Scandurra
af6e931da7
Start on a Client::status
method that can be observed
2021-09-08 15:58:16 +02:00
Antonio Scandurra
6fec9e1f70
Include sanitized message in SendChannelMessageResponse
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-09-02 18:31:24 +02:00
Max Brunsfeld
a98d293f54
Trim whitespace from chat messages and limit their length
...
Add a way for the server to respond to any request with an error
2021-08-27 17:21:35 -07:00
Max Brunsfeld
bc63fca8d7
Fetch older messages when scrolling up in the chat message list
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-27 14:58:28 -07:00
Max Brunsfeld
8179f90589
Add initial unit test for channel list
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-24 13:12:02 -07:00
Max Brunsfeld
10868cf0ea
Start work on sending channel messages
2021-08-19 18:04:49 -07:00
Max Brunsfeld
467512eedd
Remove Auth and AuthResponse protobuf messages
2021-08-19 18:00:12 -07:00
Nathan Sobo
a4882169c2
Fetch messages when joining a channel
2021-08-19 15:25:20 -06:00
Antonio Scandurra
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
Antonio Scandurra
d6412fdbde
Delete old Peer
implementation and adapt previous code paths
...
This still doesn't compile but should be close.
2021-08-19 15:02:30 +02:00
Antonio Scandurra
5dee7ecf5b
Start using the new zrpc::peer2::Peer
in Server
2021-08-19 15:01:57 +02:00
Nathan Sobo
9336c02867
Start on a peer2 module with an alternative implementation
2021-08-18 21:59:13 -06:00
Nathan Sobo
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 Sobo
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 Sobo
541f58e12c
Start on subscribing to messages in channel entity instances
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-18 11:45:29 -06:00
Max Brunsfeld
4a32bd6bb0
Implement initial RPC endpoints for chat
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-06 13:43:06 -07:00
Max Brunsfeld
13ee9c2286
Start work on server-side RPC handling for chat
2021-08-05 19:59:54 -07:00
Max Brunsfeld
0b6376bdda
Add several proto messages for chat
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-05 19:05:58 -07:00
Max Brunsfeld
42ba24c5a8
Fix error message when connection's IO loop exits before message loop
2021-07-13 13:00:10 -07:00
Antonio Scandurra
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