intellij-rust: IDEA Intellij & Rust plugin do not work after latest Intellij & Rust plugin updates
Environment
- IntelliJ Rust plugin version: 0.2.119.2201-201
- Rust toolchain version: stable-x86_64-apple-darwin rustc 1.42.0 (b8cedc004 2020-03-09)
- IDE name and version: Intellij IDEA 2020.1 built on April 8, 2020
- Operating system: MacOS Catalina 10.15.4
Problem description
After upgrading Intellij IDEA to April 8 version and rust plugin to the 0.2.119.2201-201, Rust projects do not built anymore, Rust sources are not analyzed.
Build Project
does nothing- syntax is not analysed (no hints, very basic hightling)
- no “Run main” in context menu when right clicking on the main() function
Steps to reproduce
Start IDEA Intellij, with Rust plugin. Try to create a project from existing sources. Then it won’t work or Open an existing project: it won’t work
In intellij logs I can find an error each time I try to build a project:
2020-04-13 17:32:26,885 [16812414] INFO - rust.openapiext.CommandLineExt - Executing `/Users/philou/.cargo/bin/cargo help check`
2020-04-13 17:32:26,906 [16812435] ERROR - plication.impl.ApplicationImpl - EventQueue.isDispatchThread()=false Toolkit.getEventQueue()=com.intellij.ide.IdeEventQueue@236e3726
Current thread: Thread[ApplicationImpl pooled thread 134,4,Idea Thread Group] 687499043
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 396031716
com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: EventQueue.isDispatchThread()=false Toolkit.getEventQueue()=com.intellij.ide.IdeEventQueue@236e3726
Current thread: Thread[ApplicationImpl pooled thread 134,4,Idea Thread Group] 687499043
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 396031716
at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:1057)
at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:1039)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doRegisterToolWindow(ToolWindowManagerImpl.kt:938)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow(ToolWindowManagerImpl.kt:923)
at com.intellij.execution.ui.RunContentManagerImpl.registerToolWindow(RunContentManagerImpl.kt:117)
at com.intellij.execution.ui.RunContentManagerImpl.getOrCreateContentManagerForToolWindow(RunContentManagerImpl.kt:362)
at com.intellij.execution.ui.RunContentManagerImpl.getContentManagerForRunner(RunContentManagerImpl.kt:347)
at com.intellij.execution.ui.RunContentManagerImpl.getReuseContent(RunContentManagerImpl.kt:322)
at com.intellij.execution.impl.ExecutionManagerImpl.doStartRunProfile(ExecutionManagerImpl.kt:182)
at com.intellij.execution.impl.ExecutionManagerImpl.startRunProfile(ExecutionManagerImpl.kt:145)
at org.rust.cargo.runconfig.RsDefaultProgramRunnerBase.execute(RsDefaultProgramRunnerBase.kt:38)
at org.rust.cargo.runconfig.RsDefaultProgramRunnerBase.execute(RsDefaultProgramRunnerBase.kt:23)
at com.intellij.execution.impl.ExecutionManagerImpl.executeConfiguration(ExecutionManagerImpl.kt:612)
at com.intellij.execution.ProgramRunnerUtil.executeConfigurationAsync(ProgramRunnerUtil.java:60)
at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:43)
at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:134)
at org.rust.cargo.toolchain.CargoCommandLineKt.run(CargoCommandLine.kt:148)
at org.rust.cargo.toolchain.CargoCommandLineKt.run$default(CargoCommandLine.kt:138)
at org.rust.cargo.runconfig.UtilsKt.buildProject(Utils.kt:69)
at org.rust.cargo.runconfig.buildtool.CargoBuildTaskRunner.run(CargoBuildTaskRunner.kt:52)
at com.intellij.task.ProjectTaskRunner.run(ProjectTaskRunner.java:143)
at com.intellij.task.ProjectTaskRunner.run(ProjectTaskRunner.java:70)
at com.intellij.task.impl.ProjectTaskManagerImpl.lambda$run$13(ProjectTaskManagerImpl.java:222)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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.lang.Thread.run(Thread.java:834)
2020-04-13 17:32:26,906 [16812435] ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 2020.1 Build #IU-201.6668.121
2020-04-13 17:32:26,906 [16812435] ERROR - plication.impl.ApplicationImpl - JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2020-04-13 17:32:26,906 [16812435] ERROR - plication.impl.ApplicationImpl - OS: Mac OS X
2020-04-13 17:32:26,906 [16812435] ERROR - plication.impl.ApplicationImpl - Plugin to blame: Rust version: 0.2.119.2201-201
2020-04-13 17:32:26,906 [16812435] ERROR - plication.impl.ApplicationImpl - Last Action: CompileDirty
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 16 (3 by maintainers)
This does not fix IntelliSense for me. I do not even have Android enabled and *.rs files are being mapped to Rust files. Not sure if that provides and insight or helps at all, but I figured I should include that for the sake of completeness.
The Clippy syntax analyzer does not work with the latest IntelliJ IDEA build (nor does Cargo check). No errors show until I go to actually compile my project. I’m not sure what this means, exactly.
To anyone as frustrated as I am: the only solution that sort of works is downgrading back to the latest 2019.x version and reverting the plugin, etc. to the earlier version. This still does not entirely solve the issues, but it mostly does.
Any time-line or updates about if/when this will be fixed? IntelliJ’s Rust plugin is near-useless at this moment in time. Is there any idea about what caused everything to break so badly (I’m also referring to the build issues people are having, etc.)?
My apologies for harping on you guys about this issue; I love Jetbrains products and use them exclusively for my developing and I do not plan on changing to any other products. I would just really love to have Rust working as I cannot benefit from the IDE while developing. I would have pretty much the same experience if coding in a vanilla
vim
environment (no plugins, etc.) – aka a simple text-editor.Thank you very much for all of your hard work and your dedication. It really means a lot. I hope I did not come across as too abrasive. The issues are frustrating but I want you to know how much I do appreciate everything your team does – it’s incredible.
Thanks again!
Root of the problem: after update from 2019.3 to 2020.1, IDEA remaps
*.rs
files association from Rust to Android RenderScript for some reason. Please vote to https://youtrack.jetbrains.com/issue/IDEA-237376 because proper solution should be done in the platform (not in the plugin).To avoid this problem, we added a hack to the latest (v120) release (see #5229) that associates
rs
files as Rust files after Cargo refresh. It should be called automatically at least on project opening, but you can try to invoke the corresponding action manually.If it doesn’t help (it’s weird but anyway), you can try to disable android plugin and reinstall Rust plugin.
I don’t recommend to do it manually because it may have negative effects in combination with hack introduced in #5229