Skip to content

Rename FFI builder errors to match payjoin crate#1733

Open
xstoicunicornx wants to merge 1 commit into
payjoin:masterfrom
xstoicunicornx:rename-ReceiverBuilderError
Open

Rename FFI builder errors to match payjoin crate#1733
xstoicunicornx wants to merge 1 commit into
payjoin:masterfrom
xstoicunicornx:rename-ReceiverBuilderError

Conversation

@xstoicunicornx

Copy link
Copy Markdown
Collaborator

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:

@coveralls

coveralls commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29438188507

Coverage remained the same at 86.187%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 15963
Covered Lines: 13758
Line Coverage: 86.19%
Coverage Strength: 345.24 hits per line

💛 - Coveralls

@xstoicunicornx xstoicunicornx marked this pull request as draft July 13, 2026 16:22
Comment thread payjoin-ffi/src/send/error.rs Outdated
/// Sender Build error
#[error(transparent)]
Build(Arc<SenderBuilderError>),
Build(Arc<BuildSenderError>),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could make this Builder to prevent the collision?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).
@xstoicunicornx xstoicunicornx force-pushed the rename-ReceiverBuilderError branch from 1f9f450 to 00a3f62 Compare July 15, 2026 17:51
@xstoicunicornx xstoicunicornx marked this pull request as ready for review July 15, 2026 18:21
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.

3 participants