Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch back to fs2 due to macOS allocation bug #2589

Merged
merged 1 commit into from
Mar 8, 2024
Merged
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
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/subspace-farmer-components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ async-lock = "3.3.0"
async-trait = "0.1.77"
backoff = { version = "0.4.0", features = ["futures", "tokio"] }
bitvec = "1.0.1"
fs4 = "0.8.0"
# TODO: Switch to fs4 once https://github.com/al8n/fs4-rs/issues/15 is resolved
fs2 = "0.4.3"
futures = "0.3.29"
hex = "0.4.3"
libc = "0.2.152"
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-farmer-components/src/file_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl FileExt for File {
if self.size()? == len {
return Ok(());
}
fs4::FileExt::allocate(self, len)
fs2::FileExt::allocate(self, len)
}

#[cfg(target_os = "linux")]
Expand Down
3 changes: 2 additions & 1 deletion crates/subspace-networking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ clap = { version = "4.4.18", features = ["color", "derive"] }
derive_more = "0.99.17"
either = "1.8.1"
event-listener-primitives = "2.0.1"
fs4 = "0.8.0"
# TODO: Switch to fs4 once https://github.com/al8n/fs4-rs/issues/15 is resolved
fs2 = "0.4.3"
futures = "0.3.29"
futures-timer = "3.0.2"
hex = "0.4.3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::{AsyncJoinOnDrop, CollectionBatcher, Handler, HandlerFn, PeerAddress};
use async_trait::async_trait;
use event_listener_primitives::HandlerId;
use fs4::FileExt;
use fs2::FileExt;
use futures::future::{pending, Fuse};
use futures::FutureExt;
use libp2p::multiaddr::Protocol;
Expand Down
Loading