SQLDelight Kotlin native question: I have database...
# multiplatform
m
SQLDelight Kotlin native question: I have database table with the same name as some other class (eg. 'Table'). On Jvm it's okay because I can distinguish them by package. But after updating to Kotlin 1.9.20 and Xcode 15 the resulting klib switched their generated names (now my other class is called 'Table_' instead of 'Table') and project is not compiling. Is it somehow possible to switch them back? Or maybe exclude sqldelight table generated class inclusion to klib?
z
This is a good article on the topic https://betterprogramming.pub/writing-swift-friendly-kotlin-multiplatform-apis-part-ii-bbee12090415 Making sure you have unique class names or
@ObjcName
are basically your options to avoid class name clashes
👍 1
m
Tried that already, but the problem is that sqldelight generates classes at compile time so can't use this annotation on them. Using
@ObjCName("Table", swiftName = "Table", exact = true)
on my domain class has no effect - it's still exported as 'Table_' in klib