Skip to content

refactor: merge lightning-custom-message into lightning crate#4386

Open
okekefrancis112 wants to merge 1 commit intolightningdevkit:mainfrom
okekefrancis112:drop_crate
Open

refactor: merge lightning-custom-message into lightning crate#4386
okekefrancis112 wants to merge 1 commit intolightningdevkit:mainfrom
okekefrancis112:drop_crate

Conversation

@okekefrancis112
Copy link
Contributor

@okekefrancis112 okekefrancis112 commented Feb 5, 2026

Summary

Merges the lightning-custom-message crate into the main lightning crate. The lightning-custom-message crate was originally separated for MSRV reasons, but both crates now require Rust 1.75, making the separation unnecessary.

Backwards Compatibility

The macro remains publicly exported and works identically. Users can now access it via:

use lightning::composite_custom_message_handler;

Closes: #4198

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Feb 5, 2026

I've assigned @joostjager as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@okekefrancis112 okekefrancis112 force-pushed the drop_crate branch 2 times, most recently from d0ad0e4 to a5a2d77 Compare February 5, 2026 19:44
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.08%. Comparing base (90b79e4) to head (02689c8).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4386      +/-   ##
==========================================
+ Coverage   85.97%   86.08%   +0.11%     
==========================================
  Files         159      159              
  Lines      104722   105185     +463     
  Branches   104722   105185     +463     
==========================================
+ Hits        90030    90553     +523     
+ Misses      12191    12120      -71     
- Partials     2501     2512      +11     
Flag Coverage Δ
tests 86.08% <ø> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @joostjager! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

Copy link
Contributor

@joostjager joostjager left a comment

Choose a reason for hiding this comment

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

PR doesn't seem fully ready for review with ci retrigger commit.

I haven't dealt with this macro yet, but curious which users use it.

@@ -1,23 +0,0 @@
[package]
name = "lightning-custom-message"
Copy link
Contributor

Choose a reason for hiding this comment

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

There's also a reference in .gitignore

fn handle_custom_message(
&self, msg: Self::CustomMessage, sender_node_id: $crate::bitcoin::secp256k1::PublicKey
) -> Result<(), $crate::lightning::ln::msgs::LightningError> {
&self, msg: Self::CustomMessage, sender_node_id: bitcoin::secp256k1::PublicKey
Copy link
Contributor

Choose a reason for hiding this comment

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

Leaving out $crate might be a problem when this exported macro is used in other crates?

ci/ci-tests.sh Outdated
cargo doc -p lightning-persister --quiet --document-private-items --features tokio

echo -e "\n\nTest Custom Message Macros"
cargo test -p lightning-custom-message --quiet --color always
Copy link
Contributor

@joostjager joostjager Feb 9, 2026

Choose a reason for hiding this comment

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

Check q: I think the only testing were doc tests, that are now running as part of lightning?

@ldk-reviews-bot
Copy link

👋 The first review has been submitted!

Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.

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.

Drop the lightning-custom-message crate?

3 participants