-
The issue was access from
Halcyonclass in iOS code to the setter ofstatefield inAbstractHalcyonclass that hadinternalprotection level. Neither Kotlin nor IDEA was reporting this issue - just compilation was failing.The cause was presented when I used Kotlin 2.3.0 and klib from it with Halcyon library built with Kotlin 2.1.21 to analyze IR dump using following command:
~/.konan/kotlin-native-prebuilt-macos-aarch64-2.3.0/bin/klib dump-ir 2.0.0-SNAPSHOT/halcyon-core-iosarm64-2.0.0-SNAPSHOT.klib | grep -B 10 -A 10 IrErrorTypeThat resulted in output:
STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="Called reconnect. immediately=" GET_VAR 'immediately: kotlin.Boolean declared in tigase.halcyon.core.Halcyon.reconnect' type=kotlin.Boolean origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'kotlin/Boolean.not|not(){}[0]' type=kotlin.Boolean origin=null ARG 1: GET_VAR 'immediately: kotlin.Boolean declared in tigase.halcyon.core.Halcyon.reconnect' type=kotlin.Boolean origin=null then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'platform.posix/usleep|usleep(kotlin.UInt){}[100]' type=kotlin.Int origin=null ARG 1: CONST Int type=kotlin.UInt value=3000 ERROR_CALL 'Unresolved reference: R|tigase/halcyon/core/AbstractHalcyon.state|' type=IrErrorType(null) CALL 'tigase.halcyon.core/Halcyon.startConnector|startConnector(){}[0]' type=kotlin.Unit origin=null ARG 1: GET_VAR '<this>: tigase.halcyon.core.Halcyon declared in tigase.halcyon.core.Halcyon.reconnect' type=tigase.halcyon.core.Halcyon origin=null FUN name:createConnector signature:tigase.halcyon.core/Halcyon.createConnector|createConnector(){}[0] visibility:protected modality:OPEN returnType:tigase.halcyon.core.connector.AbstractConnector VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:tigase.halcyon.core.Halcyon overridden: tigase.halcyon.core/AbstractHalcyon.createConnector|createConnector(){}[0] BLOCK_BODY RETURN type=kotlin.Nothing from='tigase.halcyon.core/Halcyon.createConnector|createConnector(){}[0]' CONSTRUCTOR_CALL 'tigase.halcyon.core.connector.socket/SocketConnector.<init>|<init>(tigase.halcyon.core.Halcyon){}[0]' type=tigase.halcyon.core.connector.socket.SocketConnector origin=null ARG halcyon: GET_VAR '<this>: tigase.halcyon.core.Halcyon declared in tigase.halcyon.core.Halcyon.createConnector' type=tigase.halcyon.core.Halcyon origin=nullwhich suggested when the cause of the issue is located.
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Version |
none
|
| Sprints |
n/a
|
| Customer |
n/a
|
Iterations
-
2.0.0 Open
Issue Votes (0)
Halcyon fails to compile with Kotlin 2.2.21 and it fails while compiled with 2.1.21 in Tygrys project that is using 2.2.21. It fails with IrErrorType or "unknown kind" error type during serialization/deserialization of
klibfiles for or during iOS builds.