Cargo: failed to select a version for `unwrap`

Hey,

I tried to implement the trait publicId and secretId with the lib safe_crypto. During compilation this error came out:

error: failed to select a version for `unwrap`.
    ... required by package `config_file_handler v0.9.0`
    ... which is depended on by `maidsafe_utilities v0.15.0`
    ... which is depended on by `parsec v0.5.0`
    ... which is depended on by `keypair v0.1.0 (file:///Users/issac/parsec/keypair)`
versions that meet the requirements `~1.1.0` are: 1.1.0

all possible versions conflict with previously selected packages.

  previously selected package `unwrap v1.2.1`
    ... which is depended on by `config_file_handler v0.11.0`
    ... which is depended on by `maidsafe_utilities v0.16.0`
    ... which is depended on by `safe_crypto v0.4.0`
    ... which is depended on by `keypair v0.1.0 (file:///Users/issac/parsec/keypair)`

This is how my Cargo.toml looks:

[dependencies]
parsec = "~0.5.0"
safe_crypto = "~0.4.0"

No package imported such as unwrap, so how can I solve this?
Cheers!

2 Likes

The problem arises because parsec uses maidsafe_utilities 0.15 and safe_crypto 0.4 uses maidsafe_utilities 0.16

Note that latest version of safe_cryto is 0.5, but it only worsens the problem because it uses maidsafe_utilities 0.17. It is unfortunate that Maidsafe doesn’t maintain latest master branches with coherent versions.

You could try an even older version of safe_crypto (0.3):

[dependencies]
parsec = "~0.5.0"
safe_crypto = "~0.3.0

This will at least correct the problem about unwrap.

5 Likes

It worked! Thanks!

Yes, you are right! I hope that is in progress.

3 Likes

Thanks for helping Isaac with his question.

Note that latest version of safe_cryto is 0.5, but it only worsens the problem because it uses maidsafe_utilities 0.17. It is unfortunate that Maidsafe doesn’t maintain latest master branches with coherent versions.

parsec on master also depends on maidsafe_utilities 0.17. Also, parsec now depends on safe_crypto too so these dependencies will stay in sync from now on. The released versions (like parsec 0.5.0) represent one point in time in the past, so the dependencies will represent this too.

4 Likes