Assigned
Status Update
Comments
da...@google.com <da...@google.com> #2
Information redacted by Android Beta Feedback.
le...@google.com <le...@google.com>
sa...@gmail.com <sa...@gmail.com> #4
Please provide the requested information to proceed further. Unfortunately the issue will be closed within 7 days if there is no further update.
Description
Jetpack Compose release version: 1.1.0-beta01
The
@StabilityInferred
seems to be placed on public classes forcing the library to declare anapi
dependency incompose-runtime
or risk running into issue due toStabilityInferred
being missed in the classpath.Consider the following:
A library 'lib' that exposes a View whose implementation is in Compose will declare an
implementation
dep tocompose-runtime
. The consuming 'app' then uses 'lib' and runs some annotation processor. If the processor, via the AST visits the exposed View and reads it's class annotations, it will encounter error / unresolved type due to@StabilityInferred
not being in the compile classpath of 'app' due to Gradle reducing the compile classpath between module boundaries (app
->lib
->compose-runtime
).This was reported in Dagger here:https://github.com/google/dagger/issues/3090#issuecomment-988245465
Note that even though a workaround is to add a dep to
compose-runtime
in 'app' or declare it asapi
in 'lib', the solution will affect compilation times due to increased classpath. The user also has no way of knowing the Kotlin compiler is exposing types in the user's public API making it harder for them to reason about the workaround.