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

Avoid feature unification during testing of --no-default-features #987

Merged
merged 6 commits into from
Feb 7, 2023
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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ jobs:
args: check --locked
- command: test
args: --all-features --workspace
- command: test
freesig marked this conversation as resolved.
Show resolved Hide resolved
args: --no-default-features --workspace
# use cargo make test to avoid workspace feature unification
- command: make
args: test --no-default-features
- command: test
args: --manifest-path version-compatibility/Cargo.toml --workspace
# disallow any job that takes longer than 45 minutes
Expand Down
2 changes: 1 addition & 1 deletion ci_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ cargo clippy --all-targets --all-features &&
cargo make check --locked &&
cargo make check --all-features --locked &&
cargo test --all-features --workspace &&
cargo test --no-default-features --workspace &&
cargo make test --no-default-features &&
cargo test --manifest-path version-compatibility/Cargo.toml --workspace
3 changes: 1 addition & 2 deletions crates/fuel-core/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::{
IterDirection,
},
};
use anyhow::Context;
use fuel_core_chain_config::{
ChainConfigDb,
CoinConfig,
Expand Down Expand Up @@ -42,7 +41,6 @@ type DatabaseError = Error;
type DatabaseResult<T> = Result<T>;

// TODO: Extract `Database` and all belongs into `fuel-core-database`.

#[cfg(feature = "rocksdb")]
use crate::state::rocks_db::RocksDb;
#[cfg(feature = "rocksdb")]
Expand Down Expand Up @@ -163,6 +161,7 @@ unsafe impl Sync for Database {}
impl Database {
#[cfg(feature = "rocksdb")]
pub fn open(path: &Path) -> DatabaseResult<Self> {
use anyhow::Context;
let db = RocksDb::default_open(path).context("Failed to open rocksdb, you may need to wipe a pre-existing incompatible db `rm -rf ~/.fuel/db`")?;

Ok(Database {
Expand Down