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

indy-shared-rs dependencies issues in vdr version 0.3.1 & 0.3.0 #103

Open
gmulhearn-anonyome opened this issue Oct 23, 2022 · 1 comment

Comments

@gmulhearn-anonyome
Copy link

Running a cargo check on a project with an indy-vdr 0.3.1 or 0.3.0 dependency will fail to compile due to mismatching types. This has to do with the different versions of indy-data-types and indy-utils that indy-vdr depends on, which under certain circumstances can cause indy-vdr to be consuming two different versions of indy-utils.

e.g. a cargo tree under a project with a single dependency on indy-vdr = "=0.3.0":

└── indy-vdr v0.3.0
    ├── indy-data-types v0.5.1
    │   ├── indy-utils v0.5.0
    │   │   ├── indy-wql v0.4.0
    ├── indy-utils v0.4.0

this causes errors such as the following:


error[E0599]: no function or associated item named `from_str` found for struct `RevocationRegistryId` in the current scope
   --> /Users/gmulhearne/.cargo/registry/src/github.com-1ecc6299db9ec823/indy-vdr-0.3.0/src/ffi/ledger.rs:454:54
    |
454 |         let revoc_reg_def_id = RevocationRegistryId::from_str(revoc_reg_def_id.as_str())?;
    |                                                      ^^^^^^^^ function or associated item not found in `RevocationRegistryId`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
1   | use indy_utils::qualifiable::Qualifiable;
    |

error[E0277]: `?` couldn't convert the error to `common::error::VdrError`
   --> /Users/gmulhearne/.cargo/registry/src/github.com-1ecc6299db9ec823/indy-vdr-0.3.0/src/ffi/ledger.rs:455:85
    |
455 |         let revoc_reg_def_type = RegistryType::from_str(revoc_reg_def_type.as_str())?;
    |                                                                                     ^ the trait `From<indy_data_types::ConversionError>` is not implemented for `common::error::VdrError`
    |
    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
    = help: the following other types implement trait `From<T>`:
              <common::error::VdrError as From<(common::error::VdrErrorKind, M)>>
              <common::error::VdrError as From<common::error::VdrErrorKind>>
              <common::error::VdrError as From<indy_utils::ConversionError>>
              <common::error::VdrError as From<indy_utils::ValidationError>>
              <common::error::VdrError as From<networker::zmq::zmq::Error>>
    = note: required because of the requirements on the impl of `FromResidual<Result<Infallible, indy_data_types::ConversionError>>` for `Result<_, common::error::VdrError>`

error[E0599]: no method named `to_unqualified` found for reference `&SchemaId` in the current scope
   --> /Users/gmulhearne/.cargo/registry/src/github.com-1ecc6299db9ec823/indy-vdr-0.3.0/src/ledger/request_builder.rs:418:21
    |
418 |         let id = id.to_unqualified();
    |                     ^^^^^^^^^^^^^^ method not found in `&SchemaId`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
1   | use indy_utils::qualifiable::Qualifiable;
    |

I'm unsure of the best solution to this issue, in general, the cross-dependencies happening in indy-shared-rs seem risky imo

@gmulhearn-anonyome
Copy link
Author

Possibly related to #78 due to similar errors. However, vdr 0.3.4 seems fine.

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

No branches or pull requests

1 participant