Skip to content

Feature/compose stability - #42

Merged
solcott merged 5 commits into
mainfrom
feature/compose_stability
Sep 29, 2026
Merged

solcott merged 5 commits into
mainfrom
feature/compose_stability

Conversation

@solcott

@solcott solcott commented Sep 28, 2026

Copy link
Copy Markdown
Owner

No description provided.

solcott and others added 4 commits September 28, 2026 15:14
Adds the `androidx.compose.runtime:runtime-annotation` dependency to the `model` and `presenter` modules to explicitly mark UI-bound data classes for Compose:
- Annotates `Continent`, `Country`, `CountryDetail`, and `Language` models with `@Immutable`.
- Annotates `CountryDetailScreen.State` and `CountryListScreen.State` with `@Immutable`.
- Annotates `SearchAndFilterScreen.State` with `@Stable`.

Also includes minor cleanup, such as removing a redundant type argument in `SearchAndFilterPresenter` and suppressing a version inspection in `libs.versions.toml`.
Deletes the shared Xcode scheme `Countries.xcscheme` from `iosApp/Countries.xcodeproj/xcshareddata/xcschemes/`.
Passing ContentState<List<Country>> as its own parameter gave CountriesList
runtime stability: ContentState is a generic library type and List is an
interface. The value was already on CountryListScreen.State, which is
@immutable, so read it from there instead of whitelisting List.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Annotate `listPaneColor()` in `CountryListUi.kt` with `@ReadOnlyComposable` to optimize its execution, as it only reads composition locals.
- Remove the unnecessary `@OptIn(ExperimentalMaterial3AdaptiveApi::class)` from `countriesPaneDirective` in `ListDetailNavDecoration.kt`.
@solcott
solcott force-pushed the feature/compose_stability branch 2 times, most recently from 55e896c to c94c4dd Compare September 28, 2026 22:54
Enable the Compose compiler's metrics and reports via a new `compose.stability` convention plugin, and add a `ComposeStabilityCheckTask` to enforce them. The task reads the generated reports and fails the build if it finds an `unstable` class or an unskippable restartable composable that isn't explicitly accepted in the new `config/compose/` allowlists.

Apply the check across all Compose modules (`app`, `apple`, `desktop`, `presenter`, `shared-compose`, `ui`, and `web`). Alongside this, clean up the Kotlin Compose compiler plugin application to use a version catalog alias (`libs.plugins.kotlin.compose`) rather than a root `buildscript` classpath block.
@solcott
solcott force-pushed the feature/compose_stability branch from c94c4dd to bd4ea70 Compare September 28, 2026 23:14
@solcott
solcott merged commit e52c923 into main Sep 29, 2026
1 check passed
@solcott
solcott deleted the feature/compose_stability branch September 29, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant