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

6.23.2 has breaking ABI changes #1923

Closed
ZacSweers opened this issue Dec 1, 2023 · 3 comments
Closed

6.23.2 has breaking ABI changes #1923

ZacSweers opened this issue Dec 1, 2023 · 3 comments

Comments

@ZacSweers
Copy link
Contributor

When trying to update to 6.23.2 from 6.22.0, we see the following runtime failure coming from a gradle plugin compiled against 6.22.0. This appears to be the result of a breaking ABI change. Since the library abides by semver, I suspect this is not intentional.

Caused by: java.lang.NoSuchMethodError: 'com.diffplug.gradle.spotless.KotlinExtension$KtfmtConfig com.diffplug.gradle.spotless.KotlinExtension.ktfmt(java.lang.String)'	
at slack.gradle.SlackBasePlugin$configureSpotless$1$spotlessFormatters$1$4.execute(SlackBasePlugin.kt:109)	
at slack.gradle.SlackBasePlugin$configureSpotless$1$spotlessFormatters$1$4.execute(SlackBasePlugin.kt:109)	
at com.diffplug.gradle.spotless.SpotlessExtensionPredeclare.lambda$new$0(SpotlessExtensionPredeclare.java:35)	
at com.diffplug.gradle.spotless.SpotlessExtensionPredeclare.lambda$new$1(SpotlessExtensionPredeclare.java:33)	
at org.gradle.internal.code.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:122)	
at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:173)
@Goooler
Copy link
Member

Goooler commented Dec 2, 2023

com.diffplug.gradle.spotless.KotlinExtension$KtfmtConfig has been moved to com.diffplug.gradle.spotless.BaseKotlinExtension$KtfmtConfig see #1890.

@ZacSweers
Copy link
Contributor Author

Sure, but that is a breaking ABI change in a semver library. Shouldn't that be a new major release?

@nedtwigg
Copy link
Member

nedtwigg commented Dec 3, 2023

Thanks for the note @ZacSweers. I have tried to be strict about semver on spotless-lib, but for the Gradle plugin I have thought of the consumer as buildscript DSL, so I haven't considered changes such as the above to be a breaking change if they wouldn't break a script.

But makes sense at this point there are probably convention plugins that are using the Gradle plugin. Sorry for the break, from here on out I'll try to enforce this better.

I'm about to publish a 7.0 so that folks who haven't updated Spotless yet won't hit this.

@nedtwigg nedtwigg closed this as completed Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants