From c7de2d666b19133df7cf2dc9b9b6a80ba3d37642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Thu, 13 Jul 2023 09:55:13 +0100 Subject: [PATCH 1/7] make/check-crates: fix non-zero exit status propagation --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a347ff8e27..62ea85435f 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ 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) && ) true clippy-wasm = $(cargo) +$(nightly) clippy --manifest-path $(wasm)/Cargo.toml --all-targets -- -D warnings From eee02ab0b00230e167c281e48a6513ef4406aa8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Thu, 13 Jul 2023 09:59:42 +0100 Subject: [PATCH 2/7] shared: fix crate compilation with default features --- shared/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 457b64ec82..28711a0329 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -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 From 187722efe49cd9024cd9287782b5eeaf3297fdd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Thu, 13 Jul 2023 10:04:00 +0100 Subject: [PATCH 3/7] apps: fix crate compilation with default features --- apps/src/lib/config/genesis.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/src/lib/config/genesis.rs b/apps/src/lib/config/genesis.rs index 7e9500a3b2..5c86debcb6 100644 --- a/apps/src/lib/config/genesis.rs +++ b/apps/src/lib/config/genesis.rs @@ -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}; @@ -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; From cfb688412d14a2cfaaa36d4581dada08dbbd7d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Thu, 13 Jul 2023 10:11:36 +0100 Subject: [PATCH 4/7] test_utils: fix crate compilation with default features --- test_utils/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_utils/Cargo.toml b/test_utils/Cargo.toml index 34252e09f1..8e0a9c6719 100644 --- a/test_utils/Cargo.toml +++ b/test_utils/Cargo.toml @@ -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"]} From caf31d40708f20dd1ecb84fb0529e224ed14406d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Thu, 13 Jul 2023 10:16:29 +0100 Subject: [PATCH 5/7] make: add wasm_for_tests check to `check-crates` --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 62ea85435f..5e129b4b2c 100644 --- a/Makefile +++ b/Makefile @@ -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 From 30f72ed5e13c7f2b15029181d299b6301e1d39ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Thu, 13 Jul 2023 10:17:39 +0100 Subject: [PATCH 6/7] wasm_for_tests: rm unused patches --- wasm_for_tests/wasm_source/Cargo.lock | 40 --------------------------- wasm_for_tests/wasm_source/Cargo.toml | 11 -------- 2 files changed, 51 deletions(-) diff --git a/wasm_for_tests/wasm_source/Cargo.lock b/wasm_for_tests/wasm_source/Cargo.lock index c145c9062f..d35ad6a0f8 100644 --- a/wasm_for_tests/wasm_source/Cargo.lock +++ b/wasm_for_tests/wasm_source/Cargo.lock @@ -7434,43 +7434,3 @@ dependencies = [ "quote", "syn 2.0.16", ] - -[[patch.unused]] -name = "ibc" -version = "0.36.0" -source = "git+https://github.com/heliaxdev/cosmos-ibc-rs.git?rev=2a5ef5188c8d1e7e91260c3219796239c5053721#2a5ef5188c8d1e7e91260c3219796239c5053721" - -[[patch.unused]] -name = "ibc-proto" -version = "0.26.0" -source = "git+https://github.com/heliaxdev/ibc-proto-rs.git?rev=277f31a69583c12bf8d54a92b5541d8b738d9962#277f31a69583c12bf8d54a92b5541d8b738d9962" - -[[patch.unused]] -name = "tendermint" -version = "0.23.6" -source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=2b007eeecb9e2b3d78a858ddf407328d83ac9ec3#2b007eeecb9e2b3d78a858ddf407328d83ac9ec3" - -[[patch.unused]] -name = "tendermint-config" -version = "0.23.6" -source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=2b007eeecb9e2b3d78a858ddf407328d83ac9ec3#2b007eeecb9e2b3d78a858ddf407328d83ac9ec3" - -[[patch.unused]] -name = "tendermint-light-client-verifier" -version = "0.23.6" -source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=2b007eeecb9e2b3d78a858ddf407328d83ac9ec3#2b007eeecb9e2b3d78a858ddf407328d83ac9ec3" - -[[patch.unused]] -name = "tendermint-proto" -version = "0.23.6" -source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=2b007eeecb9e2b3d78a858ddf407328d83ac9ec3#2b007eeecb9e2b3d78a858ddf407328d83ac9ec3" - -[[patch.unused]] -name = "tendermint-rpc" -version = "0.23.6" -source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=2b007eeecb9e2b3d78a858ddf407328d83ac9ec3#2b007eeecb9e2b3d78a858ddf407328d83ac9ec3" - -[[patch.unused]] -name = "tendermint-testgen" -version = "0.23.6" -source = "git+https://github.com/heliaxdev/tendermint-rs.git?rev=2b007eeecb9e2b3d78a858ddf407328d83ac9ec3#2b007eeecb9e2b3d78a858ddf407328d83ac9ec3" diff --git a/wasm_for_tests/wasm_source/Cargo.toml b/wasm_for_tests/wasm_source/Cargo.toml index 0d23efd8d0..636e42405c 100644 --- a/wasm_for_tests/wasm_source/Cargo.toml +++ b/wasm_for_tests/wasm_source/Cargo.toml @@ -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"} From e183d97823b5e8ff43ca0754a4fc33c1f4d9c9d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Thu, 13 Jul 2023 10:19:52 +0100 Subject: [PATCH 7/7] changelog: add #1712 --- .changelog/unreleased/bug-fixes/1712-fix-check-crates.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changelog/unreleased/bug-fixes/1712-fix-check-crates.md diff --git a/.changelog/unreleased/bug-fixes/1712-fix-check-crates.md b/.changelog/unreleased/bug-fixes/1712-fix-check-crates.md new file mode 100644 index 0000000000..61ae74eb29 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/1712-fix-check-crates.md @@ -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)) \ No newline at end of file