You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I’d like to use decodeFromDynamic() in Kotlin/JS to read a large unsigned integer. Unfortunately the implementation doesn’t convert the native value from a large JavaScript number (ie. a double) to a value in the accepted range of Int.
Actual behavior
The in-memory object is declared as an Int but it’s actually beyond the range of Int. We get a test that fails in a totally weird way, because if you don’t enforce that data is actually an Int, you have multiple non-equal representations of each value.
AssertionError: Expected <2147483648>, actual <2147483648>.
at DefaultJsAsserter.protoOf.assertTrue_rpw5fg(/Volumes/Development/zipline/zipline/build/compileSync/js/test/testDevelopmentExecutable/kotlin/jsMainSources/kotlin/kotlin/test/JsImpl.kt:23)
at DefaultJsAsserter.assertEquals(/Volumes/Development/zipline/zipline/build/compileSync/js/test/testDevelopmentExecutable/kotlin/commonMainSources/kotlin/kotlin/test/Assertions.kt:671)
at DefaultJsAsserter.protoOf.assertEquals_ldumo(/Volumes/Development/zipline/zipline/build/compileSync/js/test/testDevelopmentExecutable/kotlin/jsMainSources/kotlin/kotlin/test/DefaultJsAsserter.kt:27)
at <global>.assertEquals(/Volumes/Development/zipline/zipline/build/compileSync/js/test/testDevelopmentExecutable/kotlin/commonMainSources/kotlin/kotlin/test/Assertions.kt:63)
Environment
Kotlin version: 2.0.0
Library version: 1.6.3
Kotlin platforms: Kotlin/JS
The text was updated successfully, but these errors were encountered:
* Update Zipline to 1.12.0
* FastProtocolBridge
This is a new implementation of ProtocolBridge that uses
Zipline's new asDynamicFunction() API. It's dramatically
faster - in one measurement we went from spending ~18% of
our samples on serialization to ~3% of our samples.
* Test for FastProtocolBridge
* Work around serialization bug for UInt
See Kotlin/kotlinx.serialization#2713
* Track Button.color property
* apiDump
* Track Button.color in ProtocolTest
* Track color in another test
Describe the bug
I’d like to use
decodeFromDynamic()
in Kotlin/JS to read a large unsigned integer. Unfortunately the implementation doesn’t convert the native value from a large JavaScript number (ie. a double) to a value in the accepted range ofInt
.To Reproduce
Expected behavior
Test pass
Actual behavior
The in-memory object is declared as an
Int
but it’s actually beyond the range ofInt
. We get a test that fails in a totally weird way, because if you don’t enforce thatdata
is actually anInt
, you have multiple non-equal representations of each value.Environment
The text was updated successfully, but these errors were encountered: