Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add workarounds required to build tests #128

Merged
merged 2 commits into from
Jan 18, 2024
Merged

Conversation

mooori
Copy link
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.

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
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
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
2 checks passed
@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