The second fix for atomicfu-runtime dependency #290
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When we need
kotlinx-atomicfu-runtimedependency:kotlinx-atomicfu-runtime-> it should be passed to the runtimeClasspathIn the last release
0.20.1this dependency was passed as compileOnly + runtimeOnly, that caused the issue:Could not find "org.jetbrains.kotlin:kotlinx-atomicfu-runtime"in the project that depends on coroutines only. That happened becausekotlinx-atomicfu-runtimedependency should've been in the compile classpath of that project andcompileOnlydependency could not be found there. Hence, this dependency is fixed back toimplementation.This fix is not final, because now
kotlinx-atomicfu-runtimedependency is added in any case, whether theenableJsIrTransformationflag is true or not. That's not completely correct and may cause double dependency warning (#289), though it fixes this issue (https://youtrack.jetbrains.com/issue/KT-57235), that is critical. The problem in the issue is that the project that depends on coroutines and ktor fails withCould not find "org.jetbrains.kotlin:kotlinx-atomicfu-runtime"-- becausektorklib manifest demands this dependency, though it shouldn't (the reason is under research).