I’m looking into some
IrLinkageError
crashes. We’ve got two libraries that each depend on different versions a common native library:
• Native library
Z depended on
co.touchlab:sqliter-driver:1.0.10
• Native library
S depended on
co.touchlab:sqliter-driver:1.2.3
Unfortunately this library had some backwards-incompatible API changes, so when we ran
Z, it crashed.
kotlin.native.internal.IrLinkageError: Constructor 'Extended.<init>' can not be called: No constructor found for symbol
'co.touchlab.sqliter/DatabaseConfiguration.Extended.<init>|<init>(kotlin.Boolean;kotlin.Int;kotlin.Int?;kotlin.String?;co.touchlab.sqliter.SynchronousFlag?;kotlin.Boolean){}[0]'
at 0 kfun:kotlin.native.internal#ThrowIrLinkageError(kotlin.String?){}kotlin.Nothing + 99
at 1 kfun:app.cash.zipline.loader.internal.cache.SqlDriverFactory#create(okio.Path;com.squareup.sqldelight.db.SqlDriver.Schema){}com.squareup.sqldelight.db.SqlDriver + 479
The
fix is already done; we upgraded Z to the new version.
Are there any tools or options to detect potential
IrLinkageError
crashes at build time? I’d love to fail the build if any used function is not declared!