Skip to content

build: add workarounds required to build tests#128

Merged
mooori merged 2 commits into
masterfrom
fix-secp256k1
Jan 18, 2024
Merged

build: add workarounds required to build tests#128
mooori merged 2 commits into
masterfrom
fix-secp256k1

Conversation

@mooori
Copy link
Copy Markdown
Contributor

@mooori mooori commented Jan 18, 2024

Override parity-secp256k1

Building tests may currently fail since a dependency of near-sdk v4.1.1 (most recent release) has been yanked. Providing a patch is the recommended workaround.

A new version of near-sdk is planned to be released soon. Then this patch shouldn’t be required anymore (ref.).

Update scripts/fix-dependencies

By now more recursive dependencies need to be downgraded manually for tests to build with MSRV 1.69.0. See this comment for details.

Comment thread Cargo.toml Outdated
# Required to build tests with near-sdk v4.1.1, see
# TODO(): Remove after upgrading to near-sdk v5.
[patch.crates-io]
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1"}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend adding a hash commit because, in such a way, you download the latest code from the master branch which potentially could be broken.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I’ve added a tag corresponding to the last release of the parity-secp256k1 crate.

Would you mind pointing that out here as well? The workaround recommended to the community is currently missing a tag (or anything else that pins the downloaded code).

@mooori mooori changed the title build: patch a yanked near-sdk dependency build: add workarounds required to build tests Jan 18, 2024
@mooori mooori marked this pull request as ready for review January 18, 2024 19:53
@mooori mooori merged commit 9374fcc into master Jan 18, 2024
@mooori mooori deleted the fix-secp256k1 branch January 18, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants