-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace warnings with errors #3496
Replace warnings with errors #3496
Conversation
2867761
to
e394974
Compare
...lin/org/jetbrains/compose/experimental/uikit/internal/resources/configureSyncIosResources.kt
Show resolved
Hide resolved
Should we rename it to "org.jetbrains.compose.kotlin.native.manageCacheKind"? To be consistent with the other property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait Dima for the second approval.
I will cherry-pick it to release/1.5.0 after merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All fine, Approve!
We tried to enable the compiler cache, when Kotlin/Native 1.9.0 is used. Prior to Kotlin 1.9.0, the caching could not be used with Compose, because code generation would fail. With Kotlin 1.9.0, code generation succeeds, but generated debug symbols cause issues with dsymutil during xcode build. For more details, see https://youtrack.jetbrains.com/issue/KT-61270 This change partially reverts JetBrains#3477 and JetBrains#3496 Now, we always set `kotlin.native.cacheKind=none` in Compose Multiplatform Gradle plugin for all versions of Kotlin until KT-61270 is fixed. Also, explicit cache kind error becomes a warning again.
We tried to enable the compiler cache, when Kotlin/Native 1.9.0 is used. Prior to Kotlin 1.9.0, the caching could not be used with Compose, because code generation would fail. With Kotlin 1.9.0, code generation succeeds, but generated debug symbols cause issues with dsymutil during xcode build. For more details, see https://youtrack.jetbrains.com/issue/KT-61270 This change partially reverts #3477 and #3496 Now, we always set `kotlin.native.cacheKind=none` in Compose Multiplatform Gradle plugin for all versions of Kotlin until KT-61270 is fixed. Also, explicit cache kind error becomes a warning again.
We tried to enable the compiler cache, when Kotlin/Native 1.9.0 is used. Prior to Kotlin 1.9.0, the caching could not be used with Compose, because code generation would fail. With Kotlin 1.9.0, code generation succeeds, but generated debug symbols cause issues with dsymutil during xcode build. For more details, see https://youtrack.jetbrains.com/issue/KT-61270 This change partially reverts #3477 and #3496 Now, we always set `kotlin.native.cacheKind=none` in Compose Multiplatform Gradle plugin for all versions of Kotlin until KT-61270 is fixed. Also, explicit cache kind error becomes a warning again.
Some Gradle configuration flags and Gradle DSL options become incompatible with Compose Multiplatform 1.5.0.
1. Kotlin/Native cache kind explicitly set to "none"
By default, enabling/disabling the compiler caches for Kotlin/Native is now handled by Compose Multiplatform Gradle plugin. Manually disabling the cache raises a warning. The caches are disabled by the following flags in
gradle.properties
orlocal.properties
:kotlin.native.cacheKind=none
;kotlin.native.cacheKind.<IOS_TARGET_PRESET>=none
;What can you do?
kotlin.native.cacheKind=none
fromgradle.properties
orlocal.properties
.compose.kotlin.native.manageCacheKind=false
togradle.properties
.Detailed description
Disabling the compiler caches is usually not necessary because it significantly slows down incremental builds.
However, prior to Kotlin/Native 1.9.0, the compiler often could not compile Compose code with the cache.
This has led to widespread use of
cacheKind=none
throughout many Compose Multiplatform projects.The root issue is partially fixed in Kotlin 1.9.0, and will be fixed completely in a future release.
Compose Multiplatform Gradle plugin can now manage the necessary caching flags by itself based on a Kotlin/Native version being used. So once the underlying issue in Kotlin/Native compiler is fixed, the plugin will enable caching automatically.
2. CocoaPods resource configuration
Users of third party libraries (such as Moko Resources or libres) should not be affected by this.
Now, explicitly setting the extra spec
resources
attribute is prohibited:What can you do?
extraSpecAttributes["resources"]
from build scripts:gradle.properties
:Detailed description
For more information about resource management improvements, see the description of the corresponding PR.