Skip to content

Add lightning-macros crate and drop bdk_macros dependency - #3330

Merged
TheBlueMatt merged 2 commits into
lightningdevkit:mainfrom
tnull:2024-09-add-macros-crate
Oct 17, 2024
Merged

TheBlueMatt merged 2 commits into
lightningdevkit:mainfrom
tnull:2024-09-add-macros-crate

Conversation

@tnull

@tnull tnull commented Sep 21, 2024 •

Copy link
Copy Markdown
Contributor

Previously, we used the bdk_macros dependency for some simple proc macros in lightning-transaction-sync. However, post-1.0 BDK doesn't further maintain this crate and will at some point probably yank it together with the old bdk crate that was split up.

Here, we create a new crate for utility proc macros and steal add what we currently use (slightly modified for the latest syn version's API though). In the future we may want to expand this crate, e.g., for some further changes to the maybe_async macros in the context of an async KVStore implementation.

@tnull
tnull force-pushed the 2024-09-add-macros-crate branch from 3eb61e1 to eda480b Compare September 21, 2024 05:28
dunxen
dunxen previously approved these changes Sep 22, 2024

@dunxen dunxen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks the same to me as bdk_macros besides the wasm flags removed 👍

Comment thread lightning-macros/src/lib.rs Resolved
@tnull

tnull commented Oct 8, 2024

Copy link
Copy Markdown
Contributor Author

Now pushed a fixup that removes the async trait functionality. While I think there is no real harm in having the original code around, happy to go this way, too. Let me know if I should squash or revert.

@TheBlueMatt

Copy link
Copy Markdown
Collaborator

Feel free to squash, then LGTM.

@tnull
tnull force-pushed the 2024-09-add-macros-crate branch from 9b066de to 1dffe79 Compare October 17, 2024 09:25
@tnull

tnull commented Oct 17, 2024

Copy link
Copy Markdown
Contributor Author

Feel free to squash, then LGTM.

Squashed fixup without further changes.

@TheBlueMatt

Copy link
Copy Markdown
Collaborator

Oops, the async-trait removal got squashed into the wrong commit :/

@TheBlueMatt TheBlueMatt left a comment

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.

Total diff looks fine, even if the fixup was squashed into the wrong commit.

tnull added 2 commits October 17, 2024 16:26
Previously, we used the `bdk_macros` dependency for some simple proc
macros in `lightning-transaction-sync`. However, post-1.0 BDK doesn't
further maintain this crate and will at some point probably yank it
together with the old `bdk` crate that was split up.

Here, we create a new crate for utility proc macros and ~~steal~~ add
what we currently use (slightly modified for the latest `syn` version's
API though). In the future we may want to expand this crate, e.g., for
some `maybe_async` macros in the context of an `async KVStore`
implementation.
@tnull
tnull force-pushed the 2024-09-add-macros-crate branch from 1dffe79 to 99ae425 Compare October 17, 2024 14:26
@tnull

tnull commented Oct 17, 2024

Copy link
Copy Markdown
Contributor Author

Oops, the async-trait removal got squashed into the wrong commit :/

Grr🤦‍♂️

Fixed.

@TheBlueMatt TheBlueMatt left a comment

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.

Gonna land this, only really removed code since @dunxen last looked and its pretty straightforward.

@TheBlueMatt
TheBlueMatt merged commit 81923c7 into lightningdevkit:main Oct 17, 2024
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