Skip to content

0.0.111#91

Merged
arik-so merged 9 commits intolightningdevkit:mainfrom
TheBlueMatt:main
Oct 3, 2022
Merged

0.0.111#91
arik-so merged 9 commits intolightningdevkit:mainfrom
TheBlueMatt:main

Conversation

@TheBlueMatt
Copy link
Collaborator

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.
git clone https://github.com/rust-bitcoin/rust-lightning
cd rust-lightning
git checkout 0.0.110-bindings
git checkout 0.0.111-bindings
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you do the checkout as a separate command instead of just git clone --branch?

@arik-so arik-so merged commit c96981b into lightningdevkit:main Oct 3, 2022
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