RTAkland
04/03/2025, 2:54 PMval runBlockingSymbol = pluginContext.referenceFunctions(FqName("kotlinx.coroutines.runBlocking"))
.firstOrNull() ?: return
This API is not supported for K2, is there any other method?Pavel Kunyavskiy [JB]
04/03/2025, 2:55 PMfun referenceFunctions(callableId: CallableId): Collection<IrSimpleFunctionSymbol>
insteadRTAkland
04/03/2025, 2:58 PMIrElementTransformerVoidWithContext
Pavel Kunyavskiy [JB]
04/03/2025, 3:10 PMrunBlocking
topLevel function in kotlinx.coroutines
package from runBlocking
method of coroutines
class within kotlinx
package.
So K2 is used ClassId/CallableId API everywhere instead of FqName. In particular in pluginContext
there is another method which accepts CallableId
instead of FqName
and it works with K2.RTAkland
04/03/2025, 3:11 PM