chore: bump up yrs (#193)
This commit is contained in:
parent
63e970caa2
commit
f13a03bead
|
|
@ -1229,7 +1229,6 @@ dependencies = [
|
|||
"futures-util",
|
||||
"gotrue",
|
||||
"gotrue-entity",
|
||||
"lib0",
|
||||
"mime",
|
||||
"mime_guess",
|
||||
"parking_lot",
|
||||
|
|
@ -1256,13 +1255,12 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=82b3f74a716285ec595b8140c7255402433e7c8a#82b3f74a716285ec595b8140c7255402433e7c8a"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"bincode",
|
||||
"bytes",
|
||||
"lib0",
|
||||
"parking_lot",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
|
@ -1276,7 +1274,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab-derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=82b3f74a716285ec595b8140c7255402433e7c8a#82b3f74a716285ec595b8140c7255402433e7c8a"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -1288,13 +1286,12 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab-document"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=82b3f74a716285ec595b8140c7255402433e7c8a#82b3f74a716285ec595b8140c7255402433e7c8a"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
"collab-derive",
|
||||
"collab-persistence",
|
||||
"lib0",
|
||||
"nanoid",
|
||||
"parking_lot",
|
||||
"serde",
|
||||
|
|
@ -1308,7 +1305,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=82b3f74a716285ec595b8140c7255402433e7c8a#82b3f74a716285ec595b8140c7255402433e7c8a"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
|
|
@ -1322,7 +1319,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab-folder"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=82b3f74a716285ec595b8140c7255402433e7c8a#82b3f74a716285ec595b8140c7255402433e7c8a"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
|
@ -1342,7 +1339,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab-persistence"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=82b3f74a716285ec595b8140c7255402433e7c8a#82b3f74a716285ec595b8140c7255402433e7c8a"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
|
@ -1350,7 +1347,6 @@ dependencies = [
|
|||
"chrono",
|
||||
"collab",
|
||||
"lazy_static",
|
||||
"lib0",
|
||||
"parking_lot",
|
||||
"serde",
|
||||
"smallvec",
|
||||
|
|
@ -2715,17 +2711,6 @@ dependencies = [
|
|||
"spin 0.5.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lib0"
|
||||
version = "0.16.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29dc19a026a0d45fc391898c6d4a6d0a5aab5ae6a826ebddc0f33572ffdae8dc"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.150"
|
||||
|
|
@ -3871,7 +3856,6 @@ dependencies = [
|
|||
"database",
|
||||
"database-entity",
|
||||
"futures-util",
|
||||
"lib0",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"realtime-entity",
|
||||
|
|
@ -4610,9 +4594,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "smallstr"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e922794d168678729ffc7e07182721a14219c65814e66e91b839a272fe5ae4f"
|
||||
checksum = "63b1aefdf380735ff8ded0b15f31aab05daf1f70216c01c02a12926badd1df9d"
|
||||
dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
|
|
@ -5981,13 +5965,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yrs"
|
||||
version = "0.16.5"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c2aef2bf89b4f7c003f9c73f1c8097427ca32e1d006443f3f607f11e79a797b"
|
||||
checksum = "86f2fbea97ed32722d4f09fcf1aace9daf36e8b2e72b1f605d5a1bee575fa0da"
|
||||
dependencies = [
|
||||
"atomic_refcell",
|
||||
"lib0",
|
||||
"rand 0.7.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"smallstr",
|
||||
"smallvec",
|
||||
"thiserror",
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ workspace-template = { path = "libs/workspace-template" }
|
|||
uuid = { version = "1.4.1", features = ["v4"] }
|
||||
anyhow = "1.0.75"
|
||||
tokio = { version = "1.34", features = ["sync"] }
|
||||
yrs = "0.17.1"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
|
@ -153,10 +154,10 @@ lto = false
|
|||
opt-level = 3
|
||||
|
||||
[patch.crates-io]
|
||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "82b3f74a716285ec595b8140c7255402433e7c8a" }
|
||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "82b3f74a716285ec595b8140c7255402433e7c8a" }
|
||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "82b3f74a716285ec595b8140c7255402433e7c8a" }
|
||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "82b3f74a716285ec595b8140c7255402433e7c8a" }
|
||||
|
||||
# Comment the above and uncomment the below to use local version of collab by cloning the repo and placing it in libs folder
|
||||
#collab = { path = "libs/AppFlowy-Collab/collab" }
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ scraper = { version = "0.17.1", optional = true }
|
|||
# collab sync
|
||||
collab = { version = "0.1.0", optional = true }
|
||||
collab-entity = { version = "0.1.0" }
|
||||
yrs = { version = "0.16.5", optional = true }
|
||||
lib0 = { version = "0.16.3", features = ["lib0-serde"], optional = true }
|
||||
yrs = { workspace = true, optional = true }
|
||||
realtime-entity = { workspace = true, features = ["tungstenite"] }
|
||||
workspace-template = { workspace = true, optional = true }
|
||||
mime_guess = "2.0.4"
|
||||
|
|
@ -46,7 +45,7 @@ prost = "0.12.1"
|
|||
|
||||
|
||||
[features]
|
||||
collab-sync = ["collab", "yrs", "lib0"]
|
||||
collab-sync = ["collab", "yrs"]
|
||||
test_util = ["scraper"]
|
||||
template = ["workspace-template"]
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ pub enum SyncError {
|
|||
YAwareness(#[from] collab::sync_protocol::awareness::Error),
|
||||
|
||||
#[error("failed to deserialize message: {0}")]
|
||||
DecodingError(#[from] lib0::error::Error),
|
||||
DecodingError(#[from] yrs::encoding::read::Error),
|
||||
|
||||
#[error(transparent)]
|
||||
SerdeError(#[from] serde_json::Error),
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ use collab::sync_protocol::awareness::Awareness;
|
|||
use collab::sync_protocol::message::{Message, MessageReader, SyncMessage};
|
||||
use collab::sync_protocol::{handle_msg, ClientSyncProtocol, CollabSyncProtocol};
|
||||
use futures_util::{SinkExt, StreamExt};
|
||||
use lib0::decoding::Cursor;
|
||||
use realtime_entity::collab_msg::{CollabMessage, InitSync, ServerInit, UpdateSync};
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Deref;
|
||||
|
|
@ -18,6 +17,7 @@ use tokio::spawn;
|
|||
use tokio::sync::watch;
|
||||
use tokio_stream::wrappers::WatchStream;
|
||||
use tracing::{error, trace, warn, Level};
|
||||
use yrs::encoding::read::Cursor;
|
||||
use yrs::updates::decoder::DecoderV1;
|
||||
use yrs::updates::encoder::{Encoder, EncoderV1};
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ collab = { version = "0.1.0"}
|
|||
collab-entity = { version = "0.1.0" }
|
||||
database = { path = "../database" }
|
||||
database-entity.workspace = true
|
||||
yrs = "0.16.5"
|
||||
lib0 = "0.16.3"
|
||||
yrs.workspace = true
|
||||
chrono = "0.4.30"
|
||||
realtime-entity = { workspace = true, features = ["actix_message"] }
|
||||
uuid = { version = "1", features = ["v4"] }
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use collab::sync_protocol::awareness::{Awareness, AwarenessUpdate};
|
|||
use collab::sync_protocol::message::{Message, MessageReader, MSG_SYNC, MSG_SYNC_UPDATE};
|
||||
use collab::sync_protocol::{awareness, handle_msg};
|
||||
use futures_util::{SinkExt, StreamExt};
|
||||
use lib0::encoding::Write;
|
||||
use tokio::select;
|
||||
use tokio::sync::broadcast::error::SendError;
|
||||
use tokio::sync::broadcast::{channel, Sender};
|
||||
|
|
@ -20,6 +19,7 @@ use crate::collaborate::retry::SinkCollabMessageAction;
|
|||
use crate::error::RealtimeError;
|
||||
use realtime_entity::collab_msg::{CollabAck, CollabAwareness, CollabBroadcastData, CollabMessage};
|
||||
use tracing::{error, trace, warn};
|
||||
use yrs::encoding::write::Write;
|
||||
|
||||
/// A broadcast can be used to propagate updates produced by yrs [yrs::Doc] and [Awareness]
|
||||
/// to subscribes. One broadcast can be used to propagate updates for a single document with
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ pub enum RealtimeError {
|
|||
YAwareness(#[from] collab::sync_protocol::awareness::Error),
|
||||
|
||||
#[error("failed to deserialize message: {0}")]
|
||||
DecodingError(#[from] lib0::error::Error),
|
||||
DecodingError(#[from] yrs::encoding::read::Error),
|
||||
|
||||
#[error(transparent)]
|
||||
SerdeError(#[from] serde_json::Error),
|
||||
|
|
|
|||
Loading…
Reference in New Issue