ursus
11/04/2025, 11:12 PMcompose stability analyze IDE plugin (https://github.com/skydoves/compose-stability-analyzer/)
and I have a question about this callsite.
on one hand it says ActiveTariff and List<Dashboard.DataUsageTile> which are both sealed classes - they cannot be determined at compile time - but CAN at runtime, right? (also, why? all the children are right there in the same module & they're data classes, I figured the compile time analysis works on AST or something like that; not speculative execution)
on the other hand the whole RegularBody is not skippable due to the 2 being unstable - why? I though they can be be stable but deferred to runtime, no? and if proven such, then the RegularBody should be skippable, no?shikasd
11/05/2025, 12:13 AMursus
11/05/2025, 12:14 AMursus
11/05/2025, 12:16 AMshikasd
11/05/2025, 12:16 AMursus
11/05/2025, 12:17 AMshikasd
11/05/2025, 12:18 AMruntime stability means that these classes are from a different module, and it is stable, but we cannot prove that it won't be unstable as the module evolves (e.g. if it is a library that you upgrade). The runtime stable values just check a stable flag on the class instead of explicitly being resolved to stable.
If you are using version of Kotlin that is new enough (after 2.0, I believe), you have strong skipping enabled, and then your function is /always/ skippable. Compose just compares unstable values by reference instead of equals in that case, which is fine in 90% of cases.ursus
11/05/2025, 12:20 AMruntime stability means that these classes are from a different module, and it is stable, but we cannot prove that it won't be unstable
does that mean even a data class, but from a different module will only be compared by === ?ursus
11/05/2025, 12:22 AMKonstantin Tskhovrebov
11/05/2025, 8:41 AM