From 563fa2e0546379ec573a8494431dc706f0bd3709 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Thu, 22 Sep 2022 20:43:39 -0400 Subject: [PATCH 1/5] Unpin time dependency Signed-off-by: Thane Thomson --- light-client-verifier/Cargo.toml | 2 +- light-client/Cargo.toml | 3 +-- pbt-gen/Cargo.toml | 6 ++---- proto/Cargo.toml | 3 +-- tendermint/Cargo.toml | 3 +-- testgen/Cargo.toml | 3 +-- 6 files changed, 7 insertions(+), 13 deletions(-) diff --git a/light-client-verifier/Cargo.toml b/light-client-verifier/Cargo.toml index 45b40700e..603cf66c2 100644 --- a/light-client-verifier/Cargo.toml +++ b/light-client-verifier/Cargo.toml @@ -30,7 +30,7 @@ tendermint = { version = "0.23.9", path = "../tendermint", default-features = fa derive_more = { version = "0.99.5", default-features = false, features = ["display"] } serde = { version = "1.0.106", default-features = false } -time = { version = "0.3.5", default-features = false } +time = { version = "0.3", default-features = false } flex-error = { version = "0.4.4", default-features = false } [dev-dependencies] diff --git a/light-client/Cargo.toml b/light-client/Cargo.toml index 55cd61a6e..4009634b3 100644 --- a/light-client/Cargo.toml +++ b/light-client/Cargo.toml @@ -47,8 +47,7 @@ serde_cbor = { version = "0.11.1", default-features = false, features = ["alloc" serde_derive = { version = "1.0.106", default-features = false } sled = { version = "0.34.3", optional = true, default-features = false } static_assertions = { version = "1.1.0", default-features = false } -# TODO(thane): Remove restrictions once js-sys issue is resolved (causes the Substrate no_std check to fail) -time = { version = ">=0.3, <0.3.12", default-features = false, features = ["std"] } +time = { version = "0.3", default-features = false, features = ["std"] } tokio = { version = "1.0", default-features = false, features = ["rt"], optional = true } flex-error = { version = "0.4.4", default-features = false } diff --git a/pbt-gen/Cargo.toml b/pbt-gen/Cargo.toml index 4cd0bb7a5..47f9a0523 100644 --- a/pbt-gen/Cargo.toml +++ b/pbt-gen/Cargo.toml @@ -19,10 +19,8 @@ description = """ default = ["time"] [dependencies] -# TODO(thane): Remove restrictions once js-sys issue is resolved (causes the Substrate no_std check to fail) -time = { version = ">=0.3, <0.3.12", default-features = false, optional = true } +time = { version = "0.3", default-features = false, optional = true } proptest = { version = "0.10.1", default-features = false, features = ["std"] } [dev-dependencies] -# TODO(thane): Remove restrictions once js-sys issue is resolved (causes the Substrate no_std check to fail) -time = { version = ">=0.3, <0.3.12", features = ["macros"] } +time = { version = "0.3", features = ["macros"] } diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 1b5c5a6c3..2675dbb7b 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -25,8 +25,7 @@ serde_bytes = { version = "0.11", default-features = false, features = ["alloc"] subtle-encoding = { version = "0.5", default-features = false, features = ["hex", "base64", "alloc"] } num-traits = { version = "0.2", default-features = false } num-derive = { version = "0.3", default-features = false } -# TODO(thane): Remove restrictions once js-sys issue is resolved (causes the Substrate no_std check to fail) -time = { version = ">=0.3, <0.3.12", default-features = false, features = ["macros", "parsing"] } +time = { version = "0.3", default-features = false, features = ["macros", "parsing"] } flex-error = { version = "0.4.4", default-features = false } [dev-dependencies] diff --git a/tendermint/Cargo.toml b/tendermint/Cargo.toml index f80d6085e..fd0a20e52 100644 --- a/tendermint/Cargo.toml +++ b/tendermint/Cargo.toml @@ -48,8 +48,7 @@ signature = { version = "1", default-features = false } subtle = { version = "2", default-features = false } subtle-encoding = { version = "0.5", default-features = false, features = ["bech32-preview"] } tendermint-proto = { version = "0.23.9", default-features = false, path = "../proto" } -# TODO(thane): Remove restrictions once js-sys issue is resolved (causes the Substrate no_std check to fail) -time = { version = ">=0.3, <0.3.12", default-features = false, features = ["macros", "parsing"] } +time = { version = "0.3", default-features = false, features = ["macros", "parsing"] } zeroize = { version = "1.1", default-features = false, features = ["zeroize_derive", "alloc"] } flex-error = { version = "0.4.4", default-features = false } k256 = { version = "0.11", optional = true, default-features = false, features = ["ecdsa", "sha256"] } diff --git a/testgen/Cargo.toml b/testgen/Cargo.toml index ba69965b4..3e3a12926 100644 --- a/testgen/Cargo.toml +++ b/testgen/Cargo.toml @@ -23,8 +23,7 @@ ed25519-dalek = { version = "1", default-features = false } gumdrop = { version = "0.8.0", default-features = false } simple-error = { version = "0.2.1", default-features = false } tempfile = { version = "3.1.0", default-features = false } -# TODO(thane): Remove restrictions once js-sys issue is resolved (causes the Substrate no_std check to fail) -time = { package = "time", version = ">=0.3, <0.3.12", default-features = false, features = ["std"] } +time = { package = "time", version = "0.3", default-features = false, features = ["std"] } [[bin]] name = "tendermint-testgen" From 164edeb0a08f23f51254a57b7a1fe305910c4cdb Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Thu, 22 Sep 2022 21:17:13 -0400 Subject: [PATCH 2/5] Remove failing time test Signed-off-by: Thane Thomson --- tendermint/src/time.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/tendermint/src/time.rs b/tendermint/src/time.rs index 00114efb0..f230df8cc 100644 --- a/tendermint/src/time.rs +++ b/tendermint/src/time.rs @@ -235,7 +235,6 @@ mod tests { let dts = vec![ datetime!(0000-12-31 23:59:59.999999999 UTC), datetime!(0001-01-01 00:00:00.999999999 +00:00:01), - datetime!(9999-12-31 23:59:59 -00:00:01), Date::from_calendar_date(-1, October, 9) .unwrap() .midnight() From 84cde7518f4b393a20e0a45368a9e0db3f9a2510 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Thu, 22 Sep 2022 21:26:30 -0400 Subject: [PATCH 3/5] ci: Bump Rust nightly version for coverage test Signed-off-by: Thane Thomson --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c665f6bb..eea0c9354 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -151,7 +151,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly-2021-11-10 + toolchain: nightly-2022-09-18 override: true - uses: actions-rs/cargo@v1 with: From 846ae4ebd8933bacaab53dff6cefcb3d78122223 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Thu, 22 Sep 2022 21:28:19 -0400 Subject: [PATCH 4/5] ci: Bump grcov version to v0.8.11 for nightly coverage test Signed-off-by: Thane Thomson --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eea0c9354..3e4ee01a1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -162,7 +162,7 @@ jobs: - name: Install grcov run: | rustup component add llvm-tools-preview - curl -L https://github.com/mozilla/grcov/releases/download/v0.8.7/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - + curl -L https://github.com/mozilla/grcov/releases/download/v0.8.11/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - - name: Run grcov run: | ./grcov . --source-dir . --binary-path ./target/debug/ --output-type lcov --output-path ./lcov.info --branch --ignore-not-existing From ab43daba5c9429f698b848516f3c5bb428961fd6 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Thu, 22 Sep 2022 22:22:33 -0400 Subject: [PATCH 5/5] Add changelog entry Signed-off-by: Thane Thomson --- .changelog/unreleased/dependencies/1199-unpin-time-dep.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changelog/unreleased/dependencies/1199-unpin-time-dep.md diff --git a/.changelog/unreleased/dependencies/1199-unpin-time-dep.md b/.changelog/unreleased/dependencies/1199-unpin-time-dep.md new file mode 100644 index 000000000..72320aa90 --- /dev/null +++ b/.changelog/unreleased/dependencies/1199-unpin-time-dep.md @@ -0,0 +1,2 @@ +- Unpin `time` dependency + ([#1199](https://github.com/informalsystems/tendermint-rs/pull/1199))