Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface DefaultImpls classes are present in API files even though the interface is annotated with OptIn and the annotation excluded #155

Closed
arkivanov opened this issue Nov 25, 2023 · 1 comment · Fixed by #161
Labels
bug Something isn't working

Comments

@arkivanov
Copy link

Reproducer code:

@RequiresOptIn(level = RequiresOptIn.Level.ERROR)
@Retention(AnnotationRetention.BINARY)
annotation class InternalApi

@InternalApi
interface Foo {
    fun foo() {}
}

Also excludle InternalApi annotation using nonPublicMarkers config.

As expected, the Foo interface is not present in API files, but its DefaultImpls class is.

public final class com/arkivanov/mvikotlin/core/utils/Foo$DefaultImpls {
	public static fun foo (Lcom/arkivanov/mvikotlin/core/utils/Foo;)V
}

public abstract interface annotation class com/arkivanov/mvikotlin/core/utils/InternalApi : java/lang/annotation/Annotation {
}

Perhaps, DefaultImpls should be also excluded in this case?

@fzhinkin
Copy link
Collaborator

Thanks for reporting the issue. It actually seems to be a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants