You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are scenarios where the Atomicfu Gradle plugin fails to transform test code to remove the Atomicfu runtime dependency, for example when atomics are used within a runBlocking coroutine lambda:
java.lang.IllegalStateException: Unsupported type of atomic receiver expression: GET_VAR 'val canceled: kotlinx.atomicfu.AtomicBoolean [val] declared in kotbase.BaseCoroutineTest.testCoroutineScopeListenerRemoved.' type=kotlinx.atomicfu.AtomicBoolean origin=null
But all the usages in the main source sets are able to be transformed successfully, so it's desirable to apply the plugin transformation to these published source sets, while just using the Atomicfu dependency directly in tests.
Alternatively, there are scenarios where atomics are only needed in tests and not in the main source sets. But applying the Atomicfu Gradle plugin to the module results in adding the Atomicfu runtime dependency to native targets in the main source sets, which is unnecessary.
It would be helpful to exclude certain source sets from the Gradle plugin's transformations as well as which source sets have the runtime dependency added. Also, if it could be determined which source sets don't actually require the runtime dependency (because atomics aren't used) and avoid adding it, this would be ideal.
The text was updated successfully, but these errors were encountered:
There are scenarios where the Atomicfu Gradle plugin fails to transform test code to remove the Atomicfu runtime dependency, for example when atomics are used within a
runBlocking
coroutine lambda:But all the usages in the main source sets are able to be transformed successfully, so it's desirable to apply the plugin transformation to these published source sets, while just using the Atomicfu dependency directly in tests.
Alternatively, there are scenarios where atomics are only needed in tests and not in the main source sets. But applying the Atomicfu Gradle plugin to the module results in adding the Atomicfu runtime dependency to native targets in the main source sets, which is unnecessary.
It would be helpful to exclude certain source sets from the Gradle plugin's transformations as well as which source sets have the runtime dependency added. Also, if it could be determined which source sets don't actually require the runtime dependency (because atomics aren't used) and avoid adding it, this would be ideal.
The text was updated successfully, but these errors were encountered: