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

Non-public markers aren't handled correctly for functions with default parameters #58

Closed
zsmb13 opened this issue Jun 2, 2021 · 2 comments · Fixed by #85
Closed

Non-public markers aren't handled correctly for functions with default parameters #58

zsmb13 opened this issue Jun 2, 2021 · 2 comments · Fixed by #85
Labels
bug Something isn't working PR welcome

Comments

@zsmb13
Copy link

zsmb13 commented Jun 2, 2021

When declaring an opt-in annotation and adding that annotation to the nonPublicMarkers configuration, functions that have default parameters are not correctly excluded from the api dump - the generated $default function is still included. A very similar issue to the one fixed in #30.

Example annotation:

@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
annotation class MyInternalApi

An example function:

@MyInternalApi
fun defParamInternalFun(x: Int = 0) {}

The incorrect API dump:

public final class co/zsmb/example/MainKt {
	public static synthetic fun defParamInternalFun$default (IILjava/lang/Object;)V
}

Project with examples and reproducing the issue can be found here.

@fsgjlp
Copy link

fsgjlp commented Jun 9, 2022

@qwwdfsad, would you be so kind as to release a new version of the library with this fix?

@qwwdfsad
Copy link
Collaborator

Released 0.10.1. Should be available on MavenCentral soon

ilya-g added a commit to JetBrains/kotlin that referenced this issue Nov 14, 2022
There were two problems in BCV fixed:
- Kotlin/binary-compatibility-validator#36
- Kotlin/binary-compatibility-validator#58

Therefore some methods with default values and properties that
mistakenly wasn't included in the dump, now have appeared in it.
ilya-g added a commit to JetBrains/kotlin that referenced this issue Nov 17, 2022
There were two problems in BCV fixed:
- Kotlin/binary-compatibility-validator#36
- Kotlin/binary-compatibility-validator#58

Therefore some methods with default values and properties that
mistakenly wasn't included in the dump, now have appeared in it.
KotlinBuild pushed a commit to JetBrains/kotlin that referenced this issue Nov 18, 2022
There were two problems in BCV fixed:
- Kotlin/binary-compatibility-validator#36
- Kotlin/binary-compatibility-validator#58

Therefore some methods with default values and properties that
mistakenly wasn't included in the dump, now have appeared in it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR welcome
Projects
None yet
3 participants