After upgrading the IDE plugin to 1.4.21, the plug...
# announcements
i
After upgrading the IDE plugin to 1.4.21, the plugin now throws Gradle-related exceptions all the time and there is no code completion in .gradle-kts files anymore. After downgrading to 1.4.10 it works again. I cannot find a 1.4.20 release for 2020.3. Does anybody know a page where you can see all releases?
k
how did you get version 1.4.21, mine shows 1.4.10 as latest
hm insteresting when I check for updates it says there is no updates, but in settings there is a newer version
i
I'm looking here: https://plugins.jetbrains.com/plugin/6954-kotlin/versions I had 1.4.20 before for 2020.3 and now I cannot get it back.
Copy code
java.lang.IllegalArgumentException: could not find extension implementation class org.jetbrains.kotlin.idea.scripting.gradle.roots.GradleBuildRootsManager
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.findExtension(ExtensionPointImpl.java:1076)
	at com.intellij.openapi.extensions.ExtensionPointName.findExtensionOrFail(ExtensionPointName.java:134)
	at org.jetbrains.kotlin.idea.scripting.gradle.roots.GradleBuildRootsManager$Companion.getInstance(GradleBuildRootsManager.kt:467)
	at org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptNotificationProvider.createNotificationPanel(GradleScriptNotificationProvider.kt:40)
	at org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptNotificationProvider.createNotificationPanel(GradleScriptNotificationProvider.kt:31)
	at com.intellij.ui.EditorNotifications$Provider.createNotificationPanel(EditorNotifications.java:57)
	at com.intellij.ui.EditorNotificationsImpl.calcNotificationUpdates(EditorNotificationsImpl.java:170)
	at com.intellij.ui.EditorNotificationsImpl.lambda$updateEditors$2(EditorNotificationsImpl.java:148)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:468)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:152)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:113)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:59)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:110)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:187)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)
This is the first exception that is thrown with 1.4.21:
After that there are other exceptions.
a
1.4.20 for 2020.3 was released in EAP channel: https://plugins.jetbrains.com/plugin/6954-kotlin/versions/eap. However, it's unlikely that something broke in 1.4.21 and works OK in 1.4.20. Can you share exception stack trace?
i
Thank you, I'll try if that makes any difference.
Just tried it, and the 1.4.20 plugin does not throw this exception and completion in .gradle.kts files works correctly.
a
This problem looks like https://youtrack.jetbrains.com/issue/KT-42828 (please see discussion there) or https://youtrack.jetbrains.com/issue/KT-42769. But it doesn't look like 1.4.21 regression.
i
Yes, I get "updateRootsCache" exception after that as well. I will now try once more again if upgrading to 1.4.21 causes these exceptions to reappear.
a
I'm not sure but it may help to remove .gradle and .idea directories and reimport the project into IDEA
i
I deleted .gradle, .idea and buildSrc/.gradle, but that makes no difference. 1.4.21 throws these exceptions for me and 1.4.20 does not. Unfortunately I have now reached a state where 1.4.20 shows all .gradle.kts files as red and nothing helps, even invalidating caches. Everything works with 1.4.10, though. I understand that 1.4.20 included extensive upgrades to the way that .gradle.kts files are handled, so probably it is related to that.
a
Does it help to delete caches manually as described in https://youtrack.jetbrains.com/issue/IDEA-245027?
👍 1
i
Yes, indeed, now it works with 1.4.21! Thank you very much for your help. As a suggestion, maybe the "Invalidate caches" action should do just that.
🙏 1
m
Hi. Any other solution for this ? I am having kotlin 1.4.21 and KMM project. I am using Android Studio. It shows standalone scripts in my project although I have manually deleted them from the project and but still it shows there. Have tried mention solutions from https://youtrack.jetbrains.com/issue/KT-42828 but doesn't work. Invalidate cache and restart works only for the first time and then again same issue. I have tried deleting gradle cache manually from but doesn't help.