Merged
Conversation
In general, the explicit `Option_` mappings are easier for downstream bindings to match against, and clearer for users anyway. Sadly, originally we were trying to avoid them where possible, so some types default to transparent mappings. Here we swap the default, at least for manually-mapped types, with a few explicit exceptions (that probably should be changed as well).
In order to map `Readable` `impl` blocks in crates other than the `lightning` main crate we simply have to update the type references to include crate name, which we do here.
When we map a trait impl block, we historically didn't know how to resolve the types in the trait context, so we just used the impl context definitions and assumed the types were the same. Sadly, if we have an associated type that is bounded by a trait, we need to use the trait bound to figure out what to write for the X_as_Trait method declarations. Since we now have the ability to generate full trait-context type resolvers, we do so here.
For some reason rustc doesn't like this, and its easy, so whatever.
While liftime bounds require bindings users to ensure liftime requirements are met, they're important for allowing us to export lock wrappers. Thus, we relax the simple-bounds assertions checks here.
arik-so
approved these changes
Oct 3, 2022
| git clone https://github.com/rust-bitcoin/rust-lightning | ||
| cd rust-lightning | ||
| git checkout 0.0.110-bindings | ||
| git checkout 0.0.111-bindings |
Contributor
There was a problem hiding this comment.
why do you do the checkout as a separate command instead of just git clone --branch?
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.
Requires lightningdevkit/rust-lightning#1736