Skip to content

Commit

Permalink
build: add workarounds required to build tests (#128)
Browse files Browse the repository at this point in the history
* build: patch a yanked near-sdk dependency

* Update `scripts/fix_dependencies`
  • Loading branch information
mooori authored Jan 18, 2024
1 parent 102d95b commit 9374fcc
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
5 changes: 5 additions & 0 deletions near-plugins-derive/tests/contracts/ownable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
5 changes: 5 additions & 0 deletions near-plugins-derive/tests/contracts/pausable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
5 changes: 5 additions & 0 deletions near-plugins-derive/tests/contracts/upgradable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
5 changes: 5 additions & 0 deletions near-plugins-derive/tests/contracts/upgradable_2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
9 changes: 7 additions & 2 deletions scripts/fix_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
# version of `clap` is released, say 4.4.8, then below must be changed to `-p [email protected]`. 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 [email protected] --precise 0.8.4
cargo update -p [email protected] --precise 1.0.2
cargo update -p [email protected] --precise 0.2.1
cargo update -p [email protected] --precise 4.3.24
cargo update -p [email protected] --precise 0.2.1
cargo update -p [email protected] --precise 1.0.0
cargo update -p [email protected] --precise 0.1.5
cargo update -p [email protected] --precise 4.3.24
cargo update -p [email protected] --precise 0.5.0
cargo update -p [email protected] --precise 2.0.4
cargo update -p [email protected] --precise 0.5.5

0 comments on commit 9374fcc

Please sign in to comment.