Currently, atomicfu compiler plugin only supports atomic extensions that can be used inside one module.
E.g. an internal atomic extension declared in the main module cannot be used in test module.
internal inline fun AtomicInt.foo(block: (id: Int) -> Int) { }
The problem:
Atomicfu compiler plugin generates transformed declaration for every atomic extesion in IR:
internal fun foo$atomicfu(dispatchReceiver: Any?, atomicHandler: AtomicIntegerFieldUpdater)
though compilation of the test module does not depend on the transformed IR, so this generated function can not be retrieved.
Possible solutions:
Checker in FIR: frontend checker for usages of atomic extensions out of module
Generate transformed declaration in air per module (to be investigated)
Currently, atomicfu compiler plugin only supports atomic extensions that can be used inside one module. E.g. an internal atomic extension declared in the main module cannot be used in test module.
The problem: Atomicfu compiler plugin generates transformed declaration for every atomic extesion in IR:
though compilation of the test module does not depend on the transformed IR, so this generated function can not be retrieved.
Possible solutions: