Open atsushieno opened 2 years ago
https://youtrack.jetbrains.com/issues/KT?q=native%20variable%20null this kind of issue might have been already fixed in 1.6.0-RC2, but it is incompatible with ksp 1.5.31-1.0.1...
Still not fixed at 1.6.0-1.0.1.
^ was wrong; the problem that is still not fixed is #10, not this one. Gradle sync still fails due to #10, but running ./gradlew build
succeeds now, meaning that this issue is fixed.
hrm, it is weird, I could get it working locally, but Actions build shows regression. There seems some inconsistency. https://github.com/atsushieno/augene-ng/actions/runs/1484468850
If we enable
nativeMain
etc. inkotractive/build.gradle
and run./gradlew build
, it results in weird failure atnativeTest
, particularly atEditModelReaderTest.readTemplate()
. The test failure log does not really tell anything (K/N does not give us a stacktrace), and due to https://github.com/atsushieno/augene-ng/issues/10 we cannot really debug the test on IDEA. I got lost.I actually went beyond and inserted some debug
println()
s around, and figured out thatPropertyInfo
constructor does not receive validpropertyMetaType
parameter. They were often passed fromtypeBoolean
,typeInt
,typeString
etc. (defined inEditModelMetadata.kt
). I suspect that thoseval
s are not appropriately initialized on (and only on) Kotlin/Native. The constructor parameter is non-null, and thoseval
s are NOT null, but what is actually passed toPropertyInfo()
IS null.It is most likely a bug in Kotlin/Native runtime, but we may be able to workaround the issue by changing the code structures (place those referent
val
s elsewhere e.g. inside some object).