Skip to content

Commit

Permalink
Merge branch 'tomas/fix-check-crates' (#1712)
Browse files Browse the repository at this point in the history
* origin/tomas/fix-check-crates:
  changelog: add #1712
  wasm_for_tests: rm unused patches
  make: add wasm_for_tests check to `check-crates`
  test_utils: fix crate compilation with default features
  apps: fix crate compilation with default features
  shared: fix crate compilation with default features
  make/check-crates: fix non-zero exit status propagation
  • Loading branch information
Fraccaman committed Jul 26, 2023
2 parents 04f2f79 + e183d97 commit 8139da2
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 60 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/1712-fix-check-crates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Ensure that each crate in the workspace can be built with default features.
([\#1712](https://github.com/anoma/namada/pull/1712))
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ check-mainnet:

# Check that every crate can be built with default features
check-crates:
$(foreach p,$(crates), echo "Checking $(p)"; cargo +$(nightly) check -Z unstable-options --tests -p $(p) && ) true
$(foreach p,$(crates), echo "Checking $(p)" && cargo +$(nightly) check -Z unstable-options --tests -p $(p) && ) \
make -C $(wasms_for_tests) check

clippy-wasm = $(cargo) +$(nightly) clippy --manifest-path $(wasm)/Cargo.toml --all-targets -- -D warnings

Expand Down
10 changes: 3 additions & 7 deletions apps/src/lib/config/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ use derivative::Derivative;
#[cfg(not(feature = "mainnet"))]
use namada::core::ledger::testnet_pow;
use namada::ledger::eth_bridge::EthereumBridgeConfig;
#[cfg(feature = "dev")]
use namada::ledger::eth_bridge::{Contracts, UpgradeableContract};
use namada::ledger::governance::parameters::GovParams;
use namada::ledger::parameters::EpochDuration;
use namada::ledger::pos::{Dec, GenesisValidator, PosParams};
#[cfg(feature = "dev")]
use namada::types::address::wnam;
use namada::types::address::Address;
use namada::types::chain::ProposalBytes;
#[cfg(feature = "dev")]
use namada::types::ethereum_events::EthAddress;
use namada::types::key::dkg_session_keys::DkgPublicKey;
use namada::types::key::*;
use namada::types::time::{DateTimeUtc, DurationSecs};
Expand Down Expand Up @@ -879,9 +873,11 @@ pub fn genesis(
}
#[cfg(any(test, feature = "dev"))]
pub fn genesis(num_validators: u64) -> Genesis {
use namada::ledger::eth_bridge::{Contracts, UpgradeableContract};
use namada::types::address::{
self, apfel, btc, dot, eth, kartoffel, nam, schnitzel,
self, apfel, btc, dot, eth, kartoffel, nam, schnitzel, wnam,
};
use namada::types::ethereum_events::EthAddress;

use crate::wallet;

Expand Down
1 change: 1 addition & 0 deletions shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ wasmtimer = "0.2.0"

[dev-dependencies]
namada_core = {path = "../core", default-features = false, features = ["secp256k1-sign", "testing", "ibc-mocks"]}
namada_ethereum_bridge = {path = "../ethereum_bridge", default-features = false, features = ["testing"]}
namada_test_utils = {path = "../test_utils"}
assert_matches.workspace = true
async-trait.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion test_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ repository.workspace = true
version.workspace = true

[dependencies]
namada_core = { path = "../core", default-features = false }
namada_core = { path = "../core", default-features = false, features = ["abciplus"] }
borsh = "0.9.0"
strum = {version = "0.24", features = ["derive"]}
40 changes: 0 additions & 40 deletions wasm_for_tests/wasm_source/Cargo.lock

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

11 changes: 0 additions & 11 deletions wasm_for_tests/wasm_source/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ borsh = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4
borsh-derive = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
borsh-derive-internal = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
borsh-schema-derive-internal = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
# patched to a commit on the `eth-bridge-integration+consensus-timeout` branch of our fork
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "2b007eeecb9e2b3d78a858ddf407328d83ac9ec3"}
tendermint-config = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "2b007eeecb9e2b3d78a858ddf407328d83ac9ec3"}
tendermint-proto = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "2b007eeecb9e2b3d78a858ddf407328d83ac9ec3"}
tendermint-rpc = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "2b007eeecb9e2b3d78a858ddf407328d83ac9ec3"}
tendermint-testgen = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "2b007eeecb9e2b3d78a858ddf407328d83ac9ec3"}
tendermint-light-client-verifier = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "2b007eeecb9e2b3d78a858ddf407328d83ac9ec3"}

# patched to a commit on the `eth-bridge-integration` branch of our fork
ibc = {git = "https://github.com/heliaxdev/cosmos-ibc-rs.git", rev = "2a5ef5188c8d1e7e91260c3219796239c5053721"}
ibc-proto = {git = "https://github.com/heliaxdev/ibc-proto-rs.git", rev = "277f31a69583c12bf8d54a92b5541d8b738d9962"}

[dev-dependencies]
namada_tests = {path = "../../tests"}
Expand Down

0 comments on commit 8139da2

Please sign in to comment.