-
Notifications
You must be signed in to change notification settings - Fork 213
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
i have an app in kotlin multiplatform, but when im trying to use store I receive an error due to kermit (I have also a dependency of kermit in my project specific 2.0.4) so I have this code in a repository
private val store by lazy {
StoreBuilder.from(
fetcher = Fetcher.of {
// entity from remote source (suspend fun)
Entity(
id = 0,
scannedToday = 0,
collectedToday = 0,
droppedOffToday = 0,
beingHandled = 0,
)
},
sourceOfTruth = SourceOfTruth.of(
reader = appDatabase.dao()::get,
writer = { _, entity -> appDatabase.dao().insert(entity) },
delete = appDatabase.dao()::delete,
deleteAll = appDatabase.dao()::wipe
)
).cachePolicy(
MemoryPolicy.builder<Any, Any>()
.setMaxSize(1)
.setExpireAfterWrite(20.seconds)
.build()
)
.build()
}
If i run android app all is going well but in IOS as soon as the class that contains the val is initialized i got this error
io.ktor.client.plugins.HttpRequest$1@61240950 thread: error: Parent job is Cancelling]
kotlin.native.internal.IrLinkageError: Constructor 'CommonWriter.<init>' can not be called: No constructor found for symbol 'co.touchlab.kermit/CommonWriter.<init>|<init>(){}[0]'
also I notices that if I downgrade my dependency to 1.2.2 (the one is used in store5) is solved
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
✅ Done