cashapp/zipline

Need for Expect/Actual in ZiplineCache.

Closed this issue · 2 comments

image

See Above Image for Init and error details.

e: file:///Users/shabinder/SoundBound/common/shared/src/commonMain/kotlin/in/shabinder/shared/extension/ExtensionManager.kt:87:32 None of the following functions can be called with the arguments supplied: 
internal constructor ZiplineCache(driver: SqlDriver, database: Database, fileSystem: FileSystem, directory: Path, maxSizeInBytes: Long) defined in app.cash.zipline.loader.ZiplineCache
public fun ZiplineCache(context: Context, fileSystem: FileSystem, directory: Path, maxSizeInBytes: Long): ZiplineCache defined in app.cash.zipline.loader

Expect/Actual was needed,
Documentation can be improved for this, since IDE doesnt throw any errors until compilation for this.

Or use Androidx.Startup to get a reference of context if thats something that would suit as well.

This is working as intended. You’ve gotta do this expect/actual work in your own code.