Skip to content

refactor: migrate Wallet type to procedural macros#732

Merged
thunderbiscuit merged 1 commit intobitcoindevkit:masterfrom
thunderbiscuit:feature/proc-macros
Apr 22, 2025
Merged

refactor: migrate Wallet type to procedural macros#732
thunderbiscuit merged 1 commit intobitcoindevkit:masterfrom
thunderbiscuit:feature/proc-macros

Conversation

@thunderbiscuit
Copy link
Copy Markdown
Member

@thunderbiscuit thunderbiscuit commented Apr 22, 2025

Migrate the Wallet and related errors.

Note that default arguments (here sign_options) require special annotations:

#[uniffi::method(default(sign_options = None))]
pub fn sign()

As more and more types in the UDL are declared with

typedef interface ExampleType;

The types that were only used in the UDL as part of that type (arguments on methods or return values of ExampleType) can be removed entirely from the UDL. So far these come up as unused types warnings when running clippy so they're easy to identify, but I wonder if I missed some.

@thunderbiscuit thunderbiscuit requested a review from reez April 22, 2025 16:03
@reez
Copy link
Copy Markdown
Collaborator

reez commented Apr 22, 2025

Note that default arguments (here sign_options) require special annotations:

I assume this is the rule for any optional?

@reez
Copy link
Copy Markdown
Collaborator

reez commented Apr 22, 2025

The types that were only used in the UDL as part of that type (arguments on methods or return values of ExampleType) can be removed entirely from the UDL. So far these come up as unused types warnings when running clippy so they're easy to identify, but I wonder if I missed some.

Thanks for noting this

Copy link
Copy Markdown
Collaborator

@reez reez left a comment

Choose a reason for hiding this comment

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

ACK 70a2e4a

@thunderbiscuit thunderbiscuit merged commit 70a2e4a into bitcoindevkit:master Apr 22, 2025
26 checks passed
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.

2 participants