-
Notifications
You must be signed in to change notification settings - Fork 458
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
Add support for ktlint 0.46.0 #1239
Comments
Same error
|
ktlint had a significant update in 0.46.x, including a bunch of breaking changes in tests. The new API is nicer though. This patch includes all the migration to the new test style, and to pass the default tests. NOTE: At the moment of writing this, spotless hasn't been updated yet to support the new ktlint version. diffplug/spotless#1239
ktlint had a significant update in 0.46.x, including a bunch of breaking changes in tests. The new API is nicer though. This patch includes all the migration to the new test style, and to pass the default tests. NOTE: At the moment of writing this, spotless hasn't been updated yet to support the new ktlint version. diffplug/spotless#1239
* Updates ktlint to 0.46.1 ktlint had a significant update in 0.46.x, including a bunch of breaking changes in tests. The new API is nicer though. This patch includes all the migration to the new test style, and to pass the default tests. * Disable spotless/ktlint until they fix the new version support -> diffplug/spotless#1239
Spotless has always taken the position that updating Spotless to latest should not force you to adopt the latest of each child formatter. Making that work has required parsing the version number, and updating control flow from there: spotless/lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java Lines 108 to 114 in 1ff43ad
I think this is a nice feature for users, but KtLint breaks its API too often for this to be practicable. If someone submits a PR which maintains support for older versions, that's great. But if you wipe out support for older versions, I'm okay with that too. Just make sure that
|
Fixed in |
If you are submitting a bug, please include the following:
Upgrading from ktlint 0.45.2 to 0.46.0 results in the
spotlessKotlin
task failing withNoClassDefFoundError
.Gradle 7.4.2
6.7.2
Seems to affect all operating systems - I can reliably reproduce this on Windows, Linux and macOS runners on GitHub Actions, as well as locally.
https://github.com/charleskorn/kaml/tree/renovate/com.pinterest-ktlint-0.x
gradlew spotless[Apply/Check] --stacktrace
The text was updated successfully, but these errors were encountered: