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

jvm-abi-gen: Remove empty FileClasses from abi #5262

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Tagakov
Copy link
Contributor

@Tagakov Tagakov commented Feb 9, 2024

These two code snippets have different abi:

//file test.kt
private fun funToBeRemoved() = Unit

class Class

and

//file test.kt
class Class

It happens because of two reasons:

  • Empty (absolutely, even zero constructors) FileClass TestKt is not being removed from the abi.jar
  • kotlin_module file has a record for mentioned FileClass as well

Meaning that adding/removing first/last top-level function in a file invalidates ABI in 100% cases.

I've tried to fix the issue, but can't make kotlin_module the same for two snippets above.

Youtrack ticket: https://youtrack.jetbrains.com/issue/KT-65696/

@udalov udalov self-assigned this Feb 9, 2024
@udalov udalov added the Compiler label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants