ktlint: ktlint doesn't work after update Kotlin to 1.3.30
After upgrade to Kotlin 1.3.30 ktlint doesn’t work and crash with exception
Exception in thread "main" java.lang.NoSuchFieldError: PROPERTY_DELEGATE
at com.github.shyiko.ktlint.core.ast.ElementType.<clinit>(ElementType.kt:33)
at com.github.shyiko.ktlint.ruleset.standard.ChainWrappingRule.<init>(ChainWrappingRule.kt:36)
at com.github.shyiko.ktlint.ruleset.standard.StandardRuleSetProvider.get(StandardRuleSetProvider.kt:12)
at com.github.shyiko.ktlint.Main.main(Main.kt:310)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (12 by maintainers)
We have exactly the same issue 😦
@shashachu Thanks for the answer! Looking at this, I assume it just got resolved by re-compiling with the newer kotlin version, since the public type has changed. Also afaik when you do
mvn clean verify
, it also runs ktlint over itself, so the build on the PR would’ve failed, if this was an issue.For me upgrading ktlint plugin to latest version which is 0.40.0 at the moment, helped.
It turns out jitpack just gets confused by the presence of gradle build files. I’ve fixed it here: https://github.com/pinterest/ktlint/pull/384