You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@spacebear21@DanGould i've run into a bit of a wall and am looking for advice on how to move forward. there is an ImplementationError that is a type alias for a boxed error. this type is used in many of the error enums we use throughout the library. partialeq and eq can't reliably be added to this type, making moving forward difficult. i can turn this alias into a generic struct. however, this generic will then end up infecting much more of the library. this boxed error seems to be a way around having to fully enumerate all error states. maybe the solution is to just add all the error states and remove this ImplementationError? so i'm not sure what the best way to proceed is. any suggestions?
ImplementationError is a tricky one and may need to be tackled separately. I recently opened an issue here re: potentially changing it to an actual type. If you've made progress implementing Eq/PartialEq for the rest of the error types, feel free to open a PR for those and we can follow-up with ImplementationError after.
To support variants which encapsulate Implementation, it might work to implement PartialEq for ImplementationError that just always returns false. Not sure if we can do better than that.
Activity
w3irdrobot commentedon May 30, 2025
I can tackle this today if no one has picked it up
spacebear21 commentedon Jun 3, 2025
Note: since we moved payjoin-ffi into this repo this issue now applies to the FFI wrapper types as well.
w3irdrobot commentedon Jun 3, 2025
yeah I noticed the addition. I was working a little bit today.
w3irdrobot commentedon Jun 8, 2025
@spacebear21 @DanGould i've run into a bit of a wall and am looking for advice on how to move forward. there is an
ImplementationErrorthat is a type alias for a boxed error. this type is used in many of the error enums we use throughout the library. partialeq and eq can't reliably be added to this type, making moving forward difficult. i can turn this alias into a generic struct. however, this generic will then end up infecting much more of the library. this boxed error seems to be a way around having to fully enumerate all error states. maybe the solution is to just add all the error states and remove thisImplementationError? so i'm not sure what the best way to proceed is. any suggestions?spacebear21 commentedon Jun 8, 2025
ImplementationErroris a tricky one and may need to be tackled separately. I recently opened an issue here re: potentially changing it to an actual type. If you've made progress implementingEq/PartialEqfor the rest of the error types, feel free to open a PR for those and we can follow-up withImplementationErrorafter.DanGould commentedon Jun 9, 2025
To support variants which encapsulate Implementation, it might work to implement PartialEq for ImplementationError that just always returns false. Not sure if we can do better than that.
feat: wrap bitcoin_uri::de::Error in PayjoinUriError type
Add PartialEq/Eq to errors for easier comparison (#768)
Add PartialEq to errors compared in tests
Add PartialEq to errors compared in tests