From 1c0aa3375de7b61e100e8b5d1f8fad436d243915 Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 18 Jan 2024 13:18:20 +0100 Subject: [PATCH 1/2] build: patch a yanked near-sdk dependency --- Cargo.toml | 5 +++++ .../tests/contracts/access_controllable/Cargo.toml | 5 +++++ near-plugins-derive/tests/contracts/ownable/Cargo.toml | 5 +++++ near-plugins-derive/tests/contracts/pausable/Cargo.toml | 5 +++++ near-plugins-derive/tests/contracts/upgradable/Cargo.toml | 5 +++++ near-plugins-derive/tests/contracts/upgradable_2/Cargo.toml | 5 +++++ .../tests/contracts/upgradable_state_migration/Cargo.toml | 5 +++++ 7 files changed, 35 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 1a02aa0..07a3a35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,3 +35,8 @@ proc-macro2 = "1.0" quote = "1.0.9" syn = { version = "1.0.69", features = ["full"] } proc-macro-crate = "0.1.5" + +# Required to build tests with near-sdk v4.1.1, see #128. +# TODO(#125): Remove after upgrading to near-sdk v5. +[patch.crates-io] +parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"} diff --git a/near-plugins-derive/tests/contracts/access_controllable/Cargo.toml b/near-plugins-derive/tests/contracts/access_controllable/Cargo.toml index 9e5ab96..b583c72 100644 --- a/near-plugins-derive/tests/contracts/access_controllable/Cargo.toml +++ b/near-plugins-derive/tests/contracts/access_controllable/Cargo.toml @@ -19,3 +19,8 @@ panic = "abort" overflow-checks = true [workspace] + +# Required to build tests with near-sdk v4.1.1, see #128. +# TODO(#125): Remove after upgrading to near-sdk v5. +[patch.crates-io] +parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"} diff --git a/near-plugins-derive/tests/contracts/ownable/Cargo.toml b/near-plugins-derive/tests/contracts/ownable/Cargo.toml index c4e3643..7815288 100644 --- a/near-plugins-derive/tests/contracts/ownable/Cargo.toml +++ b/near-plugins-derive/tests/contracts/ownable/Cargo.toml @@ -19,3 +19,8 @@ panic = "abort" overflow-checks = true [workspace] + +# Required to build tests with near-sdk v4.1.1, see #128. +# TODO(#125): Remove after upgrading to near-sdk v5. +[patch.crates-io] +parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"} diff --git a/near-plugins-derive/tests/contracts/pausable/Cargo.toml b/near-plugins-derive/tests/contracts/pausable/Cargo.toml index 4869ee8..e5b6e09 100644 --- a/near-plugins-derive/tests/contracts/pausable/Cargo.toml +++ b/near-plugins-derive/tests/contracts/pausable/Cargo.toml @@ -19,3 +19,8 @@ panic = "abort" overflow-checks = true [workspace] + +# Required to build tests with near-sdk v4.1.1, see #128. +# TODO(#125): Remove after upgrading to near-sdk v5. +[patch.crates-io] +parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"} diff --git a/near-plugins-derive/tests/contracts/upgradable/Cargo.toml b/near-plugins-derive/tests/contracts/upgradable/Cargo.toml index e1c3e9e..510be6b 100644 --- a/near-plugins-derive/tests/contracts/upgradable/Cargo.toml +++ b/near-plugins-derive/tests/contracts/upgradable/Cargo.toml @@ -19,3 +19,8 @@ panic = "abort" overflow-checks = true [workspace] + +# Required to build tests with near-sdk v4.1.1, see #128. +# TODO(#125): Remove after upgrading to near-sdk v5. +[patch.crates-io] +parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"} diff --git a/near-plugins-derive/tests/contracts/upgradable_2/Cargo.toml b/near-plugins-derive/tests/contracts/upgradable_2/Cargo.toml index bc73531..a2726a6 100644 --- a/near-plugins-derive/tests/contracts/upgradable_2/Cargo.toml +++ b/near-plugins-derive/tests/contracts/upgradable_2/Cargo.toml @@ -19,3 +19,8 @@ panic = "abort" overflow-checks = true [workspace] + +# Required to build tests with near-sdk v4.1.1, see #128. +# TODO(#125): Remove after upgrading to near-sdk v5. +[patch.crates-io] +parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"} diff --git a/near-plugins-derive/tests/contracts/upgradable_state_migration/Cargo.toml b/near-plugins-derive/tests/contracts/upgradable_state_migration/Cargo.toml index b756334..4c3e337 100644 --- a/near-plugins-derive/tests/contracts/upgradable_state_migration/Cargo.toml +++ b/near-plugins-derive/tests/contracts/upgradable_state_migration/Cargo.toml @@ -19,3 +19,8 @@ panic = "abort" overflow-checks = true [workspace] + +# Required to build tests with near-sdk v4.1.1, see #128. +# TODO(#125): Remove after upgrading to near-sdk v5. +[patch.crates-io] +parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"} From 89b1af77e61872def965153bbc6212dd677805ec Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 18 Jan 2024 18:26:44 +0100 Subject: [PATCH 2/2] Update `scripts/fix_dependencies` --- scripts/fix_dependencies.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/fix_dependencies.sh b/scripts/fix_dependencies.sh index d21b92e..c0bbaf1 100755 --- a/scripts/fix_dependencies.sh +++ b/scripts/fix_dependencies.sh @@ -11,7 +11,12 @@ # version of `clap` is released, say 4.4.8, then below must be changed to `-p clap@4.4.8`. Even # though this requires maintenance, it seems to be cleanest approach that works with CI (see #119 # for some other attempts and how they failed in CI). +cargo update -p ahash@0.8.7 --precise 0.8.4 cargo update -p anstyle@1.0.4 --precise 1.0.2 -cargo update -p anstyle-parse@0.2.2 --precise 0.2.1 -cargo update -p clap@4.4.8 --precise 4.3.24 +cargo update -p anstyle-parse@0.2.3 --precise 0.2.1 +cargo update -p anstyle-query@1.0.2 --precise 1.0.0 +cargo update -p cargo-platform@0.1.6 --precise 0.1.5 +cargo update -p clap@4.4.18 --precise 4.3.24 cargo update -p clap_lex@0.5.1 --precise 0.5.0 +cargo update -p colored@2.1.0 --precise 2.0.4 +cargo update -p home@0.5.9 --precise 0.5.5