Uh oh!
There was an error while loading. Please reload this page.
Restore 32-bit support in Java Coder - #7
Conversation
Uh oh!
There was an error while loading. Please reload this page.
@andriydruk The changes you have made here seem to work except when it comes to doubles. Doubles coming back from the swift side are Ex: publicstructProgress:Codable{publicletcurrent:Intpubliclettotal:Intpublicvarprogress:Double{returnDouble(current)/ Double(total)}}@SwiftValue
classProgress private constructor() {
@get:SwiftGetter
val percentage:Doubleexternal get
}
val foo = bar.progress
foo.percentage ==Double.NaN// percentage is NaN |
ynnadrules
commented
Mar 18, 2021
@andriydruk I was going to add a failing test case in |
andriydruk
commented
Mar 26, 2021
I've just checked DoubleTest everything works fine. I've just added x86 CI, all tests are green readdle/swift-java-codegen#31 |
ynnadrules
commented
Mar 26, 2021
@andriydruk Hey, well I think due to the latest changes you just pushed to this branch, the test are all green for me too! Before, some of the tests in DoubleTests.java from swift-java-codegen were failing when using the 32-bit-support branch of swift-java-coder, like So what do you ultimately think the issue was behind doubles becoming NaNs? The Anyway, thanks so much for providing a fix for this! |
andriydruk
commented
Mar 26, 2021
Ok, looks that everything now works fine |
@andriydruk It unfortunately turns out the issue is still happening. All the tests in DoubleTests.swift that were failing before were fixed with your last change, but in some cases the NaN issue is still happening for us. Here's a branch in our fork of swift-java-codegen with the bug test case: https://github.com/heliumfoot/swift-java-codegen/tree/bug/32-bit-double-nan-bug The example is a type that represents progress and has a a computed property that returns a percentage. That percentage is a Here is the test run: https://github.com/heliumfoot/swift-java-codegen/runs/2223011181?check_suite_focus=true |
andriydruk
commented
Apr 14, 2021
Hi, @ynnadrules thank you We should definitely start from PR next time and not guessing what broken. Could I use tests from your fork in our repo? |
ynnadrules
commented
Apr 14, 2021
Hey @andriydruk, yes feel free to use the tests. I unfortunately had to revert to the java-based bridging during these two weeks due to our project's timeline and many of our stakeholders having 32-bit based android phones. But hopefully now we have a path forward with the kotlin-based bridging. I'll test it out soon. Out of curiosity, is Readdle using the kotlin-based bridging for their released apps already or just internally or on beta releases? thanks again @andriydruk. |
andriydruk
commented
Apr 14, 2021
We still using Java-bridging in Spark and Kotlin-briding in some internal tools. We really appreciate your help in the stabilization code-gen 🙏 PS: I pushed your tests to readdle/swift-java-codegen#31 |
No description provided.