Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
939 changes: 462 additions & 477 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ bytes = { version = "1", features = ["serde"] }
derive_more = { version = "2.0.1", features = ["from", "try_from", "into", "debug", "display", "deref", "deref_mut"] }
futures-lite = "2.6.0"
quinn = { package = "iroh-quinn", version = "0.14.0", optional = true }
n0-future = "0.3.0"
n0-snafu = "0.2.2"
n0-future = "0.3.1"
n0-snafu = { version = "0.2.2", git="https://github.com/n0-computer/n0-snafu.git", branch="b5/wasm" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remember to replace this with an actual dependency before merging.

range-collections = { version = "0.4.6", features = ["serde"] }
smallvec = { version = "1", features = ["serde", "const_new"] }
snafu = "0.8.5"
Expand All @@ -31,7 +31,7 @@ hex = "0.4.3"
serde = "1.0.217"
postcard = { version = "1.1.1", features = ["experimental-derive", "use-std"] }
data-encoding = "2.8.0"
chrono = "0.4.39"
chrono = {version = "0.4.39", default-features = false, features = ["js-sys", "wasmbind", "std"] }
nested_enum_utils = "0.2.1"
ref-cast = "1.0.24"
arrayvec = "0.7.6"
Expand Down
1 change: 0 additions & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ impl From<irpc::Error> for ExportBaoError {
irpc::Error::OneshotRecv { source, .. } => OneshotRecvSnafu.into_error(source),
irpc::Error::Send { source, .. } => SendSnafu.into_error(source),
irpc::Error::Request { source, .. } => RequestSnafu.into_error(source),
#[cfg(feature = "rpc")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to stay

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the reason for the CI fails. We might want to fix this in irpc because it's a bit footgunny: The irpc::Error::Write variant is only present if the rpc feature of irpc is enabled. But for now just leave in the cfg here.

irpc::Error::Write { source, .. } => ExportBaoIoSnafu.into_error(source.into()),
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
//! or you can choose to finish early.
//!
//! [iroh]: https://docs.rs/iroh
use std::{
fmt::{self, Debug},
time::Duration,
};
use std::fmt::{self, Debug};

use anyhow::Result;
use bao_tree::{io::fsm::BaoContentItem, ChunkNum};
use fsm::RequestCounters;
use n0_future::time::Instant;
use n0_future::time::{Duration, Instant};
use n0_snafu::SpanTrace;
use nested_enum_utils::common_fields;
use serde::{Deserialize, Serialize};
Expand Down
7 changes: 5 additions & 2 deletions src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
//! Note that while using this API directly is fine, the standard way
//! to provide data is to just register a [`crate::BlobsProtocol`] protocol
//! handler with an [`iroh::Endpoint`](iroh::protocol::Router).
use std::{fmt::Debug, future::Future, io, time::Duration};
use std::{fmt::Debug, future::Future, io};

use anyhow::Result;
use bao_tree::ChunkRanges;
use iroh::endpoint::{self, ConnectionError, VarInt};
use iroh_io::{AsyncStreamReader, AsyncStreamWriter};
use n0_future::{time::Instant, StreamExt};
use n0_future::{
time::{Duration, Instant},
StreamExt,
};
use serde::{Deserialize, Serialize};
use snafu::Snafu;
use tokio::select;
Expand Down
2 changes: 1 addition & 1 deletion src/store/fs/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ use std::{
io,
ops::{Bound, Deref, DerefMut},
path::PathBuf,
time::SystemTime,
};

use bao_tree::BaoTree;
use bytes::Bytes;
use irpc::channel::mpsc;
use n0_future::time::SystemTime;
use n0_snafu::SpanTrace;
use nested_enum_utils::common_fields;
use redb::{Database, DatabaseError, ReadableTable};
Expand Down
7 changes: 3 additions & 4 deletions src/store/fs/options.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! Options for configuring the file store.
use std::{
path::{Path, PathBuf},
time::Duration,
};
use std::path::{Path, PathBuf};

use n0_future::time::Duration;

use super::{meta::raw_outboard_size, temp_name};
use crate::{store::gc::GcConfig, Hash};
Expand Down
4 changes: 2 additions & 2 deletions src/store/fs/util/entity_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,10 +819,10 @@ mod tests {
atomic::{AtomicUsize, Ordering},
Arc, Mutex,
},
time::Instant,
};

use atomic_refcell::AtomicRefCell;
use n0_future::time::Instant;

use super::*;

Expand Down Expand Up @@ -1070,10 +1070,10 @@ mod tests {
collections::HashSet,
path::{Path, PathBuf},
sync::{Arc, Mutex},
time::Instant,
};

use atomic_refcell::AtomicRefCell;
use n0_future::time::Instant;

use super::*;

Expand Down
2 changes: 1 addition & 1 deletion src/store/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fn gc_sweep<'a>(
#[derive(derive_more::Debug, Clone)]
pub struct GcConfig {
/// Interval in which to run garbage collection.
pub interval: std::time::Duration,
pub interval: n0_future::time::Duration,
/// Optional callback to manually add protected blobs.
///
/// The callback is called before each garbage collection run. It gets a `&mut HashSet<Hash>`
Expand Down
2 changes: 1 addition & 1 deletion src/util/connection_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::{
atomic::{AtomicUsize, Ordering},
Arc,
},
time::Duration,
};

use iroh::{
Expand All @@ -25,6 +24,7 @@ use iroh::{
};
use n0_future::{
future::{self},
time::Duration,
FuturesUnordered, MaybeFuture, Stream, StreamExt,
};
use snafu::Snafu;
Expand Down
Loading