I have confirmed that ktlint 0.50.0 is not working...
# ktlint
w
I have confirmed that ktlint 0.50.0 is not working with ktlint-gradle, but I will be releasing a fix soon: https://github.com/JLLeitschuh/ktlint-gradle/pull/687
thank you color 2
p
Sorry for that. I am not sure whether it should be fixed in ktlint-gradle as it is a temporary parameter.
w
no worries. my code is just
Copy code
val engine = KtLintRuleEngine(
                ruleProviders = StandardRuleSetProvider().getRuleProviders()
            )
so I didn't have to change it, just recompile it with the new ktlint on the classpath so that it resolves the correct method signature. It seems like something that should just work, but I guess doesnt due to how the kotlin compiler handles optional method parameters. if I used reflection and passed the params in as a map it would have just worked 😕
@jlleitschuh brought up the point: if you had `@JvmOverloads`(https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-overloads/) on that constructor, it wouldn't break bytecode compatibility when you change it
im getting our fix out for this either way, but just for future reference, that could help
p
Ok cool. Tnx for tip about
@JvmOverloads
. Problematic part is just to remember to add the annotation when changing the signature when adding an additional parameter. Maybe, it is time to add something like https://github.com/Kotlin/binary-compatibility-validator
w
Ohh that looks like a useful tool