intellij-rust / intellij-rust

Rust plugin for the IntelliJ Platform
https://intellij-rust.github.io
MIT License
4.53k stars 380 forks source link

Rust plugin regularly corrupts build environment in target #10040

Closed keltia closed 1 year ago

keltia commented 1 year ago

Environment

0.4.185.5086-223

1.66.1, 1.67, etc.

GoLand 2022.3.1 Build #GO-223.8214.59, built on December 21, 2022 Licensed to Ollivier Robert You have a perpetual fallback license for this version. Subscription is active until December 17, 2023. Runtime version: 17.0.5+1-b653.23 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2040M Cores: 6 Registry: suggest.all.run.configurations.from.context=true debugger.new.tool.window.layout=true ide.completion.variant.limit=500 ide.experimental.ui=true

Non-Bundled Plugins: com.intellij.tasks (223.7571.125) org.rust.lang (0.4.185.5086-223) org.toml.lang (223.8214.6) YAML/Ansible support (0.11.2) nl.rubensten.texifyidea (0.7.25.1) com.intellij.nativeDebug (223.8214.16) net.seesharpsoft.intellij.plugins.csv (3.0.2-223) mobi.hsz.idea.gitignore (4.4.4) com.blai30.lotus.theme (1.10)

Happens on macOS as well.

MacOS 12.1, macOS 10.14, Windows 10

Problem description

From time to time, for some unknown reason, target gets corrupted by the IDE and makes the compiler think it needs nightly toolchain when in fact it doesnt:

[...]
   Compiling anyhow v1.0.68
   Compiling async-object-pool v0.1.4
error[E0554]: `#![feature]` may not be used on the stable release channel
   --> C:\Users\roberto\.cargo\registry\src\github.com-1ecc6299db9ec823\anyhow-1.0.68\src\lib.rs:214:32
    |
214 | #![cfg_attr(backtrace, feature(error_generic_member_access, provide_any))]
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
   --> C:\Users\roberto\.cargo\registry\src\github.com-1ecc6299db9ec823\anyhow-1.0.68\src\lib.rs:214:61
    |
214 | #![cfg_attr(backtrace, feature(error_generic_member_access, provide_any))]
    |                                                             ^^^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.
error: could not compile `anyhow` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

It happens in third party crates. Removing target "fixes" it.

Steps to reproduce

Just wait a bit, it will happen.

It was mentioned on the Rust Discord.

Undin commented 1 year ago

@keltia Thanks for the report. The problem is the same as #9700 and already fixed in #9901 The fix is already available in nightly build and will be published in stable next week

Kobzol commented 1 year ago

FWIW, this still regularly happens to me even with the newest version of the pluin.

vlad20012 commented 1 year ago

@Kobzol it seems to be #10186 now. And we currently unsure how to fix it properly