maxmello
07/25/2025, 2:20 PMcontext receivers
in production code / in larger projects already migrated to context parameters
? It is already more robust than context receivers? When I added context receivers to my code, there were many problems with byte code errors, e.g. when I combined context(…)
with lots of other keywords (suspend
, inline
etc.). I worked around those cases. Now I’m unsure if I should already try to migrate to context parameters or wait until Kotlin 2.3.maxmello
07/25/2025, 2:24 PMinline fun <reified E : ImmutableResourceEntity<out R>, reified R : ResourceCreatable, reified T : Any> KProperty1<out R, T?>.setDBField(...)
or this one, I was unable to have the statement
parameter function be of type suspend context(ReadContext) Transaction.() -> T
without byte code errors
suspend fun <T> newReadTransaction(
transactionIsolation: Int? = null,
statement: suspend context(Transaction, ReadContext)
() -> T
)
altavir
07/25/2025, 4:37 PMmaxmello
07/25/2025, 5:04 PMaltavir
07/25/2025, 5:06 PMsindrenm
07/26/2025, 6:49 PM