Apply kotlinx-atomicfu compiler plugin #4018
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.
Motivation
kotlinx-atomicfu
is on the way to stabilization, as the next step I'm going to enable compiler transformations by default with the following getting rid of legacy transformations. For that it would be great to enable compiler plugin transformations in ktor. This PR enables JVM and Kotlin Native IR transformations performed by atomicfu-compiler-plugin.I've disabled JS IR transformations, for now there is a discussion regarding removal of the JS part of the compiler plugin.
Solution
Minor changes were made in the code:
minusAssign
/plusAssign
operators withaddAndGet
call, because the operators are not supported by the compiler plugin.AtomicRef<*>.setContinuation(..)
).