jetbrains-academy / rustlings-course

Small exercises to get you used to reading and writing Rust code!
https://github.com/rust-lang/rustlings/releases/tag/1.2.2
MIT License
148 stars 33 forks source link

Failed to launch checking #132

Closed Columpio closed 2 years ago

Columpio commented 2 years ago

Pushing "Check" button in IDEA Edu in any module on this Rustlings course gives the following error: Failed to launch checking. I also tried on CLion, just the same error. There is also no "run" action near main function (that is, IDE says "Nothing here" if I click on the run button near main).

Although, I can compile and run new rust projects outside the rustlings course, so my toolchain seems ok.

Environment

jiridanek commented 2 years ago

I experienced the very same symptoms. In addition, when I open the Cargo tab and look up the hello_world target, I am able to run that from that menu. But still Check button fails, I get the "nothing here" in the gutter play icon, etc.

IntelliJ IDEA 2022.1 (Ultimate Edition) Build #IU-221.5080.210, built on April 12, 2022 Licensed to Jiri Daněk Subscription is active until October 14, 2022. Runtime version: 11.0.14.1+1-b2043.25 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.17.3-302.fc36.x86_64 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 12 Non-Bundled Plugins: org.jetbrains.plugins.go-template (221.5080.126) org.jetbrains.plugins.go (221.5080.210) name.kropp.intellij.makefile (221.5080.126) com.jetbrains.plugins.ini4idea (221.5080.126) com.jetbrains.edu (2022.4-2022.1-218) com.intellij.nativeDebug (221.5080.218) org.asciidoctor.intellij.asciidoc (0.37.17) org.rust.lang (0.4.169.4584-221) dev.blachut.svelte.lang (0.22.0) Pythonid (221.5080.212) AceJump (3.8.7)

Kotlin: 221-1.6.20-release-285-IJ5080.210 Current Desktop: KDE

KeRVeRoC commented 2 years ago

I can confirm the issue. I cannot perform checking. The plugin was added just recently and it was my first try to the Rustlings course. I thought it was only my issue but it seems not.

Build #IU-221.5080.210, built on April 12, 2022

Runtime version: 11.0.14.1+1-b2043.25 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

sofiiako commented 2 years ago

I was able to reproduce this in Idea 221 and 213 @mariyavdovina could you please take a look?

TallonRain commented 2 years ago

I'm also having this issue, recreated on multiple different machines on Windows and macOS using CLion. My toolchains are working and following the recommended corrective actions linked in the troubleshooting guide doesn't resolve it.

Build #CL-221.5080.224, built on April 13, 2022 Runtime version: 11.0.14.1+1-b2043.25 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

mariyavdovina commented 2 years ago

@sofiiako Reproducible for me too. Environment details: IntelliJ IDEA 2022.1 (Ultimate Edition) Build #IU-221.5080.210, built on April 12, 2022 Licensed to JetBrains Team

Runtime version: 11.0.14.1+1-b2043.25 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 16 Non-Bundled Plugins: com.jetbrains.edu (2022.5-2022.1-279) org.rust.lang (0.4.169.4584-221) Kotlin: 221-1.6.20-release-285-IJ5080.210

Got this exception constantly:

update failed for ActionGroup(com.intellij.execution.actions.RunContextAction, id=RunClass) with text=Run context configuration

