-
Notifications
You must be signed in to change notification settings - Fork 47
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
Document best approach for working with Java apps #244
Comments
I think ULong is the stricter type-safe API for Kotlin consumers but Java doesn't have the concept of unsigned numbers. I'm not sure if we're just targeting Kotlin consumers though. The way to solve this in a Java project is to just use Kotlin's libraries (which are JVM compatible) so we can either make that part of our documentation, or decide to weaken our type-safety in the APIs. Refer: kotlin package in kotlin-stdlib, for example (for ULong) https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/ |
Notice in the second picture the type for |
I'll take a deeper look at this, thanks! |
Will attempt to keep track of the known issues and some hacks/fixes to get around them for the time being here. |
This issue has been further investigated, and I want to provide links for people stumbling on this. The core problem is that unsigned types are inline classes, and their names get mangled. The primary fix is to write small Kotlin wrapper classes, but I will expand on different approaches in a separate issue, #322. Links: |
Reported by SeverinAlexB on discord. See also:
https://github.com/SeverinAlexB/bdk-java-ulong-bug
The text was updated successfully, but these errors were encountered: