Rename FFI builder errors to match payjoin crate#1733
Conversation
Coverage Report for CI Build 29438188507Coverage remained the same at 86.187%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
| /// Sender Build error | ||
| #[error(transparent)] | ||
| Build(Arc<SenderBuilderError>), | ||
| Build(Arc<BuildSenderError>), |
There was a problem hiding this comment.
Maybe you could make this Builder to prevent the collision?
There was a problem hiding this comment.
This was very helpful thanks! How did you know this was what was causing the collision? I didn't really know where to start troubleshooting.
There was a problem hiding this comment.
Just experience dealing with the dart binding generator. We dealt with the same collision in #1724 (comment) and knowing how dart uniffi smooshes names together.
I suspected that SenderError::Build() became BuildSenderException which collides with the struct BuildSenderError which also translates to BuildSenderException I double-checked by building the dart bindings on your branch and grepping to confirm in payjoin-ffi/dart/lib/payjoin.dart. This is especially confusing as the enum SenderError::Build(Arc<BuildSenderError>) wraps the offending Struct in an Arc.
Now it does not collide as we have BuildSenderException and BuildSenderSenderException. Can't say I love that but thats just how dart is
Rename SenderBuilderError to BuildSenderError and ReceiverBuilderError to BuildReceiverError in payjoin-ffi so the FFI error names mirror the core payjoin crate's naming convention (e.g. payjoin::send::BuildSenderError).
1f9f450 to
00a3f62
Compare
Rename SenderBuilderError to BuildSenderError and
ReceiverBuilderError to BuildReceiverError in payjoin-ffi so the FFI error names mirror the core payjoin crate's naming convention (e.g. payjoin::send::BuildSenderError).
This is a follow up from suggestion made in #1724 (comment).
Claude Fable was used to make these code updates.
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.