My `value class`wrapping `String`always causes par...
# compose
m
My `value class`wrapping `String`always causes parameter to be `unstable`(as per `pluginandroidx.compose.compiler.plugins.kotlinmetricsDestination`option), even though https://issuetracker.google.com/issues/144582214 is
fixed
, so it should be inferred as stable. Can I somehow make it became stable?
I have even tried to mock Composes internal apis:
Copy code
@Immutable
@JvmInline
@StabilityInferred(0)
value class Wrapper(@Stable val value: String) {
    companion object {
        @JvmField
        public val `$stable` = 0
    }
}
but with no luck.
m
Is your value class declared in a module that has the compose compiler enabled? I think the auto inferring only happens in the modules that are using compose.
m
It is generally in separate module (but it has compose plugin). I have moved in the the same module (with compose) that uses it and it's still unstable.
s
Yes, I observed the same issue
u
The issue you referenced seems limited to primitive types.
String
is not a primitive type. You could create a new issue requesting a more general solution.