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

Detekt 1.20.0 fails on older Kotlin versions #4883

Closed
guycall opened this issue Jun 1, 2022 · 1 comment
Closed

Detekt 1.20.0 fails on older Kotlin versions #4883

guycall opened this issue Jun 1, 2022 · 1 comment
Labels

Comments

@guycall
Copy link

guycall commented Jun 1, 2022

Expected Behavior

I have a Spring Boot app, jvmTarget 11, Kotlin 1.5.32 and with Detekt 1.19.0. Running ./gradlew --debug detekt works without problem. After upgrading to 1.20.0 I would expect it to continue to run.

Observed Behavior

With version 1.20.0 I get the error:

...
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':detekt'.
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Invalid value passed to --jvm-target

I tried with various versions of Kotlin and only 1.6.20 and 1.6.21 worked:

1.5.31 -> Failed
1.5.32 -> Failed
1.6.0 -> Failed
1.6.10 -> Failed
1.6.20 -> OK
1.6.21 -> OK

Your Environment

  • Version of detekt used: 1.20.0
  • Version of Gradle used: 7.2
  • Operating System and version: Windows 10
  • Version of Kotlin used: 1.5.32
@guycall guycall added the bug label Jun 1, 2022
@cortinico
Copy link
Member

After upgrading to 1.20.0 I would expect it to continue to run.

That's not the case.

We publish the list of versions we build against on this page:
https://detekt.dev/docs/introduction/compatibility

If you're diverging from those versions, things might not work properly. If you're using the Gradle Plugin, that's even more likely due to how Gradle embeds a Kotlin version in its runtime.

Moreover, this issue has been already discussed here:
#4786

Closing as it's essentially a duplicate. Feel free to re-opne if you have more context to share.

@cortinico cortinico closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants