Just updating to kodein-db 0.4.0 and getting some ...
# kodein
j
Just updating to kodein-db 0.4.0 and getting some errors....
docs seem to indicate I should be able to do something like
Copy code
db = DB
    .inDir(getApplicationFilesDirectoryPath())
    .open("bikeshare_db", KotlinxSerializer {
        NetworkList.serializer()
    })
but getting
Copy code
Type mismatch.
Required:
Options.Open
Found:
KotlinxSerializer
r
Hi John, Kodein-DB 0.4.0 comes with an
inMemory
database use (for test only!!), thus the API has evolved a bit, but maybe the documentation is outdated
We are using it like
Copy code
private val dbFactory by lazy { DB.default.inDir(getApplicationFilesDirectoryPath(ctx)) }
    private val appDB by lazy { dbFactory.open("application", KotlinxSerializer()) }
j
k, thanks....will try that
r
But there is some nasty bugs in 0.4.0 beta that we need to fix for Android. you might want to wait for the next round
j
ok, I got notification of 0.4.1 update but that didn't seem to be available
r
Github Actions has broke our pipeline (for windows) so we need to fix it too…
j
@romainbsl just tried above code (with 0.4.0) and still getting following (on 2nd line)...maybe some extension function that's not getting picked up?
Copy code
Type mismatch.
Required:
Options.Open
Found:
KotlinxSerializer