chore: update collab rev (#490)
This commit is contained in:
parent
ca70c42631
commit
1019b8c5b6
|
|
@ -1648,7 +1648,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cabc2b5d3e677393e5e7501bc07eb17b7b1643e6#cabc2b5d3e677393e5e7501bc07eb17b7b1643e6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
|
@ -1672,7 +1672,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab-document"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cabc2b5d3e677393e5e7501bc07eb17b7b1643e6#cabc2b5d3e677393e5e7501bc07eb17b7b1643e6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
|
|
@ -1691,7 +1691,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cabc2b5d3e677393e5e7501bc07eb17b7b1643e6#cabc2b5d3e677393e5e7501bc07eb17b7b1643e6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
|
|
@ -1706,7 +1706,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "collab-folder"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cabc2b5d3e677393e5e7501bc07eb17b7b1643e6#cabc2b5d3e677393e5e7501bc07eb17b7b1643e6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
|
|
|||
|
|
@ -209,10 +209,10 @@ debug = true
|
|||
# will be removed when using yrs 0.18.2 that expose pendings
|
||||
yrs = { git = "https://github.com/appflowy/y-crdt", rev = "3f25bb510ca5274e7657d3713fbed41fb46b4487" }
|
||||
|
||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }
|
||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }
|
||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }
|
||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }
|
||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cabc2b5d3e677393e5e7501bc07eb17b7b1643e6" }
|
||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cabc2b5d3e677393e5e7501bc07eb17b7b1643e6" }
|
||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cabc2b5d3e677393e5e7501bc07eb17b7b1643e6" }
|
||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cabc2b5d3e677393e5e7501bc07eb17b7b1643e6" }
|
||||
|
||||
[features]
|
||||
ai_enable = []
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
use collab::core::awareness::{Awareness, AwarenessUpdate};
|
||||
use collab::core::collab::{TransactionExt, TransactionMutExt};
|
||||
use collab::core::origin::CollabOrigin;
|
||||
use collab::core::transaction::TransactionRetry;
|
||||
use collab::preclude::Collab;
|
||||
|
||||
use yrs::updates::decoder::Decode;
|
||||
|
|
@ -46,9 +45,9 @@ impl CollabSyncProtocol for ClientSyncProtocol {
|
|||
awareness: &mut Awareness,
|
||||
update: Update,
|
||||
) -> Result<(), RTProtocolError> {
|
||||
let mut retry_txn = TransactionRetry::new(awareness.doc());
|
||||
let mut txn = retry_txn
|
||||
.try_get_write_txn_with(origin.clone())
|
||||
let mut txn = awareness
|
||||
.doc()
|
||||
.try_transact_mut_with(origin.clone())
|
||||
.map_err(|err| {
|
||||
RTProtocolError::YrsTransaction(format!("sync step2 transaction acquire: {}", err))
|
||||
})?;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use collab::core::awareness::Awareness;
|
||||
use collab::core::collab::{TransactionExt, TransactionMutExt};
|
||||
use collab::core::origin::CollabOrigin;
|
||||
use collab::core::transaction::TransactionRetry;
|
||||
|
||||
use collab_rt_protocol::CollabSyncProtocol;
|
||||
use collab_rt_protocol::{CustomMessage, Message, RTProtocolError, SyncMessage};
|
||||
|
||||
|
|
@ -39,9 +39,9 @@ impl CollabSyncProtocol for ServerSyncProtocol {
|
|||
awareness: &mut Awareness,
|
||||
update: Update,
|
||||
) -> Result<(), RTProtocolError> {
|
||||
let mut retry_txn = TransactionRetry::new(awareness.doc());
|
||||
let mut txn = retry_txn
|
||||
.try_get_write_txn_with(origin.clone())
|
||||
let mut txn = awareness
|
||||
.doc()
|
||||
.try_transact_mut_with(origin.clone())
|
||||
.map_err(|err| {
|
||||
RTProtocolError::YrsTransaction(format!("sync step2 transaction acquire: {}", err))
|
||||
})?;
|
||||
|
|
|
|||
Loading…
Reference in New Issue