chore: update yrs and appflowy collab (#759)

* chore: update yrs and appflowy collab

* chore: increased allowed number of dependencies
This commit is contained in:
Bartosz Sypytkowski 2024-08-27 13:58:58 +02:00 committed by GitHub
parent fee2c37aa4
commit 5badffc97b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 64 additions and 31 deletions

71
Cargo.lock generated
View File

@ -619,7 +619,7 @@ dependencies = [
"collab-rt-protocol", "collab-rt-protocol",
"collab-stream", "collab-stream",
"collab-user", "collab-user",
"dashmap", "dashmap 5.5.3",
"database", "database",
"database-entity", "database-entity",
"derive_more", "derive_more",
@ -704,7 +704,7 @@ dependencies = [
"collab-rt-entity", "collab-rt-entity",
"collab-rt-protocol", "collab-rt-protocol",
"collab-stream", "collab-stream",
"dashmap", "dashmap 5.5.3",
"database", "database",
"database-entity", "database-entity",
"dotenvy", "dotenvy",
@ -752,7 +752,7 @@ dependencies = [
"collab", "collab",
"collab-entity", "collab-entity",
"collab-stream", "collab-stream",
"dashmap", "dashmap 5.5.3",
"database", "database",
"dotenvy", "dotenvy",
"futures", "futures",
@ -896,6 +896,17 @@ dependencies = [
"serde_json", "serde_json",
] ]
[[package]]
name = "async-lock"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
dependencies = [
"event-listener",
"event-listener-strategy",
"pin-project-lite",
]
[[package]] [[package]]
name = "async-stream" name = "async-stream"
version = "0.3.5" version = "0.3.5"
@ -944,12 +955,6 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "atomic_refcell"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41e67cd8309bbd06cd603a9e693a784ac2e5d1e955f11286e355089fcab3047c"
[[package]] [[package]]
name = "authentication" name = "authentication"
version = "0.1.0" version = "0.1.0"
@ -2080,7 +2085,7 @@ dependencies = [
[[package]] [[package]]
name = "collab" name = "collab"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf5c871191e5fbbaa58af5ab7cb037f792e28297#cf5c871191e5fbbaa58af5ab7cb037f792e28297"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arc-swap", "arc-swap",
@ -2105,7 +2110,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-document" name = "collab-document"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf5c871191e5fbbaa58af5ab7cb037f792e28297#cf5c871191e5fbbaa58af5ab7cb037f792e28297"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arc-swap", "arc-swap",
@ -2125,7 +2130,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-entity" name = "collab-entity"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf5c871191e5fbbaa58af5ab7cb037f792e28297#cf5c871191e5fbbaa58af5ab7cb037f792e28297"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -2144,14 +2149,14 @@ dependencies = [
[[package]] [[package]]
name = "collab-folder" name = "collab-folder"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf5c871191e5fbbaa58af5ab7cb037f792e28297#cf5c871191e5fbbaa58af5ab7cb037f792e28297"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arc-swap", "arc-swap",
"chrono", "chrono",
"collab", "collab",
"collab-entity", "collab-entity",
"dashmap", "dashmap 5.5.3",
"getrandom 0.2.15", "getrandom 0.2.15",
"serde", "serde",
"serde_json", "serde_json",
@ -2228,7 +2233,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-user" name = "collab-user"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf5c871191e5fbbaa58af5ab7cb037f792e28297#cf5c871191e5fbbaa58af5ab7cb037f792e28297"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -2668,6 +2673,20 @@ dependencies = [
"parking_lot_core 0.9.10", "parking_lot_core 0.9.10",
] ]
[[package]]
name = "dashmap"
version = "6.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
"hashbrown 0.14.5",
"lock_api",
"once_cell",
"parking_lot_core 0.9.10",
]
[[package]] [[package]]
name = "data-encoding" name = "data-encoding"
version = "2.6.0" version = "2.6.0"
@ -2971,6 +2990,16 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
] ]
[[package]]
name = "event-listener-strategy"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1"
dependencies = [
"event-listener",
"pin-project-lite",
]
[[package]] [[package]]
name = "fancy-regex" name = "fancy-regex"
version = "0.11.0" version = "0.11.0"
@ -3328,7 +3357,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"dashmap", "dashmap 5.5.3",
"futures", "futures",
"futures-timer", "futures-timer",
"no-std-compat", "no-std-compat",
@ -4198,7 +4227,7 @@ checksum = "c325dfab65f261f386debee8b0969da215b3fa0037e74c8a1234db7ba986d803"
dependencies = [ dependencies = [
"crossbeam-channel", "crossbeam-channel",
"crossbeam-utils", "crossbeam-utils",
"dashmap", "dashmap 5.5.3",
"skeptic", "skeptic",
"smallvec", "smallvec",
"tagptr", "tagptr",
@ -8084,12 +8113,14 @@ dependencies = [
[[package]] [[package]]
name = "yrs" name = "yrs"
version = "0.19.2" version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8ca5126331b9a5ef5bb10f3f1c3d01b05f298d348c66f8fb15497d83ee73176" checksum = "a8fc56b25e3aaf4b81a73f2a9a68ceae1e02d9005552e24058cfb9f96db73f33"
dependencies = [ dependencies = [
"arc-swap", "arc-swap",
"atomic_refcell", "async-lock",
"async-trait",
"dashmap 6.0.1",
"fastrand", "fastrand",
"serde", "serde",
"serde_json", "serde_json",

View File

@ -264,7 +264,7 @@ pgvector = { version = "0.4", features = ["sqlx"] }
client-api-entity = { path = "libs/client-api-entity" } client-api-entity = { path = "libs/client-api-entity" }
# collaboration # collaboration
yrs = { version = "0.19.2", features = ["sync"] } yrs = { version = "0.21.0", features = ["sync"] }
collab = { version = "0.2.0" } collab = { version = "0.2.0" }
collab-entity = { version = "0.2.0" } collab-entity = { version = "0.2.0" }
collab-folder = { version = "0.2.0" } collab-folder = { version = "0.2.0" }
@ -283,11 +283,11 @@ debug = true
[patch.crates-io] [patch.crates-io]
# It's diffcult to resovle different version with the same crate used in AppFlowy Frontend and the Client-API crate. # It's diffcult to resovle different version with the same crate used in AppFlowy Frontend and the Client-API crate.
# So using patch to workaround this issue. # So using patch to workaround this issue.
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" } collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" } collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" } collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" } collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" } collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
[features] [features]
history = [] history = []

View File

@ -132,11 +132,13 @@ impl TestClient {
let collab = (*lock).borrow(); let collab = (*lock).borrow();
collab collab
.get_awareness() .get_awareness()
.clients()
.iter() .iter()
.map(|(_a, json)| { .flat_map(|(_a, client)| match &client.data {
let user: UserId = serde_json::from_str(json).unwrap(); None => None,
user.uid Some(json) => {
let user: UserId = serde_json::from_str(json).unwrap();
Some(user.uid)
},
}) })
.collect() .collect()
} }

View File

@ -3,7 +3,7 @@
# Generate the current dependency list # Generate the current dependency list
cargo tree > current_deps.txt cargo tree > current_deps.txt
BASELINE_COUNT=595 BASELINE_COUNT=609
CURRENT_COUNT=$(cat current_deps.txt | wc -l) CURRENT_COUNT=$(cat current_deps.txt | wc -l)
echo "Expected dependency count (baseline): $BASELINE_COUNT" echo "Expected dependency count (baseline): $BASELINE_COUNT"