Maybe not the right channel for this, but I was us...
# eap
g
Maybe not the right channel for this, but I was using an RC version of the Kotlin compiler and recently upgraded In my project, I now get this error and can't seem to solve it, even if I delete
/build
Copy code
Compilation failed. Pre-release classes were found in dependencies.
Remove them from the classpath, recompile with a release compiler or use '-Xskip-prerelease-check' to suppress errors
Reason: Class is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
I've set my Kotlin dependency version to
1.60.0
, has anyone encountered this before? Thank you 😃
What doesn't make any sense to me is why it would persist after deleting the build directory Shouldn't that mean the next compilation is entirely fresh, from the currently installed version? 🤔
w
Perhaps you’re using a dependency compiled with a prerelease compiler?
g
That's what I thought too, if I look at the names of the classes they're all classes from inside the project though confusingly
Ah wait -- maybe IntelliJ has cached them somehow and is avoiding recompiling them because they haven't changed?
w
If you’re using Gradle, there’s number of places stuff can be cached: • gradle local and remote build caches (
~/.gradle/cache/build-cache-1
) • module build directory
<modulePath>/build
• project-level
.gradle
directory (
./.gradle
) You can also force what should be a clean build by adding
--rerun-tasks --no-build-cache
and optionally
--refresh-dependencies
flags to
./gradlew
invocation
🙏 1
g
Let me try with those Gradle flags, sounds like it might do the trick! Ty!
Damn, still no dice
Let me see if I can nuke every cache folder
Ah, it was because I had
-Xcontext-receivers
enabled which was marking the sources as prerelease 🙄
🎉 2