Skip to content

Re-export bitcoin crate #3068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2024
Merged

Re-export bitcoin crate #3068

merged 1 commit into from
May 21, 2024

Conversation

toxeus
Copy link
Contributor

@toxeus toxeus commented May 17, 2024

For the same reason the bitcoin crate is re-exporting the secp256k1 crate the lightning crate should re-export the bitcoin crate: to ease the burden on calling code to maintain compatible bitcoin versions.

The lightning crate makes heavy use of types defined in (or re-exported by) the bitcoin crate. Compilation will fail if e.g. comparisons or match expressions are done with types from bitcoin crate versions with a non-equal minor version. This forces calling code to depend on a bitcoin crate with a compatible version. This becomes a maintenance nightmare once two or more crates, that use bitcoin types in their public API, are used in calling code simultaneously.

For the same reason the `bitcoin` crate is re-exporting
the `secp256k1` crate the `lightning` crate should
re-export the `bitcoin` crate: to ease the burden on
calling code to maintain compatible `bitcoin` versions.

The `lightning` crate makes heavy use of types defined in
(or re-exported by) the `bitcoin` crate. Compilation will
fail if e.g. comparisons or `match` expressions are done with
types from `bitcoin` crate versions with a non-equal minor
version. This forces calling code to depend on a `bitcoin`
crate with a compatible version. This becomes a maintenance
nightmare once two or more crates, that use `bitcoin` types
in their public API, are used in calling code simultaneously.
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Makes sense, I think.

@tnull tnull merged commit c84c2b6 into lightningdevkit:main May 21, 2024
16 checks passed
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