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

Support Kotlin 1.4 #381

Closed
eiswind opened this issue Aug 17, 2020 · 4 comments
Closed

Support Kotlin 1.4 #381

eiswind opened this issue Aug 17, 2020 · 4 comments
Labels
ktlint ktlint project issue

Comments

@eiswind
Copy link

eiswind commented Aug 17, 2020

1.4 has the new

fun interface {
}

syntax for sam types. ktlint is already updating this
pinterest/ktlint#726

@JLLeitschuh
Copy link
Owner

Can you just specify a fixed/released version of ktlint with the version argument to use it?

@JLLeitschuh
Copy link
Owner

If you're seeing some specific exception when trying to process Kotlin 1.4 code that comes from this plugin, not from ktlint itself, then please provide a stack trace.

@maffelbaffel
Copy link

I'm getting the following stacktrace:

Exception in thread "main" java.lang.NoSuchFieldError: FUN_KEYWORD
	at com.pinterest.ktlint.core.ast.ElementType.<clinit>(ElementType.kt:154)
	at com.pinterest.ktlint.ruleset.standard.ChainWrappingRule.<init>(ChainWrappingRule.kt:36)
	at com.pinterest.ktlint.ruleset.standard.StandardRuleSetProvider.get(StandardRuleSetProvider.kt:11)
	at com.pinterest.ktlint.KtlintCommandLine.loadRulesets(Main.kt:546)
	at com.pinterest.ktlint.KtlintCommandLine.run(Main.kt:222)
	at com.pinterest.ktlint.Main.main(Main.kt:62)

There is already a bug filed here.

@JLLeitschuh
Copy link
Owner

This stack trace is purely in ktlint, not this plugin. If there are still issues after an official Ktlint release is published, please leave a comment and I'll reopen this issue.

@JLLeitschuh JLLeitschuh added the ktlint ktlint project issue label Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ktlint ktlint project issue
Projects
None yet
Development

No branches or pull requests

3 participants