com.intellij.diagnostic.PluginException: Cannot load class com.jetbrains.edu.rust.codeforces.RsCodeforcesRunConfiguration (
  error: Cannot inherit from final class,
  classLoader=PluginClassLoader(plugin=PluginDescriptor(name=EduTools, id=com.jetbrains.edu, moduleName=Edu-Rust, descriptorPath=Edu-Rust.xml, path=~\AppData\Roaming\JetBrains\IntelliJIdea2022.1\plugins\EduTools, version=2022.5-2022.1-279, package=com.jetbrains.edu.rust, isBundled=false), packagePrefix=com.jetbrains.edu.rust., instanceId=301, state=active)
)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:412)
    at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:240)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:212)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    at com.jetbrains.edu.rust.checker.RsCodeExecutor.createCodeforcesConfiguration(RsCodeExecutor.kt:49)
    at com.jetbrains.edu.learning.codeforces.run.CodeforcesRunConfigurationFactory.createTemplateConfiguration(CodeforcesRunConfigurationFactory.kt:15)
    at com.intellij.execution.configurations.ConfigurationFactory.createTemplateConfiguration(ConfigurationFactory.java:64)
    at com.intellij.execution.impl.RunManagerImpl.createTemplateSettings$intellij_platform_execution_impl(RunManagerImpl.kt:346)
    at com.intellij.execution.impl.RunManagerImpl.getConfigurationTemplate(RunManagerImpl.kt:338)
    at com.intellij.execution.impl.RunManagerImpl.createConfiguration(RunManagerImpl.kt:263)
    at com.intellij.execution.actions.RunConfigurationProducer.cloneTemplateConfigurationStatic(RunConfigurationProducer.java:257)
    at com.intellij.execution.actions.RunConfigurationProducer.cloneTemplateConfiguration(RunConfigurationProducer.java:247)
    at com.intellij.execution.actions.RunConfigurationProducer.createConfigurationFromContext(RunConfigurationProducer.java:96)
    at com.intellij.execution.actions.RunConfigurationProducer.findOrCreateConfigurationFromContext(RunConfigurationProducer.java:197)
    at com.intellij.execution.actions.PreferredProducerFind.doGetConfigurationsFromContext(PreferredProducerFind.java:118)
    at com.intellij.execution.actions.PreferredProducerFind.getConfigurationsFromContext(PreferredProducerFind.java:100)
    at com.intellij.execution.actions.ConfigurationContext.getConfigurationsFromContext(ConfigurationContext.java:412)
    at com.intellij.execution.actions.ConfigurationContext.findPreferredConfiguration(ConfigurationContext.java:291)
    at com.intellij.execution.actions.ConfigurationContext.findExisting(ConfigurationContext.java:284)
    at com.intellij.execution.actions.BaseRunConfigurationAction.findExisting(BaseRunConfigurationAction.java:60)
    at com.intellij.execution.actions.BaseRunConfigurationAction.fullUpdate(BaseRunConfigurationAction.java:215)
    at com.intellij.execution.actions.BaseRunConfigurationAction.update(BaseRunConfigurationAction.java:180)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:639)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:125)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:175)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:126)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:111)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:628)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:472)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:451)
    at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:451)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:529)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:451)
    at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:451)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:529)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:451)
    at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:451)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:529)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:451)
    at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:451)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:529)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:451)
    at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:451)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:529)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$20(ActionUpdater.java:451)
    at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1400)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:451)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:259)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$12(ActionUpdater.java:320)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$14(ActionUpdater.java:343)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1152)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$15(ActionUpdater.java:343)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$16(ActionUpdater.java:339)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)
    at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:365)
    at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$17(ActionUpdater.java:338)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203)
    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:829)
Caused by: java.lang.VerifyError: Cannot inherit from final class
    at java.base/java.lang.ClassLoader.defineClass2(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1109)
    at com.intellij.util.lang.UrlClassLoader.consumeClassData(UrlClassLoader.java:263)
    at com.intellij.util.lang.ZipResourceFile.findClass(ZipResourceFile.java:111)
    at com.intellij.util.lang.JarLoader.findClass(JarLoader.java:63)
    at com.intellij.util.lang.ClassPath.findClassInLoader(ClassPath.java:246)
    at com.intellij.util.lang.ClassPath.findClass(ClassPath.java:179)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:404)
    ... 81 more
sofiiako commented 2 years ago

@Columpio @jiridanek @TallonRain @KeRVeRoC the issue was fixed in Rust plugin, the fix already landed in nightly Rust plugin, and it will be landed in the next stable release (v170) in about two weeks

jiridanek commented 2 years ago

FFR: The exception is in ~/.cache/JetBrains/CLion2022.1/log/idea.log. When I was writing about my problems here, I did look into the file but somehow did not notice it in there. When I looked again now, I see it.