Restore 32-bit support in Java Coder#7
Conversation
|
@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: public struct Progress: Codable {
public let current: Int
public let total: Int
public var progress: Double {
return Double(current) / Double(total)
}
}@SwiftValue
class Progress private constructor() {
@get:SwiftGetter
val percentage: Double
external get
}
val foo = bar.progress
foo.percentage == Double.NaN // percentage is NaN |
|
@andriydruk I was going to add a failing test case in |
|
I've just checked DoubleTest everything works fine. I've just added x86 CI, all tests are green readdle/swift-java-codegen#31 |
|
@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! |
|
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 |
|
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? |
|
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. |
|
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.