Skip to content

Commit 52407a0

Browse files
leowmjwclaude
andcommitted
Summary: Rebase onto upstream v0.2.0 (database-primitive merge) + fix loro 1.12.0 API
- Rebase onto upstream/main ea1cbc6 (v0.2.0 tag, PR NodeDB-Lab#102 merge) - Resolve pool.rs conflict: keep database-aware authenticate() signature - Bump loro workspace dep =1.10.8 → =1.12.0 (loro-internal now at 1.12.0) - Add From<loro::LoroError> for CrdtError to support ? on fork_at() Result - Fix nodedb-crdt history.rs: fork_at() now returns Result in loro 1.12.0 - Regenerate Cargo.lock Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 28da3f2 commit 52407a0

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ bytes = "1"
131131
io-uring = "0.7"
132132

133133
# CRDTs
134-
loro = "=1.10.8"
134+
loro = "=1.12.0"
135135

136136
# Kafka bridge
137137
rdkafka = { version = "0.36", features = ["cmake-build"] }

nodedb-crdt/src/error.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,10 @@ pub enum CrdtError {
5353
},
5454
}
5555

56+
impl From<loro::LoroError> for CrdtError {
57+
fn from(e: loro::LoroError) -> Self {
58+
CrdtError::Loro(e.to_string())
59+
}
60+
}
61+
5662
pub type Result<T> = std::result::Result<T, CrdtError>;

nodedb-crdt/src/state/history.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl CrdtState {
2727
version: &loro::VersionVector,
2828
) -> Result<Option<LoroValue>> {
2929
let frontiers = self.doc.vv_to_frontiers(version);
30-
let forked = self.doc.fork_at(&frontiers);
30+
let forked = self.doc.fork_at(&frontiers)?;
3131

3232
let coll = forked.get_map(collection);
3333
match coll.get(row_id) {

0 commit comments

Comments
 (0)