Marc Plano-Lesay
04/28/2021, 4:26 AMAppComponent
that's a singleton, holding a few singletons, including a TaskRegistry
• A TaskSubComponent
, scoped to a TaskScope
, declared through Anvil with @MergeSubcomponent(TaskScope::class)
, which I think might be a mistake. A few classes are bound to this scope through @TaskScoped
(the Dagger/javax.inject annotation) and @ContributesBinding(TaskScope::class
Now in my TaskRegistry
, I'm trying to instantiate tasks (which have a bunch of dependencies, all bound to TaskScope
). The way I'm trying to do this is by injecting in my TaskRegistry
a Provider<TaskSubComponent>
, and using this to instantiate new tasks. In my AppComponent
, I'm declaring my sub-component as well (fun taskSubComponent(): TaskSubComponent
).
At build-time, Dagger complains that it can't provide the sub-component as it doesn't have a binding. I thought that's what @MergeSubcomponent
was basically achieving, but I'm clearly misunderstanding it. What I'm doing seems to be quite close to the LoggedInScope
in the sample, but it doesn't seem to be used anywhere so I'm not really sure what's going on there...
Does anyone have any hint/documentation other than the readme?rkeazor
05/03/2021, 8:37 PMJohn O'Reilly
05/04/2021, 5:02 PM> Could not resolve com.squareup.sqldelight:coroutines-extensions:1.4.3.
- Variant 'js-runtime' capability com.squareup.sqldelight:coroutines-extensions:1.4.3 declares a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'legacy' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir'
Not sure if there's plans to update to support IR (as per https://kotlinlang.org/docs/js-ir-compiler.html#authoring-libraries-for-the-ir-compiler-with-backwards-compatibility) ?jw
05/04/2021, 5:06 PMalec
05/05/2021, 11:26 AMNikola Milovic
05/06/2021, 5:14 AMcurl --location --request GET 'localhost:5000/api/657' \
--form 'token="zjdW36WT0kkrlZHzjv3IpjysT9dA6QzK"
All is fine until the --form part. As --form should be multipart data, which isn't allowed together with Get?
Multipart can only be specified on HTTP methods with request body (e.g., @POST).
Elka
05/10/2021, 7:00 PMmyanmarking
05/11/2021, 6:38 PMroomDatabase.invalidationTracker.addObserver(invalidator)
? I need to observe table changes, i don’t need the changed data or notifications, just to knowKweku
05/11/2021, 7:02 PMmyanmarking
05/13/2021, 1:37 PMColton Idle
05/20/2021, 4:56 AMjean
05/20/2021, 8:08 AM- generateCommonMainMyProjectDatabaseInterface
- generateCommonMainMyProjectDatabaseSchema
- generateSqlDelightInterface
- verifyCommonMainMyProjectDatabaseMigration
- verifySqlDelightMigration
They all pass successfully but I can’t see anything generated (I invalidated my cache so build/sqldelight
is empty).
When I run the gradle build
command, it fails on generated sqldelight class imports (since they are not build).
What should I do from there to generate my sqldelight classes?saket
05/24/2021, 3:12 AMxxfast
05/24/2021, 12:02 PMjw
05/24/2021, 4:42 PMjw
05/24/2021, 4:42 PMDaniele B
05/26/2021, 6:06 PMval sqlDriver = JdbcSqliteDriver(JdbcSqliteDriver.IN_MEMORY)
however when I make a DB operation, I get this error:
Exception in thread "AWT-EventQueue-0 @coroutine#4" org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: Countries)
full stacktrace in the comment
(using com.squareup.sqldelight:sqlite-driver:1.5.0
)jw
05/28/2021, 12:39 AMPhilip Dukhov
05/29/2021, 7:21 PMindicesFlow
.map { indices ->
database.usersQueries
.getBy(indices)
.asFlow()
.mapToList()
}
.flattenConcat()
.collect { users ->
}
For some reason map gets called only for the first emitted item, and when I emit new indices to indexesFlow
it’s not get called anymore and so collect it not get called too. I expect old database flow to be cancelled and be replaced with a new one.
And if I replace database flow with a basic flow with emit, same code work fine for new indexesFlow emits
indicesFlow
.map { indices ->
flow {
emit("$indices")
}
}
.flattenConcat()
.collect { strings ->
}
I’m just starting exploring flows, what am I missing here?rudolf.hladik
06/01/2021, 10:31 AMjw
06/02/2021, 1:26 AMNikky
06/04/2021, 8:48 AMmingwX64
and it seems to work without issues via poweshell and cmd
but when executed in gitbash things seem to fall apart
i am getting
Uncaught Kotlin exception: okio.IOException: Permission denied
when calling filesystem.delete(command.reportFile.toPath())
and
Uncaught Kotlin exception: okio.FileNotFoundException: No such file or directory
when calling val write: BufferedSink = fileSystem.appendingSink(command.reportFile.toPath()).buffer()
command.reportFile
is /c/Users/nikky/dev/kotlin-cli-starter/git-standup-report.txt
the file exists and is writable:
ls -la /c/Users/nikky/dev/kotlin-cli-starter/git-standup-report.txt
-rw-r--r-- 1 nikky 197121 407 Jun 4 10:41 /c/Users/nikky/dev/kotlin-cli-starter/git-standup-report.txt
dave08
06/14/2021, 10:20 AMeinar
06/18/2021, 12:24 PMid
exists, rename it to userId
but otherwise don’t.Mohit Khanna
06/21/2021, 8:56 PMdave08
06/23/2021, 1:18 PMgenerateDaggerFactories.set(true)
, IDEA Ultimate doesn't seem to know where the module classes are and can't navigate to them from the generated component (even though they're there and everything works...), whereas when using dagger generated modules it does. Is there any way to get intellij to know where these files are (and not make all my components red...)?dave08
06/23/2021, 1:21 PMgenerateDaggerFactories.set(true)
only when not compiling the module for tests (I declare a component in the tests but not in the main module's code)? I noticed the variantFilter
I just don't see how it works...?jw
06/25/2021, 7:46 PMalec
06/28/2021, 11:45 AMColton Idle
07/02/2021, 1:40 AM