Morning folks, I’m getting this while building an...
# kotlin-native
n
Morning folks, I’m getting this while building an iOS framework after adding
@Throws
annotation to one of my Kotlin methods:
Copy code
!dbg attachment points at wrong subprogram for function
!81136 = distinct !DISubprogram(name: "objc2kotlin.3034", linkageName: "objc2kotlin.3034", scope: !75265, file: !75265, type: !75266, spFlags: DISPFlagDefinition, unit: !1293, retainedNodes: !1295)
i8* (i8*, i8*, i8*, i8**)* @objc2kotlin.3034
  %9 = alloca [5 x %struct.ObjHeader*], align 8, !dbg !81156
!81156 = !DILocation(line: 296, column: 9, scope: !81157)
!81157 = distinct !DISubprogram(name: "Kotlin_ObjCExport_getWrappedError", linkageName: "Kotlin_ObjCExport_getWrappedError", scope: !290, file: !290, line: 296, type: !1363, spFlags: DISPFlagDefinition, unit: !289, retainedNodes: !1295)
!81157 = distinct !DISubprogram(name: "Kotlin_ObjCExport_getWrappedError", linkageName: "Kotlin_ObjCExport_getWrappedError", scope: !290, file: !290, line: 296, type: !1363, spFlags: DISPFlagDefinition, unit: !289, retainedNodes: !1295)
warning: ignoring invalid debug info in /var/folders/ch/tb8ry3t16mdgwpjqz8yzw5yc0000gn/T/konan_temp6380746194156800718/MyFramework.kt.bc
warning: no debug symbols in executable (-arch x86_64)
And no debug info seems to be generated for the framework (dSYM file shrinks significantly). there’s a bunch of warnings preceeding:
Copy code
warning: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 0]' from /Users/username/.konan/kotlin-native-macos-1.3.61/klib/platform/ios_x64/Foundation/targets/ios_x64/native/cstubs.bc with '[2 x i32] [i32 13, i32 2]' from out)
This warnings have been here for quite some time (caused by Xcode 11.3 being the active one on my machine I presume) but haven’t caused any issues so far so I’m not sure if they are related to the issue above or not.
a
Hello! Can you share a reproducer for this problem? What version of the compiler you were using here?
1.3.61
?
n
Hey, yes,
1.3.61
. I’ll try to do that.
👍 1
@Artyom Degtyarev [JB] here you go
👀 1
🎉 1
s
Thank you for the report. https://github.com/JetBrains/kotlin-native/pull/3843 fixes this.
🎉 1
n
@svyatoslav.scherbina that was fast! Thank you.
👍 1
@svyatoslav.scherbina Hi! Any chance this fix makes its way into 1.3.70?
s
Hi. We plan to include other (more conservative and safe) fix for this problem to 1.3.70: https://github.com/JetBrains/kotlin-native/pull/3850
n
@svyatoslav.scherbina understood, thank you