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

Fix Kotlin non-abi-change mutator so it produces a non-abi-change for java consumers #215

Merged
merged 2 commits into from
Jul 17, 2020

Conversation

eskatos
Copy link
Member

@eskatos eskatos commented Jul 17, 2020

Changing the signature of a private function changes kotlin metadata hence not producing a non-abi-change but an abi-change for java consumers.

This commit lets the Kotlin mutator inject a dummy method before running a scenario, and modify it's implementation body on each build.

See #212

@eskatos eskatos added the bug label Jul 17, 2020
@eskatos eskatos requested a review from lptr July 17, 2020 11:54
@eskatos eskatos self-assigned this Jul 17, 2020
@eskatos eskatos marked this pull request as ready for review July 17, 2020 13:02
Changing the signature of a private function changes kotlin metadata
hence not producing a non-abi-change but an abi-change for Java
consumers.

This commit lets the Kotlin mutator inject a dummy method before running
a scenario, and only modify it's implementation body on each build.

Signed-off-by: Paul Merlin <paul@gradle.com>
@eskatos eskatos force-pushed the eskatos/kotlin/fix-non-abi-mutator branch from 58505e6 to 1a583ff Compare July 17, 2020 14:14
Copy link
Member

@lptr lptr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Signed-off-by: Paul Merlin <paul@gradle.com>
@eskatos eskatos merged commit c871125 into master Jul 17, 2020
@eskatos eskatos deleted the eskatos/kotlin/fix-non-abi-mutator branch July 17, 2020 17:57
@lptr
Copy link
Member

lptr commented Jul 20, 2020

This is what I get before the fix:

image

This is what I get after the fix:

image

Looks like it worked. (I also have no idea how build times can increase without the fix, but that's probably a bug in Kotlin.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants