ockam icon indicating copy to clipboard operation
ockam copied to clipboard

Fix Ockam credential feature

Open metaclips opened this issue 3 years ago • 1 comments

Ockam credential feature seem to be broken. Running

cd implementations/rust/ockam/ockam

cargo check --no-default-features --features "credentials std software_vault"

Fails with

cargo check --no-default-features --features "credentials std software_vault"
    Checking ockam_entity v0.28.0 (ockam/implementations/rust/ockam/ockam_entity)
error[E0658]: custom discriminant values are not allowed in enums with tuple or struct variants
  --> implementations/rust/ockam/ockam_entity/src/credential/error.rs:8:37
   |
8  |     MismatchedAttributesAndClaims = 1,
   |                                     ^ disallowed custom discriminant
...
22 |     InvalidCredentialPresentation(u32),
   |     ---------------------------------- tuple variant defined here
   |
   = note: see issue #60553 <https://github.com/rust-lang/rust/issues/60553> for more information

error[E0277]: the trait bound `credential::messages::CredentialProtocolMessage: ockam_core::Message` is not satisfied
   --> implementations/rust/ockam/ockam_entity/src/credential/workers/verifier.rs:56:14
    |
56  |         msg: Routed<Self::Message>,
    |              ^^^^^^^^^^^^^^^^^^^^^ the trait `ockam_core::Message` is not implemented for `credential::messages::CredentialProtocolMessage`
    |
note: required by a bound in `Routed`
   --> /ockam/implementations/rust/ockam/ockam_core/src/message.rs:109:22
    |
109 | pub struct Routed<M: Message> {
    |                      ^^^^^^^ required by this bound in `Routed`

error[E0277]: the trait bound `credential::messages::CredentialProtocolMessage: ockam_core::Message` is not satisfied
   --> implementations/rust/ockam/ockam_entity/src/credential/workers/presenter.rs:61:14
    |
61  |         msg: Routed<Self::Message>,
    |              ^^^^^^^^^^^^^^^^^^^^^ the trait `ockam_core::Message` is not implemented for `credential::messages::CredentialProtocolMessage`
    |
note: required by a bound in `Routed`
   --> ockam/implementations/rust/ockam/ockam_core/src/message.rs:109:22
    |
109 | pub struct Routed<M: Message> {
    |                      ^^^^^^^ required by this bound in `Routed`

error[E0277]: the trait bound `credential::messages::CredentialProtocolMessage: ockam_core::Message` is not satisfied
   --> implementations/rust/ockam/ockam_entity/src/credential/workers/listener.rs:34:14
    |
34  |         msg: Routed<Self::Message>,
    |              ^^^^^^^^^^^^^^^^^^^^^ the trait `ockam_core::Message` is not implemented for `credential::messages::CredentialProtocolMessage`
    |
note: required by a bound in `Routed`
   --> ockam/implementations/rust/ockam/ockam_core/src/message.rs:109:22
    |
109 | pub struct Routed<M: Message> {
    |                      ^^^^^^^ required by this bound in `Routed`

error[E0277]: the trait bound `credential::messages::CredentialProtocolMessage: ockam_core::Message` is not satisfied
   --> implementations/rust/ockam/ockam_entity/src/credential/workers/issuer.rs:65:14
    |
65  |         msg: Routed<Self::Message>,
    |              ^^^^^^^^^^^^^^^^^^^^^ the trait `ockam_core::Message` is not implemented for `credential::messages::CredentialProtocolMessage`
    |
note: required by a bound in `Routed`
   --> ockam/implementations/rust/ockam/ockam_core/src/message.rs:109:22
    |
109 | pub struct Routed<M: Message> {
    |                      ^^^^^^^ required by this bound in `Routed`

error[E0277]: the trait bound `credential::messages::CredentialProtocolMessage: ockam_core::Message` is not satisfied
   --> implementations/rust/ockam/ockam_entity/src/credential/workers/holder.rs:68:14
    |
68  |         msg: Routed<Self::Message>,
    |              ^^^^^^^^^^^^^^^^^^^^^ the trait `ockam_core::Message` is not implemented for `credential::messages::CredentialProtocolMessage`
    |
note: required by a bound in `Routed`
   --> ockam/implementations/rust/ockam/ockam_core/src/message.rs:109:22
    |
109 | pub struct Routed<M: Message> {
    |                      ^^^^^^^ required by this bound in `Routed`

Some errors have detailed explanations: E0277, E0658.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `ockam_entity` due to 6 previous errors

We should fix and also add CI checks

metaclips avatar Nov 15 '21 15:11 metaclips

Can you kindly look at my PR and offer some comments? Thank you!

bin-wang avatar Dec 30 '21 06:12 bin-wang

I'm pretty much certain that this feature doesn't exist anymore. Can someone confirm to close it? (@mrinalwadhwa @SanjoDeundiak )

adrianbenavides avatar Apr 10 '23 11:04 adrianbenavides