1

I am writing unit tests for a native rust program using solana-sdk, solana-program-test and assert_matches crates. After writing the tests, when I try to execute them using cargo test-bpf command, I am running into the below error:

Updating crates.io index
error: failed to select a version for the requirement "time = "^0.3"*
candidate versions found which didn't match: 0.3.15, 0.3.14, 0.3.13, ...

1 Answer 1

1

I have seen the cargo error failed to select a version for the requirement ... when I had mismatched dependency and/or rust versions.

Looking at the output, I see some 1.10.x and 1.14.x solana crate dependency versions; get all of these aligned on at least the same major if not the same minor release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.