Find @Immutable on classes with var properties

Proprietary

@Immutable is the stronger sibling of @Stable: it promises that all public properties are observably unchangeable after construction. A var field is by definition observably changeable — Compose will assume it can skip recompositions safely and miss updates. Drop the annotation or convert the property to val (and a private backing var if needed).

org.openrewrite.kotlin.compose.FindImmutableAnnotationOnMutableClass$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.compose.FindImmutableAnnotationOnMutableClass$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.