Why is Detekt so tightly coupled with the compiler...
# detekt
e
Why is Detekt so tightly coupled with the compiler version? There's basically no differences between Kotlin 1.8.21 and 1.8.22. Feels odd that Detekt complains about upgrading..
b
Detekt and kotlin are not coupled at all. The error you are getting should point to a link where we describe what's going on.
You are overriding the dependendicies of detekt. (probably)
Also, if the error message or the documentation is not clear we should fix it because this is a common misunderstanding that we would like to avoid.
e
I'm not doing any particular overrides, but I am defining the Kotlin version with a pre-compiled buildscript plugin. Could that interfere?
b
Not sure. Maybe. I mean, I also use a pre compiled buildscript and I don't have this issue.
e
I have a
build-logic
dir that defines Kotlin version and detekt like:
Copy code
// base-conventions.build.kts

plugins {
   id("io.gitlab.arturbosch.detekt")
}

detekt {
   buildUponDefaultConfig = true
}

repositories {
   mavenCentral()
   maven(url = "<https://nexus.hh.atg.se/repository/maven-public/>")
}
Copy code
// kotlin-conventions.build.kts
plugins {
   kotlin("jvm")
  id("base-conventions")
}

// other things
Not sure if the order here messes with things... perhaps I ought to add detekt and kotlin in the same plugin?
b
There are a lot of closed issues regarding this and usually 3flex dives feedback in those about how to fix it. (I'm not asking for a new issue, I mean that maybe there you can find something that helps you). In general a build scan should show you that the version of the compiler in detekt was changed. That's what should not happen.