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

Compilation error on fresh Cargo.toml that depends on near-sdk-rs 4.1.1 #1119

Closed
ailisp opened this issue Dec 14, 2023 · 9 comments
Closed
Labels

Comments

@ailisp
Copy link
Member

ailisp commented Dec 14, 2023

Compiling a fresh project depends on near-sdk-rs 4.1.1 (without a Cargo.lock), I get this error:

error: no matching package named `parity-secp256k1` found
location searched: registry `crates-io`
required by package `near-crypto v0.14.0`
    ... which satisfies dependency `near-crypto = "^0.14"` of package `near-sdk v4.1.1`
    ... which satisfies dependency `near-sdk = "^4.1.1"` of package `devhub-community-factory v0.1.0 (/Users/bo/workspace/neardevhub-contract/community-factory)`

Checking parity-secp256k1 we can see it's yanked. This possibly prevent all new projects from compiling.

@ailisp ailisp added the bug label Dec 14, 2023
@ailisp
Copy link
Member Author

ailisp commented Dec 14, 2023

I can see the master branch has upgrade to use near-crypto 0.17, which doesn't depend on parity-secp256k1, so I think what we need is a new release

@ailisp
Copy link
Member Author

ailisp commented Jan 10, 2024

I see a lot of folks are hitting this issue as well. Can we make a new near-sdk-4.x release that simply bump near-crypto to 0.17?

@fadeevab
Copy link

I hit this issue as well. This issue can also happen in GitHub CI/CD when Cargo.lock is not committed.

@fadeevab
Copy link

fadeevab commented Jan 11, 2024

@ailisp I believe it's a critical issue as it fails any builds completely and there is no workaround, isn't it?

@frol
Copy link
Collaborator

frol commented Jan 12, 2024

There is a workaround: #1126 (comment)

I hope we can get 5.0 release out of the door next week

@fadeevab
Copy link

@frol A minor update for 4.1.* with fixed dependencies should be valuable as well, as merging to 5.0 involves some breaking changes (so far) which is hard to handle quickly.

@frol
Copy link
Collaborator

frol commented Jan 12, 2024

@fadeevab It is not possible to update 4.1.1 as the dependencies are all out of date and there is no breaking-changes-free option there. Old contracts will continue working as long as they have old Cargo.lock. New contracts would better start with near-sdk-rs 5.0 going forward.

@shreyassai123
Copy link

It can be temporarily fixed until v5 is stable. Add this to Cargo.toml

[patch.crates-io]
parity-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1/", version = "0.7.0" }

@frol
Copy link
Collaborator

frol commented Jul 29, 2024

This is resolved with 5.0 release.

@frol frol closed this as completed Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants