Skip to content

Commit

Permalink
Merge pull request maidsafe#2593 from grumbach/remove_feat_flags
Browse files Browse the repository at this point in the history
feat: remove feat flags
  • Loading branch information
grumbach authored Jan 10, 2025
2 parents 5bb1563 + 4704f48 commit 98bc1b3
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ jobs:

- name: Run autonomi tests
timeout-minutes: 25
run: cargo test --release --package autonomi --features full,local --lib
run: cargo test --release --package autonomi --features local --lib

- name: Run autonomi doc tests
timeout-minutes: 25
run: cargo test --release --package autonomi --features full,local --doc
run: cargo test --release --package autonomi --features local --doc

- name: Run bootstrap tests
timeout-minutes: 25
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ jobs:

- name: Run autonomi tests
timeout-minutes: 25
run: cargo test --release --package autonomi --lib --features="full,fs"
run: cargo test --release --package autonomi --lib --features="full"

- name: Run bootstrap tests
timeout-minutes: 25
Expand Down
41 changes: 41 additions & 0 deletions Cargo.lock

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

5 changes: 1 addition & 4 deletions ant-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
autonomi = { path = "../autonomi", version = "0.3.3", features = [
"fs",
"vault",
"registers",
"loud",
] }
clap = { version = "4.2.1", features = ["derive"] }
Expand Down Expand Up @@ -60,7 +57,7 @@ tracing = { version = "~0.1.26" }
walkdir = "2.5.0"

[dev-dependencies]
autonomi = { path = "../autonomi", version = "0.3.3", features = ["fs"]}
autonomi = { path = "../autonomi", version = "0.3.3" }
criterion = "0.5.1"
eyre = "0.6.8"
rand = { version = "~0.8.5", features = ["small_rng"] }
Expand Down
2 changes: 1 addition & 1 deletion ant-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ xor_name = "5.0.0"
ant-protocol = { path = "../ant-protocol", version = "0.3.3", features = ["rpc"] }
assert_fs = "1.0.0"
evmlib = { path = "../evmlib", version = "0.1.8" }
autonomi = { path = "../autonomi", version = "0.3.3", features = ["registers"] }
autonomi = { path = "../autonomi", version = "0.3.3" }
reqwest = { version = "0.12.2", default-features = false, features = [
"rustls-tls-manual-roots",
] }
Expand Down
11 changes: 3 additions & 8 deletions autonomi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@ crate-type = ["cdylib", "rlib"]

[[example]]
name = "data_and_archive"
required-features = ["full"]

[[example]]
name = "put_and_dir_upload"
required-features = ["full"]

[features]
default = ["vault"]
default = []
external-signer = ["ant-evm/external-signer"]
extension-module = ["pyo3/extension-module"]
fs = ["tokio/fs"]
full = ["vault", "fs"]
local = ["ant-networking/local", "ant-evm/local"]
loud = []
registers = []
vault = []

[dependencies]
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.3" }
Expand All @@ -55,7 +49,7 @@ self_encryption = "~0.30.0"
serde = { version = "1.0.133", features = ["derive", "rc"] }
sha2 = "0.10.6"
thiserror = "1.0.23"
tokio = { version = "1.35.0", features = ["sync"] }
tokio = { version = "1.35.0", features = ["sync", "fs"] }
tracing = { version = "~0.1.26" }
walkdir = "2.5.0"
xor_name = "5.0.0"
Expand All @@ -64,6 +58,7 @@ xor_name = "5.0.0"
alloy = { version = "0.7.3", default-features = false, features = ["contract", "json-rpc", "network", "node-bindings", "provider-http", "reqwest-rustls-tls", "rpc-client", "rpc-types", "signer-local", "std"] }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
eyre = "0.6.5"
serial_test = "3.2.0"
sha2 = "0.10.6"
# Do not specify the version field. Release process expects even the local dev deps to be published.
# Removing the version field is a workaround.
Expand Down
6 changes: 0 additions & 6 deletions autonomi/src/client/files/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
#[cfg(feature = "fs")]
use std::path::{Path, PathBuf};

pub mod archive;
pub mod archive_public;
#[cfg(feature = "fs")]
#[cfg_attr(docsrs, doc(cfg(feature = "fs")))]
pub mod fs;
#[cfg(feature = "fs")]
#[cfg_attr(docsrs, doc(cfg(feature = "fs")))]
pub mod fs_public;

#[cfg(feature = "fs")]
pub(crate) fn get_relative_file_path_from_abs_file_and_folder_path(
abs_file_pah: &Path,
abs_folder_path: &Path,
Expand Down
4 changes: 0 additions & 4 deletions autonomi/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ pub mod pointer;
#[cfg(feature = "external-signer")]
#[cfg_attr(docsrs, doc(cfg(feature = "external-signer")))]
pub mod external_signer;
#[cfg(feature = "registers")]
#[cfg_attr(docsrs, doc(cfg(feature = "registers")))]
pub mod registers;
#[cfg(feature = "vault")]
#[cfg_attr(docsrs, doc(cfg(feature = "vault")))]
pub mod vault;

// private module with utility functions
Expand Down
8 changes: 4 additions & 4 deletions autonomi/tests/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
// KIND, either express or implied. Please review the Licences for the specific language governing
// permissions and limitations relating to use of the SAFE Network Software.

#![cfg(feature = "fs")]

use ant_logging::LogBuilder;
use autonomi::Client;
use eyre::Result;
use serial_test::serial;
use sha2::{Digest, Sha256};
use std::fs::File;
use std::io::{BufReader, Read};
Expand All @@ -20,8 +19,9 @@ use tokio::time::sleep;
use walkdir::WalkDir;

// With a local evm network, and local network, run:
// EVM_NETWORK=local cargo test --features="fs,local" --package autonomi --test file
// EVM_NETWORK=local cargo test --features="local" --package autonomi --test fs
#[tokio::test]
#[serial]
async fn dir_upload_download() -> Result<()> {
let _log_appender_guard =
LogBuilder::init_single_threaded_tokio_test("dir_upload_download", false);
Expand Down Expand Up @@ -76,8 +76,8 @@ fn compute_dir_sha256(dir: &str) -> Result<String> {
Ok(format!("{:x}", hasher.finalize()))
}

#[cfg(feature = "vault")]
#[tokio::test]
#[serial]
async fn file_into_vault() -> Result<()> {
let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("file", false);

Expand Down
1 change: 0 additions & 1 deletion autonomi/tests/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// KIND, either express or implied. Please review the Licences for the specific language governing
// permissions and limitations relating to use of the SAFE Network Software.

#![cfg(feature = "registers")]
#![allow(deprecated)]

use ant_logging::LogBuilder;
Expand Down

0 comments on commit 98bc1b3

Please sign in to comment.