I have a module that applies the compose plugin, and has a class in it:
Copy code
sealed class Navigation {
data class Account(val id: AccountId) : Navigation()
}
AccountId
comes from another module that doesn't apply the compose plugin and is defined as:
Copy code
interface StringId {
val raw: String
}
@JvmInline
value class AccountId(override val raw: String): StringId
If I run the compiler metrics on the first module, it shows:
Copy code
stable class Account {
stable val id: AccountId
<runtime stability> = Stable
}
I thought that classes coming from another module that doesn't apply the compose plugin will be treated as unstable?
b
Ben Trengrove [G]
08/03/2023, 3:35 AM
Inline classes we take the stability of the underlying type, so string in this case
e
eygraber
08/03/2023, 6:00 AM
Even though it's from a different module?
x
xoangon
08/03/2023, 6:45 AM
Compose determines the stability based on the types, not the variables. The "String" type is known by Compose regardless where your variable with that type is declared