0.0.112 Bindings Branch#1810
Merged
TheBlueMatt merged 8 commits intolightningdevkit:0.0.112-bindingsfrom Oct 27, 2022
Merged
Conversation
+ remove MaybeReadableArgs trait as it is now unused + remove onion_utils::DecodeInput as it would've now needed to be parameterized by the CustomOnionMessageHandler trait, and we'd like to avoid either implementing DecodeInput in messenger or having onion_utils depend on onion_message::* Co-authored-by: Matt Corallo <git@bluematt.me> Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
...as the bindings generation does not currently have the ability to map a reference to a `NodeId` inside a tuple.
.. as the current C bindings generator isn't capable of handling type aliases in generics in type alias definition currently.
Bindings can't handle references in return types, so reduce the visibility to pub(crate).
Currently `Writeable` is mapped manually, making it impossible to automatically map a trait method that is parameterized by `Writeable` (as is true for the `write` method on `KVStore`). Ultimately we'll want to move to automatically mapping `Writeable` like any other trait (only manually mapping the std `Write` and `Read` traits), so this is only a candidate for the bindings branch, not upstream. That may take a few releases, however.
Re-exports in Rust make `use` statements a little shorter, but for otherwise don't materially change a crate's API. Sadly, the C bindings generator currently can't figure out re-exports, but it also exports everything into one global namespace, so it doesn't matter much anyway.
fd03e49 to
d6ae7e3
Compare
This doesn't change the API expressibility as its currently the only type of message that can be sent, but avoids a generation failure as we can't call `&self` methods on complex enums unless we can `clone` all the inner fields. The correct solution to this is to simply not expose those methods (which sucks, but at least for `OnionMessageContents` they don't really matter), but that doesn't have to come now.
d6ae7e3 to
83af710
Compare
jkczyz
approved these changes
Oct 27, 2022
Codecov ReportBase: 90.70% // Head: 90.73% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## 0.0.112-bindings #1810 +/- ##
====================================================
+ Coverage 90.70% 90.73% +0.03%
====================================================
Files 87 87
Lines 47364 47363 -1
Branches 47364 47363 -1
====================================================
+ Hits 42962 42977 +15
+ Misses 4402 4386 -16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
valentinewallace
approved these changes
Oct 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a rebase of the still-relevant commits from the 0.0.111-bindings branch as well as #1809 backported. This should suffice for 0.0.112 bindings.