Skip to content

Commit 9374fcc

Browse files
authored
build: add workarounds required to build tests (#128)
* build: patch a yanked near-sdk dependency * Update `scripts/fix_dependencies`
1 parent 102d95b commit 9374fcc

File tree

8 files changed

+42
-2
lines changed

8 files changed

+42
-2
lines changed

Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@ proc-macro2 = "1.0"
3535
quote = "1.0.9"
3636
syn = { version = "1.0.69", features = ["full"] }
3737
proc-macro-crate = "0.1.5"
38+
39+
# Required to build tests with near-sdk v4.1.1, see #128.
40+
# TODO(#125): Remove after upgrading to near-sdk v5.
41+
[patch.crates-io]
42+
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"}

near-plugins-derive/tests/contracts/access_controllable/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ panic = "abort"
1919
overflow-checks = true
2020

2121
[workspace]
22+
23+
# Required to build tests with near-sdk v4.1.1, see #128.
24+
# TODO(#125): Remove after upgrading to near-sdk v5.
25+
[patch.crates-io]
26+
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"}

near-plugins-derive/tests/contracts/ownable/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ panic = "abort"
1919
overflow-checks = true
2020

2121
[workspace]
22+
23+
# Required to build tests with near-sdk v4.1.1, see #128.
24+
# TODO(#125): Remove after upgrading to near-sdk v5.
25+
[patch.crates-io]
26+
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"}

near-plugins-derive/tests/contracts/pausable/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ panic = "abort"
1919
overflow-checks = true
2020

2121
[workspace]
22+
23+
# Required to build tests with near-sdk v4.1.1, see #128.
24+
# TODO(#125): Remove after upgrading to near-sdk v5.
25+
[patch.crates-io]
26+
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"}

near-plugins-derive/tests/contracts/upgradable/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ panic = "abort"
1919
overflow-checks = true
2020

2121
[workspace]
22+
23+
# Required to build tests with near-sdk v4.1.1, see #128.
24+
# TODO(#125): Remove after upgrading to near-sdk v5.
25+
[patch.crates-io]
26+
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"}

near-plugins-derive/tests/contracts/upgradable_2/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ panic = "abort"
1919
overflow-checks = true
2020

2121
[workspace]
22+
23+
# Required to build tests with near-sdk v4.1.1, see #128.
24+
# TODO(#125): Remove after upgrading to near-sdk v5.
25+
[patch.crates-io]
26+
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"}

near-plugins-derive/tests/contracts/upgradable_state_migration/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ panic = "abort"
1919
overflow-checks = true
2020

2121
[workspace]
22+
23+
# Required to build tests with near-sdk v4.1.1, see #128.
24+
# TODO(#125): Remove after upgrading to near-sdk v5.
25+
[patch.crates-io]
26+
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1", tag = "parity-secp256k1-v0.7.0"}

scripts/fix_dependencies.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
# version of `clap` is released, say 4.4.8, then below must be changed to `-p clap@4.4.8`. Even
1212
# though this requires maintenance, it seems to be cleanest approach that works with CI (see #119
1313
# for some other attempts and how they failed in CI).
14+
cargo update -p ahash@0.8.7 --precise 0.8.4
1415
cargo update -p anstyle@1.0.4 --precise 1.0.2
15-
cargo update -p anstyle-parse@0.2.2 --precise 0.2.1
16-
cargo update -p clap@4.4.8 --precise 4.3.24
16+
cargo update -p anstyle-parse@0.2.3 --precise 0.2.1
17+
cargo update -p anstyle-query@1.0.2 --precise 1.0.0
18+
cargo update -p cargo-platform@0.1.6 --precise 0.1.5
19+
cargo update -p clap@4.4.18 --precise 4.3.24
1720
cargo update -p clap_lex@0.5.1 --precise 0.5.0
21+
cargo update -p colored@2.1.0 --precise 2.0.4
22+
cargo update -p home@0.5.9 --precise 0.5.5

0 commit comments

Comments
 (0)