binary-compatibility-validator icon indicating copy to clipboard operation
binary-compatibility-validator copied to clipboard

Internal class ComposeSingletons is presented in the api dump

Open SumeraMartin opened this issue 3 years ago • 9 comments

I'm using kotlin 1.5.31 with compose 1.0.5.

My api dump contains a lot of following classes

public final class cloud/jablotron/apps/lib/auth/oauth2/ui/screens/login/ComposableSingletons$LoginScreenKt {
	public static final field INSTANCE Lcloud/jablotron/apps/lib/auth/oauth2/ui/screens/login/ComposableSingletons$LoginScreenKt;
	public static field lambda-1 Lkotlin/jvm/functions/Function3;
	public static field lambda-2 Lkotlin/jvm/functions/Function2;
	public fun <init> ()V
	public final fun getLambda-1$library_release ()Lkotlin/jvm/functions/Function3;
	public final fun getLambda-2$library_release ()Lkotlin/jvm/functions/Function2;
}

I'm not sure whether the issue is in this library or in the compose.

After brief look at the compose code, I assume that these classes should be internal so they shouldn't be presented in the api dump. Since compose code is not generated and is not possible to take a look at the code. It is really hard to get rid of these. Do you think that the issue is in the library? Or do you have an idea how to get rid of it? https://github.com/androidx/androidx/blob/4356507bc51920e48d01612f4e6f69f907055456/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationRegressionTests.kt

Thanks

SumeraMartin avatar Jan 27 '22 19:01 SumeraMartin

Thanks for the report.

I'll try to figure out what this ComposeSingletons is and whether it actually constitutes public ABI and will return here with the news.

It may be the case that it should be fixed in Compose itself (e.g. by adding the corresponding internal modifier to metadata) or that it is part of the ABI

qwwdfsad avatar Jan 28 '22 15:01 qwwdfsad

Hi @qwwdfsad, I have the same problem. Any news on this? Thanks

4brunu avatar Apr 18 '22 13:04 4brunu

Alas, no progress regarding this

qwwdfsad avatar Apr 18 '22 14:04 qwwdfsad