-
Notifications
You must be signed in to change notification settings - Fork 380
-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible regression in release 127 - rust edition not detected, file not include in module tree #5861
Comments
@clintfred Try to invalidate caches and restart your IDE via
You can download any plugin build from Marketplace. https://plugins.jetbrains.com/plugin/8182-rust/versions |
@Undin Thanks for the quick response. I have done Invalidate Caches/Restart a couple of times on both 2020.1 + 127 and 2020.2 + 127 to no avail. Thanks for the pointer to the plugin. I had missed the 2020.2 version of 126 previously. For now I am using 2020.1 and 126 to try to get some things done while we work through this. I can try 2020.2 + 126 if that would be helpful. |
I'm having the same issue, I'll try to downgrade for now. edit: I can confirm version |
@Cightline are you doing any code generation? Do you have a custom |
@clintfred @Cightline is it reproduced for your even with a new project? |
@Cightline could you provide a project example where it happens? |
Yes. I have two separate projects that I have re-created from nothing with the same result. |
@clintfred sorry, my question wasn't clear enough. I meant, is it reproducible for you with "Hello World" project? |
Haha. I realized what you meant and edited my above reply as you were typing this. No. I haven't tried reproducing it in a "Hello World" project. |
Nope. |
I'm having the same problem on Windows (edit: and Linux): logs: clion-logs-20200808-182910.zip Environment
I also had the same problem with Intellij CE when I updated it to The problem does not exist for me on Intellij 2020.1.4 with plugin version 126:
Invalidating caches doesn't work for me. I've had the problem with all Rust projects I opened since updating (CLionn | Intellij) to I've also just tested it with a freshly created project ( I've also tested with plugin version |
I've also just tested CLion 2020.2 with the Rust plugin version 0.3.126.3220-202, and this does seem to work (hurray! 😄) (so it is likely a regression in the plugin) |
@foresterre I tried https://github.com/foresterre/sic and https://github.com/foresterre/peekmore with IntelliJ Community 2020.1.4 with Rust plugin version 128 and I was not able to reproduce the "not included in module tree" issue. It did pop up initially, but after indexing finished, everything looked fine. I didn't try on plugin version 127. Does plugin version 128 work for you? I tried my project on the 128 plugin and it still didn't build. :( |
I just tested version However, since it seems to work for you, I hypothesised, perhaps the issue is related in some way with some prior cache or index? To that end I removed the full installation caches and configuration folders located at: Initially I only removed the caches/configurations for Intellij CE, not for CLion, and opening the project with CLion showed the same problem as before; I can't recall exactly which removed cache/configuration folder resolved the problem; but it seems to work now... I haven't tried the same steps on Linux yet. |
I'm having similar difficulties for versions after To reproduce, I can |
I had the 'File is not included in module tree, analysis is not available' issue with Solved it by downgrading to the Update: Plugin |
@Undin I think we have a decent amount of evidence that a problem exists here, but I don't know that anyone has a fool proof way of reproducing the issue. I've been meaning to try out @inzanez's tokio project suggestion, but haven't yet. Has anyone internally been able to reproduce or have any ideas of root causes here? While I'm thankful that plugin 126 doesn't have this problem, staying on that old version indefinitely doesn't sound like fun :) |
@inzanez what files in |
@vlad20012 I just tried to reproduce the issue on my home machine. And it seems that even with the latest CLion and latest plugin version, I cannot. So I have the suspicion that it's tied to the version of the rust toolchain, as I'm on an older toolchain on this machine I'm using right now. I will check tomorrow on the work machine and get back with some more insights. It's a bit weird. |
Based on #5861 (comment) I think it's also possible this is a deeper caching issue that "Invalidate caches" doesn't catch, which might explain why your two systems exhibit different behavior. Rust toolchain differences is something I hadn't previously considered.... Interesting. |
@clintfred well, I tried removing all CLion related data by deleting ~/CLionxxx and the '.idea' directory inside the project, but that didn't do anything... |
This was not a problem for me; I am (/was) at the latest version of stable Rust at the time where the problem occurred for me.
I also followed the same steps on Linux, and it now works 🎆 |
Sorry, I haven't been paying attention to this discussion that much. The only "clue" I can think of is that I moved my Linux installation from one SSD to another (using rsync). After that is when the issue started happening. Are there any logs that I can link for you guys? |
Ok, I'm running CLION 2020.2, Intellij-Rust 0.3.129.3308-202, stable toolchain 1.45.2. I cloned the tokio repository, waited until all analyzing was complete, and opened I'm using the same operating system as on the machine at home where things seem to work. I haven't placed an override on the tokio repository, so it's using the default toolchain. I just upgraded CLion to 2020.3, just to check if that makes a difference, but it doesn't. So I removed all references to CLion from my operating system (install folder, ~/.config ~/.cache ~/.CLionxxx), all '.idea' folders in the projects and did a fresh install, fired it up, opened Tokio. Same again. So as a last resort I now upgraded to the latest 1.46 toolchain, invalidate cache & restart, remove .idea, restart, remove and re-clone repository, restart, whatever I do it stays the same way :-/ |
Ok, So I do have an update. It's quite silly, but I figured out that the only remaining difference in my setup is that my So I made a quick test and cloned I will just remove the symlink and work directly with the projects directory. |
Wow, symlink |
I also have a symlink involved in my affected projects. Great detective work @inzanez! I will try to validate this behavior tomorrow and report back. |
Indeed, I too use symlinks for my projects. |
Do I understand right that before plugin version 127 it works correctly with symlinks? Or not? |
@vlad20012 Well, I can't speak for anyone else here, but for me the latest release that didn't have any issues with symlinks was '0.2.125.3191-202'. So before moving to '0.3.xxx'. |
For me the latest working release was |
@vlad20012 Thanks for the fix. What's the best way to test this? |
@clintfred the fix will be available in next stable release (around two weeks). Also, you can try in install nightly build. See instruction how to do it |
I can confirm that on 2020.1 and plugin version 131 fixes this issue. 🎉 |
Am seeing this on the 171 release. |
@Bjohnson131 could you update the plugin to the latest version (178 at the moment of writing), please? |
Environment
Problem description
After updating the plugin from 126 -> 127 my project had lots of various errors. I have tried reimporting the project, re-loading the Cargo.toml from the "Cargo" menu. In Release 126, I was using the "experimental macro engine" and I didn't have any errors across my project.
I don't really understand which of the following is a root problem, so I will just post some of the issues to give a picture of what I'm experiencing.
Edition is not being correctly detected and
async
keyword is disallowed"This feature is only available in Edition 2018"
Source files are not being included in the module tree
"File is not included in module tree"
Modules declared at the top level are not found
"File not found for module"
see first screenshot
The one thing that makes this project different is that it is using rust-protobuf to do codegen and is including the generated code at the top of main. This means the project not only has a
build.rs
, but also aninclude!
macro inmain.rs
.I downgraded the plugin to 126 in 2020.1 and the project started building properly again. I can't use plugin 126 in 2020.2. Is there a way I can get a build (or build myself) a version of 126 that I can use in 2020.2 while we work this out?
I did try suggestions in #3628 and #4907, but have not been able to find a resolution.
Thanks for your help, and thanks for an awesome plugin. :)
Steps to reproduce
Source code for project is not open source, so this may be difficult.
The text was updated successfully, but these errors were encountered: