Skip to content

Solve the Conflicting implementation of the From<ed25519_dalek::ed25519::Error> for PasetoError #49

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

abdihakim148
Copy link

This error happens when the v3_public features is enable in combination with all or any of these other features:

  1. v1_public
  2. v2_public
  3. v3_public

**Why is this happening? **
i could not get to the exact cause of this error but this solves the error.
when the above 3 features are enabled, they also enable the ed25519_dalek feature crate. and the v3_public feature enables the p384 feature crate. When the Error macro of thiserror derive the From<p384::ecdsa::Error> for PasetoError it also seems to create an implementation of From<ed25519_dalek::ed25519::Error> for PasetoError. This also happens when I did manual implementation of both traits. I could not figure the root cause for this behavior. and the from macro on the RsaCipher error variant also results in an implementation of this trait which results in a conflict. So i have manually implemented the From<ed25519_dalek::ed25519::Error> for PasetoError under a feature that only allows it's compilation when the ed25519_dalek is enabled and p384 feature is disabled, and this solves the error and all the 81 tests are passing when all the features are enabled as expected.

@abdihakim148
Copy link
Author

closes #48

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

Successfully merging this pull request may close these issues.

1 participant