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

Filter out $suspendImpl functions declared in interfaces #270

Open
fzhinkin opened this issue Oct 10, 2024 · 1 comment · Fixed by #271
Open

Filter out $suspendImpl functions declared in interfaces #270

fzhinkin opened this issue Oct 10, 2024 · 1 comment · Fixed by #271
Labels
enhancement New feature or request jvm

Comments

@fzhinkin
Copy link
Collaborator

On JVM, the compiler generates special <original function name>$suspendImpl methods for every open suspendable function. For classes, these methods are package private and are never included in dump. For interfaces, however, such functions could only be either private (but we need to call them outside the interface, so that doesn't work), or public (we are here now). So, these public functions do not constitute the public ABI and are public only due to restrictions imposed on class files.

BCV should filter these methods out of generated dumps.

@fzhinkin
Copy link
Collaborator Author

See Kotlin/kotlinx.coroutines#4244 for example of a dump with $suspendImpl functions.

fzhinkin added a commit that referenced this issue Oct 10, 2024
fzhinkin added a commit that referenced this issue Oct 10, 2024
@fzhinkin fzhinkin linked a pull request Oct 10, 2024 that will close this issue
fzhinkin added a commit that referenced this issue Oct 18, 2024
* Enable default interface methods generation
* Filter out $suspendImpl methods.

Closes #270
shanshin pushed a commit to JetBrains/kotlin that referenced this issue Oct 28, 2024
* Enable default interface methods generation
* Filter out $suspendImpl methods.

Closes Kotlin/binary-compatibility-validator#270
Pull request Kotlin/binary-compatibility-validator#271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jvm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant