Skip to content
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

Issue with types not used in libraries that depend on bitcoin-ffi #27

Open
thunderbiscuit opened this issue Oct 22, 2024 · 2 comments
Open

Comments

@thunderbiscuit
Copy link
Member

See this issue for info.

Any type defined in bitcoin-ffi that is also defined in bdk-ffi will name clash and crash at runtime, even if those types are not imported in bdk-ffi.

@tnull
Copy link
Collaborator

tnull commented Oct 28, 2024

Yes, we also have a related issue on the LDK Node side: ever since bdk-ffi upgraded to use bitcoin-ffi, bdk-ffi can't be used side-by-side with LDK Node in the same Swift project as there will be name clashes. I hope this will go away once we also upgrade to use bitcoin-ffi, i.e., some compiler will realize it's the same type that's linked-in.

@thunderbiscuit
Copy link
Member Author

My understanding is that (at the moment at least for bdk-ffi) the problem is on the glue code side. Both my bdk.kt and bitcoin.kt files contain the same types. The issue is that the bitcoin.kt file adds all types defined in the UDL file in bitdcoin-ffi, even though my bdk-ffi library only imports some of them.

Note that I need to dig into the response from Mark on the linked issue, because he can't reproduce my error.

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

No branches or pull requests

2 participants