From 224eb0031336c65bee86d427a66ce7bda8ad11f2 Mon Sep 17 00:00:00 2001 From: Michal Nazarewicz Date: Wed, 18 Oct 2023 18:23:45 +0200 Subject: [PATCH] chore: enable `std` feature when `mocks` is enabled `mocks` feature results in use of `Timestamp::now` which is only defined when `std` feature is enabled. Make `std` implied by `mocks`. --- .../850-fix-wasm-compilation-error-with-floats.md | 2 +- .../unreleased/improvements/926_mocks_implies_std.md | 9 +++++++++ crates/ibc/Cargo.toml | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .changelog/unreleased/improvements/926_mocks_implies_std.md diff --git a/.changelog/unreleased/improvements/850-fix-wasm-compilation-error-with-floats.md b/.changelog/unreleased/improvements/850-fix-wasm-compilation-error-with-floats.md index ca866767a..bb17a129e 100644 --- a/.changelog/unreleased/improvements/850-fix-wasm-compilation-error-with-floats.md +++ b/.changelog/unreleased/improvements/850-fix-wasm-compilation-error-with-floats.md @@ -1,4 +1,4 @@ - Fix compilation issue with Wasm envs because of floats - Use `serde-json-wasm` dependency instead of `serde-json` for no-floats support - Add CI test to include CosmWasm compilation check -([/#850](https://github.com/cosmos/ibc-rs/issues/850)) +([\#850](https://github.com/cosmos/ibc-rs/issues/850)) diff --git a/.changelog/unreleased/improvements/926_mocks_implies_std.md b/.changelog/unreleased/improvements/926_mocks_implies_std.md new file mode 100644 index 000000000..85474a8b9 --- /dev/null +++ b/.changelog/unreleased/improvements/926_mocks_implies_std.md @@ -0,0 +1,9 @@ +- Change `mocks` feature to imply `std` since it requires + Timestamp::now to work. + ([\#926](https://github.com/cosmos/ibc-rs/pull/926)) + + diff --git a/crates/ibc/Cargo.toml b/crates/ibc/Cargo.toml index afbba5561..79723ca7c 100644 --- a/crates/ibc/Cargo.toml +++ b/crates/ibc/Cargo.toml @@ -21,7 +21,7 @@ default = ["std"] std = [ "ibc-proto/std", "ics23/std", - "serde/std", + "serde/std", "tracing/std", "prost/std", "bytes/std", @@ -46,7 +46,7 @@ schema = ["dep:schemars", "serde", "std"] # This feature grants access to development-time mocking libraries, such as `MockContext` or `MockHeader`. # Depends on the `testgen` suite for generating Tendermint light blocks. -mocks = ["tendermint-testgen", "tendermint/clock", "parking_lot", "typed-builder"] +mocks = ["tendermint-testgen", "parking_lot", "typed-builder", "std"] [dependencies] # Proto definitions for all IBC-related interfaces, e.g., connections or channels.