andylamax
08/31/2025, 9:32 AMfun dependency(dependencyProject: Project)
fun dependency(delegatedProject: DelegatingProjectDependency)
The issue that I have here is that, the dependencies are defined inside a composite build (not just a subproject). And I am having a hard time getting an instance of that subproject. If anyone can help me how to achieve this, I will greatly appreciateShubham Singh
08/31/2025, 2:14 PMandylamax
09/02/2025, 1:57 PMCREATE TABLE IF NOT EXISTS ow_core_people(
uid INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
name TEXT NOT NULL,
photo TEXT
);
Because AUTO_INCREMENT doesn't work on SQLite, it just works on MySQL but fails on SQLite.
Is there a way for SQLDelight to support these multiple syntax and transform them in accordance to the dialect selected?Colton Idle
09/07/2025, 4:58 AMursus
09/09/2025, 11:30 AMsqldelight kotlin migrations, I need to have atleast a placeholder .sqm file.
This is error prone, as nothing seems to enforce the .sqm file.
Has anyone figured out a way to blow up such state? (.kt migration present but .sqm not)Slackbot
09/10/2025, 10:32 AMeygraber
09/12/2025, 6:58 PMColton Idle
09/25/2025, 3:39 PMursus
09/30/2025, 1:11 PManvil user.
Now I want to experiment with KMP.
I want to keep @Inject and @ContributesBinding.. in common - and expect-actual them to typealiases of the jvm libs (and therefore have anvil/dagger take effect only on jvm)
@Inject is easy enough
@Target(
FUNCTION,
PROPERTY_GETTER,
PROPERTY_SETTER,
CONSTRUCTOR,
FIELD
)
@Retention(RUNTIME)
@MustBeDocumented
expect annotation class Inject()
actual typealias Inject = javax.inject.Inject
but I'm having trouble with @ContributesBinding because of all the params. See the full issue in threadColton Idle
09/30/2025, 6:05 PMcom.squareup.okhttp3:mockwebserver3:5.1.0
or
com.squareup.okhttp3:mockwebserver:5.1.0
Are my depenedencies setup incorrectly or should i indeed be seeing both options (if so... which to pick)?ursus
10/01/2025, 9:45 PMByteArray instead of a `String`so I can deterministically clear the value from memory, because GC blah blah.
But, when using okhttp interceptor to attach a token as
val tokenString = String(tokenBytes, Charsets.UTF_8) <-----
val newRequest = request.newBuilder()
.header("Authorization", "Bearer $tokenString")
.build()
then it's a moot point right?
Or -- the question -- is there a smarter what of doing this in okhttp?
Or do I just need to accept the transient token in memory (and therefore holding it as ByteArray is mostly pointless)?Colton Idle
10/08/2025, 8:44 PM./gradlew androidlibrary:assemble is successful, but ./gradlew app:assemble fails due to
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class okhttp3.Address found in modules okhttp-jvm-5.1.0.jar -> okhttp-jvm-5.1.0 (com.squareup.okhttp3:okhttp-jvm:5.1.0) and okhttp-release.aar -> okhttp-release-runtime (com.squareup.okhttp3:okhttp-android:5.1.0)
seems like something regarding okhttp-jvm and okhttp-android? according to docs, this shouldn't be an issue since im using gradle and not maven?jessewilson
10/09/2025, 9:57 PMColton Idle
10/09/2025, 10:16 PMeygraber
10/12/2025, 4:42 PMQueryResult.AsyncValue, not because the driver itself is async, but because I want to use coroutines in my connection pool. Is that "abusing" the system, or a valid use case?eygraber
10/13/2025, 10:02 PMtransaction though, because it doesn't like the transaction escaping the thread it is started on, which is what happens with the dispatcher support (newTransaction, execute, and executeQuery use withContext to switch into the proper dispatcher).
Is there any way to hook into the transacter to support this, and if not, is there any chance support for this could get added to SqlDelight?Yassine Abou
10/15/2025, 8:25 PMno such table: user error with SQLDelight on a Kotlin Multiplatform project.
I've tried the common solutions like manually calling Schema.create(driver), deleting the old database file, and ensuring I'm using a singleton instance for the database, but the problem persists. It seems the schema creation is either not happening or is happening after my first query is executed.
Full stacktrace and code in thread 👇🏽Colton Idle
10/17/2025, 5:50 PMYassine Abou
10/17/2025, 10:19 PMtext
org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: chats)
org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: generated_images)
To reproduce the error:
1. Clone the repository: https://github.com/yassineAbou/LLMS.git
2. Run the composeApp desktop target
3. The errors appear immediately during the buildeygraber
10/20/2025, 3:53 AMCoroutineDispatcher you are using.
If you have any thoughts, questions, or concerns, please discuss hereColton Idle
10/24/2025, 2:57 PMcrowforkotlin
10/25/2025, 1:34 AMmaximilianosorich
11/01/2025, 11:03 PMkotlin {
@OptIn(ExperimentalWasmDsl::class)
wasmJs("store") {
browser {
commonWebpackConfig {
outputFileName = "store.js"
}
}
binaries.executable()
}
storeMain.dependencies {
// DB Web worker
implementation(libs.web.worker.driver)
implementation(devNpm("copy-webpack-plugin", "9.1.0"))
implementation(npm("@cashapp/sqldelight-sqljs-worker", "2.1.0"))
implementation(npm("sql.js", "1.8.0"))
}
}
sqldelight {
databases {
create("Database") {
packageName.set("ar.com.cancerbero")
deriveSchemaFromMigrations.set(true)
verifyMigrations.set(true)
generateAsync.set(true)
}
}
}
the webpack.config.d/sqljs.js seems to be working...
config.resolve = {
fallback: {
fs: false,
path: false,
crypto: false,
}
};
const CopyWebpackPlugin = require('copy-webpack-plugin');
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
'../../node_modules/sql.js/dist/sql-wasm.wasm'
]
})
);
the provideDbDriver:
private val workerScriptUrl: String = js("""new URL("@cashapp/sqldelight-sqljs-worker/sqljs.worker.js", import.meta.url)""")
actual suspend fun provideDbDriver(
schema: SqlSchema<QueryResult.AsyncValue<Unit>>
): SqlDriver {
return WebWorkerDriver(
Worker(workerScriptUrl)
).also { schema.create(it).await() }
}
The initialization logic:
object StoreApp {
val scope = CoroutineScope(Dispatchers.Default)
private var database: Database? = null
init {
scope.launch {
val driver = provideDbDriver(Database.Schema)
database = createDatabase(driver)
}
}
}
This error appears at first moment, with no use... So LATER when i try to do something like:
it crashes:
db!!.key_valuesQueries.selectValue("selectedStoreId").asFlow().mapToOneOrNull(Dispatchers.Default),
because of null pointer exception...
The Database,kt in commonMain:
expect suspend fun provideDbDriver(
schema: SqlSchema<QueryResult.AsyncValue<Unit>>
): SqlDriver
fun createDatabase(driver: SqlDriver): Database {
return Database(driver)
// Do more work with the database (see below).
}Zoltan Demant
11/07/2025, 6:29 AMid TEXT AS Id PRIMARY KEY is somehow null in my SqlDelight database for ~100 of my users.
Then crashes at runtime due to: performanceSqlAdapter.idAdapter.decode(cursor.getString(0)!!)
The id class is a string value class that makes sure the string is never null or empty.
This works for 99,99% of the userbase; but 100 people is still a lot. Any clues?Cosmin Mihu
11/10/2025, 4:30 PMimport app.cash.sqldelight.async.coroutines.awaitCreate
import app.cash.sqldelight.db.SqlDriver
import app.cash.sqldelight.driver.worker.WebWorkerDriver
import app.cash.sqldelight.driver.worker.expected.Worker
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlin.js.js
internal actual fun createDatabaseDriver(): SqlDriver {
return WebWorkerDriver(jsWorker()).also {
GlobalScope.launch(Dispatchers.Default) {
LibraryDatabase.Schema.awaitCreate(it)
}
}
}
private fun jsWorker(): Worker =
js("""new Worker(new URL("@cashapp/sqldelight-sqljs-worker/sqljs.worker.js", import.meta.url))""")
I have this error.
e: DatabaseDriverFactory.kt:22:25 Cannot access 'typealias Worker = Worker': it is internal in file.
Is something that I miss?eygraber
11/11/2025, 7:55 PMYassine Abou
11/14/2025, 11:17 PMcrowforkotlin
11/17/2025, 11:13 AMNeil Miller
11/17/2025, 7:45 PMapp.cash.sql-psi or SQLDelight. Thanks!Hrodrick
11/18/2025, 4:56 PMsrc/main/sqldelight but I've never seen any KMP project with a src/main folder. All the projects I work with use a src/commonMain module. Do I still need to have the sqls on a main src folder or is it possible to have them on commonMain?